Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 186
  • Last Modified:

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.
0
DrDamnit
Asked:
DrDamnit
  • 5
  • 2
1 Solution
 
jar3817Commented:
If this is just a backup server, you shouldn't need any relaying at all. To tell it to accept mail for only your domain, edit the /etc/mail/access file and put something like:

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.

0
 
DrDamnitAuthor Commented:
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.

0
 
DrDamnitAuthor Commented:
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.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jar3817Commented:
sendmail is very convoluted, there is no single place to learn this stuff, books and websites are probably the biggest resources. Sounds like it should work for you...
0
 
DrDamnitAuthor Commented:
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?
0
 
DrDamnitAuthor Commented:
BTW: Firewall on the sendmail box is disabled as is SELinux, and sendmail did start successfully.
0
 
DrDamnitAuthor Commented:
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!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now