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

Re: Redirect messages for just one recipient

Expand Messages
  • Barney Desmond
    ... /etc/aliases is only used for local delivery, which means the left-hand-side must be a local system account name. As mentioned, you probably want
    Message 1 of 6 , May 5, 2009
    • 0 Attachment
      2009/5/5 Rocco Scappatura <Rocco.Scappatura@...>:
      > Basically, I need to translate "recip@..." in
      > "recip@..." and deliver "recip@..." from my mail
      > gateway directly to the mail server responsible for "extdomain.tld".
      >
      > Is it possible? I've tried to accomplish this inserting on /etc/aliases
      > file of mail gateway the entry:
      >
      > recip@...:       recip@...
      >
      > But I get:
      >
      > # newaliases
      > postalias: warning: /etc/aliases, line 85: name must be local

      /etc/aliases is only used for local delivery, which means the
      left-hand-side must be a local system account name. As mentioned, you
      probably want virtual_alias_maps, which I wouldn't be surprised if
      you're already using them. If domain.tld isn't already in
      virtual_alias_domains then you need to add it, as well as the mapping
      to extdomain.tld

      You mentioned you "don't want it to go through your post office". If
      your mail routing is setup sanely, no mail would ever be relayed
      through your post office. If this does happen, you can add a transport
      map entry to have it delivered directly (either by IP if it's static,
      or by MX lookup if you don't control it).

      Eg.

      virtual_alias_maps file: (virtual_alias_domains uses the same by default)

      domain.tld OK
      recip@... recip@...

      transport_maps file:

      recip@... smtp:mail.extdomain.tld
      # or, to do an A-lookup instead of an MX lookup
      recip@... smtp:[mx01.extdomain.tld]
    • Noel Jones
      ... No, domain.tld must not be added to virtual_alias_domains if postfix already accepts mail for that domain. A domain must not be listed in more than one
      Message 2 of 6 , May 5, 2009
      • 0 Attachment
        Barney Desmond wrote:
        > If domain.tld isn't already in
        > virtual_alias_domains then you need to add it, as well as the mapping
        > to extdomain.tld

        No, domain.tld must not be added to virtual_alias_domains if
        postfix already accepts mail for that domain. A domain must
        not be listed in more than one address class.

        All email is processed by virtual_alias_maps. The domain need
        not be a virtual_alias_domain.

        > You mentioned you "don't want it to go through your post office". If
        > your mail routing is setup sanely, no mail would ever be relayed
        > through your post office. If this does happen, you can add a transport
        > map entry to have it delivered directly (either by IP if it's static,
        > or by MX lookup if you don't control it).
        >
        > Eg.
        >
        > virtual_alias_maps file: (virtual_alias_domains uses the same by default)
        >
        > domain.tld OK

        Do NOT add the above line.

        > recip@... recip@...

        Yes, this is a correct entry for virtual_alias_maps.
      • Barney Desmond
        ... Yes, I probably should have qualified that for my own assumptions of the setup. But of course, without postconf -n we don t really know ;)
        Message 3 of 6 , May 5, 2009
        • 0 Attachment
          2009/5/6 Noel Jones <njones@...>:
          >> If domain.tld isn't already in
          >> virtual_alias_domains then you need to add it, as well as the mapping
          >> to extdomain.tld
          >
          > No, domain.tld must not be added to virtual_alias_domains if postfix already
          > accepts mail for that domain.  A domain must not be listed in more than one
          > address class.

          Yes, I probably should have qualified that for my own assumptions of
          the setup. But of course, without postconf -n we don't really know ;)
        • Rocco Scappatura
          Thanks Barney, thanks Noel, All works fine. Bye, rocsva
          Message 4 of 6 , May 6, 2009
          • 0 Attachment
            Thanks Barney, thanks Noel,

            All works fine.

            Bye,

            rocsva

            > -----Original Message-----
            > From: owner-postfix-users@... [mailto:owner-postfix-
            > users@...] On Behalf Of Barney Desmond
            > Sent: Wednesday, May 06, 2009 12:38 AM
            > To: postfix users list
            > Subject: Re: Redirect messages for just one recipient
            >
            > 2009/5/6 Noel Jones <njones@...>:
            > >> If domain.tld isn't already in
            > >> virtual_alias_domains then you need to add it, as well as the
            > mapping
            > >> to extdomain.tld
            > >
            > > No, domain.tld must not be added to virtual_alias_domains if postfix
            > already
            > > accepts mail for that domain.  A domain must not be listed in more
            > than one
            > > address class.
            >
            > Yes, I probably should have qualified that for my own assumptions of
            > the setup. But of course, without postconf -n we don't really know ;)
          Your message has been successfully submitted and would be delivered to recipients shortly.