Sendmail DSN – forwarding root’s mail

June 15th, 2008 | by Sean |

Further to my earlier article “Streamyx SMTP server authentication problem“, the other part of my problem was the DSN – Delivery Status Notification emails were not coming to any of my interactive users. I thought at the time they might be going to the sender, since the mails were coming from a PHP web application. In fact, the notifications were going to root – the owner of the sendmail process.

I could see the notifications – all I needed to do was log in as root (I never do this – always su root!) and use the mail program. There I could see lots of emails that told me exactly why they hadn’t been delivered:

reason: 530 5.7.1 Authentication required Refer http://webmail.tm.net.my/smtpauth.html

At this point, I’d just like to repeat the point of the previous article. Our authentication had been just fine for more than a year. Recently TM quietly changed policy and started rejecting authentication attempts from users who hadn’t changed their password since signing up for Streamyx. That URL tells you nothing about the policy change, you have to work that one out for yourself! OK, maybe it’s a bit lame, never changing a default password that’s the same for all users, but a clear statement about the wheres and hows would have been only respectable.

Back to root mail forwarding. The Internet is your friend. There are all manner of complicated ways of doing it, but the one I opted for is so simple, I don’t know why I didn’t always know it. Just write a ‘.forward file‘ in root’s HOME directory. Mark Roth’s sendmail tutorial explains it best, see: The .forward File

In this example, I opt to receive root’s mail, and also forward it non-recursively (that’s what the backslash means) to root:

Forwarding root\'s mail

This seems to work a treat. I’m hoping this means I won’t be thrashing around completely in the dark the next time TM change the email rules!

Post a Comment