[Asterisk-Users] sendmail&hostname

Nicolás Gudiño asternic at gmail.com
Wed Sep 8 06:27:35 MST 2004


Hello,

On Wed, 8 Sep 2004 13:10:48 +0200, Altus Snyman <altus at stormcorp.co.za> wrote:
> Good day all
> I'm just wondering for interest sake
> I have a box,hostname=myname.co.za,running sendmail
> If I send mail to someuser at myname.co.za it try to deliver to the box,witch
> does not have the mail box.How do I tell sendmail that it should send mail to
> myname.co.za 's mailserver.
> I know how easy it is to change the name but there's a lot of reasons why we
> can.It is not in the local-hostnames file either.
> Thanks
> Altus

If your machine will never receive local mail, you can setup a 'SMART
HOST'  in sendmail, then, all mail will be relayed through that host.
If you use redhat/fedora, you can add the smart host file  in:

/etc/mail/sendmail.mc

just add the line:

define(`SMART_HOST',`your.smtp.relay.server.or.ip.address')dnl

Then you have to generate the /etc/sendmail/sendmail.cf with the command

m4 < /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Restart sendmail and you are done. Just backup sendmail.cf firts just
in case something goes wrong.

Best regards,

-- 
Nicolás Gudiño
Buenos Aires - Argentina



More information about the asterisk-users mailing list