Solved

Sendmail - primary and secondary servers setup correctly?

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

New-MailboxSearch Powershell Command and step by step approach to Search and Extract Emails form Exchange 2013 Journaling server.
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.
In this video we show how to create a Contact 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 Recipients >> Contact ta…
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now