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

canonical_maps and relay_recipients

Expand Messages
  • Carlos Kramer
    Hi, I have legacy mail address formats and domains where I need to rewrite the domain and the user address independently. Joe.User@mydomain.com.au -
    Message 1 of 3 , Aug 1, 2006
    • 0 Attachment
      Hi,

      I have legacy mail address formats and domains where I need to rewrite the
      domain
      and the user address independently.

      Joe.User@... -> Joe.User@...
      joe_user@... -> Joe.User@...
      joe_user@... -> Joe.User@... etc.

      I'm using recipient_canonical_maps to rewrite the address and it seems to
      work fine
      but unknown addresses where the domain has been rewritten aren't being
      rejected
      by relay_recipient_maps.

      I'm doing it like this:-

      main.cf
      relay_recipient_maps = hash:/etc/postfix/recipients
      recipient_canonical_maps = hash:/etc/postfix/domain /etc/postfix/user

      domain:-
      @... @...

      user:-
      joe_user Joe.User

      recipients:-
      Joe.User OK

      unknown@... is being rejected by relay_recipient_maps

      but unknown@... is rewritten to unknown@...
      and this isn't being rejected.

      I don't know if my approach is wrong or if there is some other problem any
      help would be most appreciated. My rewriting is somewhat more complex
      than above but basically I want to rewrite the domain and the user part
      independently and reject unknown mail addresses.

      Thanks.
    • Carlos Kramer
      ... Sorry I don t know if my description of the problem I am facing was entirely clear. Here is a SMTP conversation highlighting it:- ... 220
      Message 2 of 3 , Aug 1, 2006
      • 0 Attachment
        >Earlier I wrote:-
        >I'm using recipient_canonical_maps to rewrite the address and it seems to
        >work fine but unknown addresses where the domain has been rewritten aren't
        >being rejected by relay_recipient_maps.

        <snip>

        Sorry I don't know if my description of the problem I am facing was
        entirely clear. Here is a SMTP conversation highlighting it:-

        >telnet 1.2.3.4 25
        220 mail.mydomain.com ESMTP Postfix
        HELO test.com
        250 mail.mydomain.com
        MAIL FROM:<>
        250 Ok
        RCPT TO:<unknown@...>
        550 <unknown@...>: Recipient address rejected: User unknown in
        relay recipient table
        RCPT TO:<unknown@...>
        250 Ok
        RCPT TO:<joe_user@...>
        250 Ok
        RCPT TO:<joe_user@...>
        250 Ok

        In the case of joe_user the address has been rewritten to
        Joe.User@... which is what I want.

        In the case of unknown@... this has been
        rewritten to unknown@... but it is accepted
        for relaying to a downstream server even though it is not
        a valid address listed in the relay_recipients table.

        I am running postfix 2.1.5.

        Thank you for any help you can provide.
      • Magnus Bäck
        On Tuesday, August 01, 2006 at 09:04 CEST, ... Wildcard canonical mappings break recipient validation. You must specify each recipient address separately.
        Message 3 of 3 , Aug 1, 2006
        • 0 Attachment
          On Tuesday, August 01, 2006 at 09:04 CEST,
          Carlos Kramer <csk_1975@...> wrote:

          > I have legacy mail address formats and domains where I need to rewrite
          > the domain and the user address independently.
          >
          > Joe.User@... -> Joe.User@...
          > joe_user@... -> Joe.User@...
          > joe_user@... -> Joe.User@... etc.
          >
          > I'm using recipient_canonical_maps to rewrite the address and it seems
          > to work fine but unknown addresses where the domain has been rewritten
          > aren't being rejected by relay_recipient_maps.
          >
          > I'm doing it like this:-
          >
          > main.cf
          > relay_recipient_maps = hash:/etc/postfix/recipients
          > recipient_canonical_maps = hash:/etc/postfix/domain /etc/postfix/user
          >
          > domain:-
          > @... @...

          Wildcard canonical mappings break recipient validation. You must specify
          each recipient address separately.

          user1@... user1@...
          user2@... user2@...
          ...
          userN@... userN@...

          [...]

          --
          Magnus Bäck
          magnus@...
        Your message has been successfully submitted and would be delivered to recipients shortly.