Solved

Sendmail - primary and secondary servers setup correctly?

Posted on 2004-03-30
4
397 Views
Last Modified: 2013-12-17
Hi there!

I just want to make sure I've got my primary and secondary servers setup correctly.  Both are running Sendmail 8.12.11.

I host several domains.  For some, I deliver mail to the local server - others, I send to an email address.  I do all this on the primary server - mx-1.  For my sendmail.mc, I used the following settings:

FEATURE(`virtusertable', `hash /etc/mail/virtusertable')dnl
FEATURE(`nouucp', `reject')dnl
FEATURE(relay_entire_domain)
FEATURE(access_db)
FEATURE(`dnsbl', `relays.ordb.org', `550 Email rejected')dnl
FEATURE(`dnsbl', `sbl.spamhaus.org', `550 Email rejected')dnl
FEATURE(`dnsbl', `bl.spamcop.net', `550 Email rejected')dnl
MAILER(local)dnl
MAILER(smtp)dnl
define(`confTO_IDENT',`0s')dnl
define(`confSMTP_LOGIN_MSG', `')dnl
define(`confCOPY_ERRORS_TO', `postmaster')dnl
define(`confPRIVACY_FLAGS', `goaway')dnl

I have all of the domains listed in my local-host-names and their target delivery in /etc/mail/virtusertable.  I use dnsbl and a rather long access db for known spammers.


Now, on mx-2 - the secondary server, all I want this to do is hold mail in the event that mx-1 is down.  So, that being said, I created this sendmail.mc:

FEATURE(`virtusertable', `hash /etc/mail/virtusertable')dnl
FEATURE(access_db)
FEATURE(`dnsbl', `relays.ordb.org', `550 Email rejected')dnl
FEATURE(`dnsbl', `sbl.spamhaus.org', `550 Email rejected')dnl
FEATURE(`dnsbl', `bl.spamcop.net', `550 Email rejected')dnl
FEATURE(`nouucp', `reject')dnl
FEATURE(relay_entire_domain)
MAILER(local)dnl
MAILER(smtp)dnl
define(`confTO_IDENT',`0s')dnl
define(`confSMTP_LOGIN_MSG', `')dnl
define(`confCOPY_ERRORS_TO', `postmaster')dnl
define(`confPRIVACY_FLAGS', `goaway')dnl

Once again, I use the dnsbl and access method to stop spam.  I listed all of the domains only in /etc/mail/relay-domains - and that is it.

All tests I can think of seem to work.  If I turn off mx-1 and send mail to any of the domains, it holds up on mx-2 and then when mx-1 comes back, it is delivered.  So, it looks like it's working.

However, I thought I'd check with the experts here to see if I am missing anything or any possible issues with this config.

Thanks in advance!

- Peter
0
Comment
Question by:pferrigan
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 125 total points
ID: 10718716
Looks okay to me and you've proven that it works.

Note that you could "sync" the virtusertable and local-host-names between the two servers. That would allow mail forwarded to other than the primary mail server to be delivered directly if the primary is down. Mail to user acounts on the primary would simply be held in queue until the primary is back on line.
0
 

Author Comment

by:pferrigan
ID: 10728990
Thanks for the suggestion.  I will do that.

Have a good one!

0
 
LVL 4

Expert Comment

by:jetx
ID: 11572429
OMG man your DNSBL entry ROCKS!!!! Its stopping the rumplestiltskin attacks on my server
0
 

Author Comment

by:pferrigan
ID: 11659135
Good!

I've been using it for about a year now - Really cut down on spam coming in.

Glad to hear it's working for you too!

0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This short article will present "How to import ICS Calendar onto Office 365 Calendar". I was searching for free (or not free) tools to convert ICS to CSV without success. The only tools I found & working well were online tools...this was too hard to…
Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question