User Tools

Site Tools


dotrc:exim:secondary_mx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

dotrc:exim:secondary_mx [2011/09/01 13:41] – created adidotrc:exim:secondary_mx [2018/07/10 09:49] (current) – exim: secondary mx -- callout to primary adi
Line 14: Line 14:
 +domainlist relay_to_domains = MAIN_RELAY_TO_DOMAINS : dsearch;CONFDIR/secondary +domainlist relay_to_domains = MAIN_RELAY_TO_DOMAINS : dsearch;CONFDIR/secondary
 </code> </code>
 +
 +====== Variant: callout to primary mx ======
 +
 +To avoid spam processing and back-scatter the secondary mx may reject mails (temporary error) as long as the primary mail server is online. Add the following to acl/30_exim4-config_check_rcpt (right after the CHECK_RCPT_LOCAL_ACL_FILE for example):
 +<code>
 +  ## CALLOUT FOR SECONDARY MX
 +  ## http://blog.aptivate.org/en/blog/2009/01/28/backup-mail-exchangers/
 +  # if we know that the primary MX rejects this address, we should too
 +  deny
 +    domains = dsearch;MAILCONF/secondary
 +    ! verify = recipient/callout=30s,defer_ok
 +    message = Rejected by primary MX
 +
 +  # detect whether the callout is failing, without causing it to
 +  # defer the message. only a warn verb can do this.
 +  warn
 +    domains = dsearch;MAILCONF/secondary
 +    set acl_m_callout_deferred = true
 +    verify = recipient/callout=30s
 +    set acl_m_callout_deferred = false
 +
 +  # if the callout did not fail, and the primary mail server is not
 +  # refusing  mail for this address, then it's accepting it, so tell
 +  # our client to try again later
 +  defer
 +    domains = dsearch;MAILCONF/secondary
 +    ! condition = $acl_m_callout_deferred
 +    message = The primary MX is working, please use it
 +
 +  # callout is failing, main server must be failing,
 +  # accept everything
 +  accept
 +    domains = dsearch;MAILCONF/secondary
 +    message = Accepting mail on behalf of primary MX
 +  ## END CALLOUT FOR SECONDARY
 +</code>
 +
dotrc/exim/secondary_mx.1314884489.txt.gz · Last modified: 2011/09/01 13:41 by adi

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki