I have a small server (Ubuntu 10.04) at my house and I would like to forward root
's email to my gmail hosted domain to get security notifications and what not.
I ripped everything out and started from scratch and ran into some other issues.
I now have sendmail working in the sense that I can mail [email protected]
and get the mail.
HOWEVER, adding an address to /root/.forward
does not actually forward the message. I get the following in my logs:
Dec 22 14:04:37 batcave sendmail[4695]:
oBML4bAT004695: to=<root@batcave>, ctladdr=aburns (1000/1000),
delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30075,
relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (oBML4bJ9004696
Message accepted for delivery)
Dec 22 14:04:39 batcave sm-mta[4698]: STARTTLS=client, relay=[69.145.248.18],
version=TLSv1/SSLv3, verify=FAIL, cipher=DES-CBC3-SHA, bits=168/168
Dec 22 14:04:40 batcave sm-mta[4698]: oBML4bJ9004696: to=<[email protected]>,
ctladdr=<[email protected]> (1000/1000), delay=00:00:03, xdelay=00:00:03,
mailer=relay, pri=120336, relay=[69.145.248.18] [69.145.248.18],
dsn=2.0.0, stat=Sent (OK 01/D4-00853-216621D4)
You can see where my local sendmail instance accepts it then hands it off to my ISP, but with the wrong address ([email protected]).
Instead of using
/root/.forward
, have you tried puttinginto
/etc/aliases
?(Note that you need to run
newaliases
after updating thealiases
file.)The most likely reason is reverse DNS: does the IP of your box have an RR DNS entry? Doing a forward lookup on the host shown in the logs (assuming you didn't modify) gives:
So it looks as if it doesn't even have an A record. An SMTP host hoping to deliver mail and not be considered a spam relay needs to have both A and RR records.
If you've got a dynamic IP, check out dyndns.com. It'll let you get an A record for your domain that'll update to match your IP.