Solved

Sendmail - primary and secondary servers setup correctly?

Posted on 2004-03-30
4
400 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

Import PST to Exchange using Power Shell new-mailboximportrequest command, you can simply import the PST file into Exchange mailbox or archived. To know How to import PST into Exchange  2013 read the complete article.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

821 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