Loading ...
Sorry, an error occurred while loading the content.
 

Re: reject_unknown_reverse_client_hostname safe?

Expand Messages
  • Jan P. Kessler
    ... It is also possible to combine both, like id=COMBO01 rbl=bl.spamcop.net,pbl.spamhaus.org action=reject_unknown_reverse_client_hostname As mentioned by
    Message 1 of 67 , May 8, 2013
      Am 08.05.2013 01:58, schrieb Vincent Lefevre:
      > On 2013-05-07 23:00:01 +0200, Jan P. Kessler wrote:
      >> Yes this is possible with postfwd. The policy delegation protocol
      >> contains reverse_client_name and client_name, which can be used within
      >> postfwd rulesets.
      >>
      >> Example:
      >>
      >> id=COMBO01
      >> reverse_client_name==unknown
      >> rbl=bl.spamcop.net,pbl.spamhaus.org
      >> action=REJECT due to no valid rDNS and blacklisting
      > BTW, if I understand correctly what has been said earlier, DEFER would
      > be better than REJECT as the reverse_client_name==unknown error may be
      > temporary.

      It is also possible to combine both, like

      id=COMBO01
      rbl=bl.spamcop.net,pbl.spamhaus.org
      action=reject_unknown_reverse_client_hostname

      As mentioned by someone else reject_unknown_reverse_client_hostname will
      use 450 in case of dns errors and 550 on NXDOMAIN.

      As I don't want to pollute the postfix list further. You are welcome to
      ask postfwd related questions on it's mailinglist or the other contact
      information mentioned on the website.
    • Stan Hoeppner
      ... permits always come before rejects . Thus whitelist type entries should always be at the top of the restrictions list. As you are using
      Message 67 of 67 , May 14, 2013
        On 5/14/2013 11:45 AM, Steve Jenkins wrote:
        > On Tue, May 14, 2013 at 8:33 AM, /dev/rob0 <rob0@...> wrote:
        >
        >> On Tue, May 14, 2013 at 07:49:50AM -0700, Steve Jenkins wrote:
        >>> smtpd_recipient_restrictions =
        >>> reject_invalid_helo_hostname,
        >>> warn_if_reject reject_non_fqdn_helo_hostname,
        >>> reject_unknown_reverse_client_hostname,
        >>> warn_if_reject reject_unknown_helo_hostname,
        >>> check_reverse_client_hostname_access
        >> pcre:/etc/postfix/fqrdns.pcre,
        >>> check_helo_access hash:/etc/postfix/helo_access,
        >>> check_sender_access hash:/etc/postfix/sender_access,
        >>> reject_rbl_client zen.spamhaus.org,
        >>> reject_rhsbl_client dbl.spamhaus.org,
        >>> reject_rhsbl_sender dbl.spamhaus.org,
        >>> reject_rhsbl_helo dbl.spamhaus.org,
        >>> permit_dnswl_client list.dnswl.org=127.0.[0..255].[1..3],
        >>> permit
        >>
        >> The last two lines are no-op. If you have anything you want to be
        >> subjected to the list.dnswl.org whitelist, put it after the
        >> permit_dnswl_client. If not, there is no point in querying it.
        >
        >
        > Excellent point. If the next step is going to "permit" anyway, then no use
        > in the extra query. I've moved the dnswl.org line up so that it's just
        > above the three "local" check_* lines.

        "permits" always come before "rejects". Thus whitelist type entries
        should always be at the top of the restrictions list. As you are using
        (client|helo|sender|recipient) sections any whitelisting in
        smtpd_recipient_restrictions should typically be at the very top.

        permit_dnswl_client list.dnswl.org=127.0.[0..255].[1..3]
        ^^^^^^ ^^^^

        This shows you are explicitly permitting anything/everything listed in
        the dnswl. Are you sure that is what you want? I use...

        permit_dnswl_client list.dnswl.org=127.0.[2..14].[2..3]

        which does not explicitly permit email marketing providers nor any IP
        with trustworthiness score of 1. A score of 1 is equivalent to a
        SpamAssassin score of -1, which does not merit a direct shot to the
        queue. That would typically require an SA score of -5. I want these
        clients to go through all of my other restrictions before allowing their
        payload into my queue.

        Also worth noting, there are currently only 14 categories (3rd octet of
        a reply), so specifying 255 is not necessary, and possibly problematic.
        Hypothetically, if dnswl decided one day to create categories 16,
        political campaigns, and 17, religious newsletters, you are currently
        setup to automatically permit such clients.

        Remember, the sole purpose of whitelisting is to bypass all of your
        other spam checks and get the mail into your queue unmolested. IMO, not
        every IP listed by dnswl is deserving of this honor, not even close to
        all of them.

        See section "Return codes" at: http://www.dnswl.org/tech

        --
        Stan
      Your message has been successfully submitted and would be delivered to recipients shortly.