OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: when does milter reject happen

From: Wietse Venema (wietseporcupine.org)
Date: Fri Aug 17 2007 - 10:19:41 CDT


ram:
> I am using a milter to reject mails at the MTA based on some custom
> blacklist checks. Some mails are rejected in the mlfi_envrcpt()
> function
> I am also using rbl rejects in the smtpd_recipient_restrinction class
>
> So does the milter-reject happen first or the rbl reject happen first.

smtpd_recipient_restrictions execute before the Milter is asked
for an opinion about the recipient address.

By default, smtpd_client/helo/sender_restrictions are delayed until
the RCPT TO command (smtpd_delay_reject=yes). When the delay is
turned off, smtpd_client/helo/sender_restrictions execute before
the corresponding Milter requests.

The Milter requests for (CONNECT, HELO, MAIL) are never delayed as
that would break Sendmail compatibility.

        Wietse

Non-default (smtpd_delay_reject = no):

    connect
        smtpd_client_restrictions
        Milter connect
    helo
        smtpd_helo_restrictions
        Milter helo
    mail
        smtpd_sender_restrictions
        Milter sender
    rcpt
        smtpd_recipient_restrictions
        Milter recipient
    data
        smtpd_data_restrictions
        Milter data (protocol version >= 4)
        Milter header
        Milter eoh
        Milter body
        Milter eob
        smtpd_end_of_data_restrictions
    disconnect
        Milter disconnect

Default (smtpd_delay_reject = yes):

    connect
        Milter connect
    helo
        Milter helo
    mail
        Milter sender
    rcpt
        smtpd_client_restrictions
        smtpd_helo_restrictions
        smtpd_sender_restrictions
        smtpd_recipient_restrictions
        Milter recipient
    data
        smtpd_data_restrictions
        Milter data (protocol version >= 4)
        Milter header
        Milter eoh
        Milter body
        Milter eob
        smtpd_end_of_data_restrictions
    disconnect
        Milter disconnect