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

Rejecting mail sent specific user extensions

Expand Messages
  • Humopat
    Hi all, I m quite new at postfix, after long years using qmail. I m really enjoying it for now but I m a little lost on something and I hope I can get help
    Message 1 of 3 , Apr 3, 2009
    • 0 Attachment
      Hi all,

      I'm quite new at postfix, after long years using qmail.
      I'm really enjoying it for now but I'm a little lost on something and I hope I can get help from you because I couldn't find anything online.


      I'm using extensions so all emails sent to humopat+anything@... will be accepted and forwarded to my mailbox.
      But some extensions receive too many spams and I want to get rid of them, like humopat+foo@....

      I want this extension, and only this extension, to bounce at the "rcpt to" step.

      Of course I could use something like "smtpd_recipient_restrictions = check_recipient_access (...)"
      but I came to think it would be easier to define this forbidden address in the virtual alis maps file, so I don't have too many files to handle, like:

      postmaster@...     mymailbox@...
      humopat@...         mymailbox@...
      humopat+foo@...   REJECT

      I tried exactly that syntax but it doesn't work.


      I guess I'm a bit stupid because I think thousands of persons need this function so... it must be very easy to achieve somehow.

      How do you do that kind of thing?


      Thank you all!
    • Wietse Venema
      ... Which makes sense, considering that this is an ACCESS table. ... Did you try the documentation? man 5 virtual. Wietse
      Message 2 of 3 , Apr 3, 2009
      • 0 Attachment
        Humopat:
        > I want this extension, and only this extension, to bounce at the "rcpt to"
        > step.
        >
        > Of course I could use something like "smtpd_recipient_restrictions =
        > check_recipient_access (...)"

        Which makes sense, considering that this is an ACCESS table.

        > but I came to think it would be easier to define this forbidden address in
        > the virtual alis maps file, so I don't have too many files to handle, like:
        >
        > postmaster@... mymailbox@...
        > humopat@... mymailbox@...
        > humopat+foo@... <humopat%2Bfoo@...> REJECT
        >
        > I tried exactly that syntax but it doesn't work.

        Did you try the documentation? man 5 virtual.

        Wietse
      • Wietse Venema
        /etc/postfix/transport: humopat+foo@mydomain.com error:5.1.1 user unknown /etc/postfix/main.cf: transport_maps = hash:/etc/postfix/transport Wietse
        Message 3 of 3 , Apr 3, 2009
        • 0 Attachment
          /etc/postfix/transport:
          humopat+foo@... error:5.1.1 user unknown

          /etc/postfix/main.cf:
          transport_maps = hash:/etc/postfix/transport

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