Battling the sendmail beast! - Nothing to See Here — LiveJournal
Jul. 23rd, 2006
12:15 am - Battling the sendmail beast!
So, I have a domain bloop.com (ok, so that's not the real name :) and I wanted to do forwarding such that I point an MX record for bloop.com at a box, and make sendmail on that box forward firstname.lastname@example.org -> email@example.com, firstname.lastname@example.org -> email@example.com, and *@bloop.com -> firstname.lastname@example.org.
Through a process of searching the web, fiddling with config files, restarting sendmail many times, and sending a passel of test e-mails, I finally got it. Since I will never remember all the crazy junk I had to do, I had better relate it here (oh, and this is on Fedora Core 4)...
- Add lines to /etc/mail/virtusertable, e.g.:
email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org @bloop.com email@example.com
- Make sendmail actually listen on more than loopback, by editing /etc/mail/sendmail.mc to remove the loopback address restriction:
dnl #ORIGINAL# DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
- Open a hole in the firewall for SMTP!
- (Fedora: system-config-firewall, and check "SMTP", then save)
- Add the file /etc/mail/local-host-names with a line (or add the line):
- Restart sendmail:
> sudo service sendmail restart
So, well, hopefully I haven't done anything stupid and turned my machine into an open relay or any such denseness!