[nflug] Setting up local MTA as relay questions

Sam Stern samstern at samstern.net
Thu Sep 28 12:19:56 EDT 2006


 

> -----Original Message-----
> From: nflug-bounces at nflug.org 
> [mailto:nflug-bounces at nflug.org] On Behalf Of JJ Neff
> Sent: Thursday, September 28, 2006 12:02 PM
> To: Niagara Frontier Linux Users Group
> Subject: [nflug] Setting up local MTA as relay questions
> 
> I set up exim4 to act as a relay and send mail to my gmail 
> acct suing smtpauth and ssl
> 
> Now however ALL messages even those for root from cron jobs 
> try to go to root at localhost.localdomain and then end up in my 
> gmail acct when they fail since localhost.localdomain is not 
> known in DNS.  I tried following some exim suggestions to get 
> it to stop trying to search dns for everything , added to 
> hosts, etc but still no go - How can I get mail to the world 
> to still use smarthost but keep local mail local?
> 
> Thanks
> 
> JJ
> 

JJ,

I do not know exim (I use courier-mta and postfix) hower I do know this
problem. You have not set a machine name or default domain. On suse this in
/etc/HOSTNAME and /etc/defaultdomain iirc on fedora this is set in
/etc/sysconfig/network. Once the hostname is set, add a /etc/hosts entry for
the main ip example:

141.149.129.226 mail.samstern.net mail
192.168.0.xx mail.internal.samstern.net mail.internal

Now restart your network then services (or reboot) like:

/etc/init.d/network restart
/etc/init.d/xietd restart
/etc/init.d/exim restart
/usr/bin/newalaises # VERY important to rebuild all aliases and access lists
when you change the host name!!)
/etc/init.d/sshd restart
Etc...

NB: Exim might take extra steps. On courier-mta I need to remake the access
and relay lists in this order:

Makealiases
Makehosteddomains
Makesmtpdaccess
Makesmtpdaccess-msa
Makepercentrelay

Hth,

Sam S.

_______________________________________________
nflug mailing list
nflug at nflug.org
http://www.nflug.org/mailman/listinfo/nflug



More information about the nflug mailing list