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

Re: Invalid address and bounce from Exchange

Expand Messages
  • Eray Aslan
    ... For the record, I added the following to the main.cf: smtpd_recipient_restrictions = ... check_sender_access regexp:/etc/postfix/empty_local ...
    Message 1 of 12 , Feb 1, 2007
    • 0 Attachment
      Eray Aslan wrote:
      > As far as I can tell, RFCs allow empty local part as quoted null string.
      > Even if it is technically correct, should we allow empty local parts in
      > email address in the form of @...? Certainly, it not
      > deliverable. Or is Exchange at fault here and I should solve this by a
      > regexp in check_sender_access?

      For the record, I added the following to the main.cf:

      smtpd_recipient_restrictions =
      ...
      check_sender_access regexp:/etc/postfix/empty_local
      ...

      /etc/postfix/empty_local:
      /^@.+/ REJECT No empty local part in email addresses please

      Any caveats I should be aware of?

      --
      Eray
    • Mark Martinec
      Eray, ... With: strict_rfc821_envelopes = yes mail from: 501 5.1.7 Bad sender address syntax We have the strict_rfc821_envelopes turned on since
      Message 2 of 12 , Feb 1, 2007
      • 0 Attachment
        Eray,

        > As far as I can tell, RFCs allow empty local part as quoted null string.
        > Even if it is technically correct, should we allow empty local parts in
        > email address in the form of @...? Certainly, it not
        > deliverable. Or is Exchange at fault here and I should solve this by a
        > regexp in check_sender_access?

        With:
        strict_rfc821_envelopes = yes

        mail from:<@...>
        501 5.1.7 Bad sender address syntax


        We have the strict_rfc821_envelopes turned on since forever
        for precisely this reason. There were no cases here
        of legitimate mail that were turned down by this setting.

        Mark
      • mouss
        ... .+ at the end or beginning of regular expressions is useless. so /^@/ should do. Mark s suggestion (strict_rfc821_envelopes) is a better solution.
        Message 3 of 12 , Feb 1, 2007
        • 0 Attachment
          Eray Aslan wrote:
          >
          >
          > For the record, I added the following to the main.cf:
          >
          > smtpd_recipient_restrictions =
          > ...
          > check_sender_access regexp:/etc/postfix/empty_local
          > ...
          >
          > /etc/postfix/empty_local:
          > /^@.+/ REJECT No empty local part in email addresses please
          >
          > Any caveats I should be aware of?
          >
          >

          .+ at the end or beginning of regular expressions is useless. so /^@/
          should do.

          Mark's suggestion (strict_rfc821_envelopes) is a better solution.
        Your message has been successfully submitted and would be delivered to recipients shortly.