LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   SMTP Server Help (http://www.linuxquestions.org/questions/linux-server-73/smtp-server-help-914298/)

brokenpromises 11-18-2011 03:59 PM

SMTP Server Help
 
Hi Guys,

I'm running an Exchange server, and I want to add some redundancy to it. So I have a colocated box in a datacenter running a debian VM. So far so good.

I want to:
  1. Add redundancy to the network by setting up a MX record with a priority lower than the main on-site mail server so all mail is relayed through the colocated box first.
  2. Allow the on-site mail server to relay outgoing mail through the debian box (the debian box has proper rDNS etc set up, and due to the circumstances I can't set rDNS on the connection for the on-site mail server, so relaying through a mailserver with the appropriate rDNS etc is what I want to set up). Edit: I've managed to get (2) working by adding my IP (with a /32 subnet so only MY ip is allowed) to "mynetworks" in the main.cf for postfix.
  3. [ OPTIONAL STEP ] Spam + Virus filtering.
I've searched the web and can find some guides for some very old versions of Ubuntu etc, but nothing current! And I'm not clued up enough to build my own all-in-one setup.

How do I go about allowing incoming relaying (from the internet through the colocated mail server and then to the on-site mail server?

Thanks in advance!

goossen 12-15-2011 05:21 AM

Which mailserver are you using ?

brokenpromises 12-15-2011 05:21 AM

I am using postfix.

goossen 12-15-2011 07:06 AM

Setup of a secondary mx host:
Code:

# DNS entry

IN MX 10 exchange-server.dominio.com.
IN MX 20 postfix-server.dominio.com.

Add the relay to /etc/postfix/main.cf:
Code:

relay_domains = dominio.com
smtpd_recipient_restrictions = permit_mynetworks
                              check_relay_domains


agentbuzz 12-15-2011 10:10 AM

off-site backup MX, spam+AV, relay to Exchange
 
brokenpromises,
You can get spamassassin and Clam AV in deb packages from Debian. Optional within spamassassin are DNSBLs, URIBLs, Razor2 servers, and DCC. So you want the Debian box to have an MX preference of 10, and you want to use the Exchange server as a backup MX with a preference of 20. You can set up Postfix as a relay, but it isn't a good idea to have an Exchange box talking SMTP directly with Internet clients, unless it is Exchange 2010 and you have a separate server with the "Edge Role" up front and relaying inward to the real Exchange server that's on your domain (however, I think that costs you an extra Exchange server license). So why not set up an additional Linux box at your primary site, similarly configured as the one at your colo site, and have it protect Exchange?

Here is a link to an article on setting up the config files in /etc/postfix and making Postfix a mail gateway that relays to your Exchange.

http://www.packetnexus.com/kb/greyar...757:32027.html


All times are GMT -5. The time now is 10:26 PM.