DrDamnit
asked on
Mailbaggin with a Fedora box.
I am trying to setup a server that will mail bag email if our other server is down for any reason (never happened yet, but you never know...)
I setup a Fedora 7 box with sendmail. Here's what I want it to do:
1. I need to be able to restrict what domains can send to and through this box (thou shalt not relay spam).
2. I need it to try to deliver messages received every 15 minutes to a specific IP address.
I setup a Fedora 7 box with sendmail. Here's what I want it to do:
1. I need to be able to restrict what domains can send to and through this box (thou shalt not relay spam).
2. I need it to try to deliver messages received every 15 minutes to a specific IP address.
ASKER
Great answer!
Thanks for the hint on the spammers. THe whole point of this exercise is to have a box that queues mail that is temporarily undeliverable to our Barracuda in a box on the internet, then when the Barracuda comes back up, it delivers to the Barracuda, which filters the mail and then delivers it to the actual mail server, whose firewall is configured to accept mail only from the Barracuda.
I will put this in place and let you know how it goes.
Thanks for the hint on the spammers. THe whole point of this exercise is to have a box that queues mail that is temporarily undeliverable to our Barracuda in a box on the internet, then when the Barracuda comes back up, it delivers to the Barracuda, which filters the mail and then delivers it to the actual mail server, whose firewall is configured to accept mail only from the Barracuda.
I will put this in place and let you know how it goes.
ASKER
BTW: What is a good resource to use to find this stuff out? I have just gotten Orielly's book on sendmail and the sendmail cookbook. Sendmail seems to be convoluted, but I am betting I am making it more difficult than it really is.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Well, I did what you said, but it appears sendmail is no longer listening:
Starting Nmap 4.20 ( http://insecure.org ) at 2007-08-13 07:26 Eastern Daylight Time
Interesting ports on mail.xxxxxxxxxxxxxxx.com (192.168.1.6):
PORT STATE SERVICE
25/tcp closed smtp
And the clients are timing out on send.
What should I check for this?
Starting Nmap 4.20 ( http://insecure.org ) at 2007-08-13 07:26 Eastern Daylight Time
Interesting ports on mail.xxxxxxxxxxxxxxx.com (192.168.1.6):
PORT STATE SERVICE
25/tcp closed smtp
And the clients are timing out on send.
What should I check for this?
ASKER
BTW: Firewall on the sendmail box is disabled as is SELinux, and sendmail did start successfully.
ASKER
I found my own answer. I setup mailboxes on the Fedora box and a POP server, then used fetchmail (http://fetchmail.berlios.de/fetchmail-man.html) to forward the mail on a cron job. Works great!
yourdomain.org OK
Then to forward all incoming mail to your single IP, edit the file /etc/mail/mailertable and put something like:
yourdomain.org esmtp:[1.2.3.4]
1.2.3.4 should be the ip of the mail server you want all your incoming mail to get forwarded to. I'm assuming this would be the master that is down.
Then just cd into that /etc/mail folder and run "make" and restart sendmail:
cd /etc/mail
make
/etc/rc.d/init.d/sendmail restart
The only other thing you'll need to do is to add an additional MX record in the dns for yourdomain.org with a higher priority number (the higher the number, the lower the priority). This way all mail will go to the first MX server with the lower number unless it's down.
Keep in mind, spammers will typically target the higher number MX records in homes that those backup servers have less spam filtering.