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

Re: smtpd_restriction_classes clarification

Expand Messages
  • Noel Jones
    ... You could use restriction classes to check if the recipient is restricted, then check if the sender is blacklisted. Unfortunately, this doesn t scale well
    Message 1 of 2 , Feb 28, 2012
      On 2/28/2012 5:36 PM, Andrea Gozzi wrote:
      > Hi guys.
      >
      > My current setup is that i've got a bunch of cidr, rbl, header and
      > regexp checks before a message gets delivered. Now I would like to
      > extend that for a couple users and block specific senders.
      > Unfortunately, not all users want those senders to be rejected. Some
      > of them actually want to have their mailboxes filled with junk and I
      > can't do anything about it..
      >
      > Anyhow, the server already has some classes defined, but those are
      > set up to skip all kinds of checks on messages and go straight to lda.
      > I was wondering: how do I set up a class that, in addition to all
      > restrictions specified in main.cf, also blocks emails from certain
      > senders?
      >
      > Right now I have:
      >
      > smtpd_restriction_classes = nofilter
      > nofilter =
      > permit
      >
      >
      > If I create a new class, eg. allchecks, do I need to list every
      > single *sender, *client and *recipient that I already have by default?
      >
      > Thanks.
      >
      > Andrea


      You could use restriction classes to check if the recipient is
      restricted, then check if the sender is blacklisted. Unfortunately,
      this doesn't scale well for different combinations of
      recipient/sender since you would need a separate class for each
      recipient.

      A more flexible choice would be a policy service that can examine
      both the recipient and sender in one check.
      http://www.postfix.org/addon.html#policy
      Either postfwd or apolicy might be worth investigating.



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