Postfix Quirk

Discussion in 'Server Operation' started by neil6179, Sep 18, 2006.

  1. neil6179

    neil6179 New Member

    Hello all,

    I've got a mail system setup as per this tutorial:
    http://www.howtoforge.com/virtual_postfix_mysql_quota_courier

    with the slight exception that I'm using Postfix 2.3.

    I have also recently added Grey listing to the system. My main.cf smtpd_recipient_restrictions looks like:

    Code:
    smtpd_recipient_restrictions = permit_mynetworks,
               reject_unauth_destination,
               reject_unknown_sender_domain,
               reject_rbl_client sbl-xbl.spamhaus.org,
               reject_rbl_client list.dsbl.org,
               reject_rbl_client relays.ordb.org
               check_policy_service unix:private/greylist
    Since adding Grey listing I notice the if an email arrives for an invalid recipient address, rather then outright being rejected it is initially rejected with a 4XX, temporary reject due to Grey listing message.

    On a second delivery attempt when the messages “passes” Grey listing it is then rejected with the 5XX “Unknown user in Virtual Mailbox table” message that I'd have initially expected.

    The Grey listing returns “DUNNO” if the messages passes and DEFER_IF_PERMIT if it does not? Is this correct?

    Thank you

    Neil
     
  2. neil6179

    neil6179 New Member

    Hi all,

    Ok, I've solved this one myself.

    Whether a user actually exists isn't checked until after all checks in 'smtpd_recipient_restrictions' have been done and returned OK, PERMIT or DUNNO.

    To force this check to be performed earlier you need to add 'check_recipient_maps' into 'smtpd_recipient_restrictions'.

    My 'smtpd_recipient_restrictions' now looks like:

    Code:
    smtpd_recipient_restrictions = permit_mynetworks,
               reject_unauth_destination,
               reject_unknown_sender_domain,
               check_recipient_maps,
               reject_rbl_client sbl-xbl.spamhaus.org,
               reject_rbl_client list.dsbl.org,
               reject_rbl_client relays.ordb.org
               check_policy_service unix:private/greylist
    I haven't seen this ever mentioned in any Grey listing documentation, but is seems fairly significant to me as the load saving on grey listing is fairly large.

    Hope this info is helpful.

    Thanks
    Neil
     

Share This Page