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

293952Re: Local UNIX accounts, aliasing & rejecting mail to non-public UNIX accounts

Expand Messages
  • Jeroen Geilman
    Jun 21, 2013
    • 0 Attachment
      On 06/21/2013 09:57 PM, Craig R. Skinner wrote:
      > On 2013-06-19 Wed 21:09 PM |, Viktor Dukhovni wrote:
      >>> virtual_alias_maps.map:
      >>> user.name@... user1@localhost
      >>>
      >>> status=bounced (mail for localhost.example.com loops back to myself)
      >> You MUST include localhost.$mydomain in mydestination:
      >>
      >> mydestination = localhost.$mydomain
      >>
      >> Using virtual aliases to local accounts is the best approach.
      >>
      >
      > Thanks Viktor, this set up works with making the machines domain name
      > virtual for Postfix, accepting mail for pretty addresses & rejecting
      > remote mail for MOST Unix accounts, while accepting local mail to Unix
      > accounts, IF listed as virtual aliases (mutt, sendmail, cron,....):
      >
      >
      > main.cf:
      > myorigin = $mydomain
      > mydestination = localhost.$mydomain

      No. If the destination you use in virtual_alias_maps is @localhost, then
      THAT must be in mydestination.
      Postfix is quite literal.

      mydestination = localhost
      append_dot_mydomain = no

      Or, if you wish to follow Victor's advice, qualify all aliases with
      "@localhost.$mydomain" instead.
      But that's just more typing than I need.

      > virtual_alias_domains = btree:$config_directory/virtual_alias_domains.map

      > virtual_alias_domains.map:
      > example.com virtual

      Just specify it directly; this just complicates things for no reason.

      virtual_alias_domains = example.com

      > virtual_alias_maps.map:
      > # hack to accept mail for postmaster/abuse@[ip.add.ress.es]

      It's not a hack; it is documented behaviour.
      Also, omitting postmaster@* will not cause it to be rejected; this
      localpart is hardcoded to accept as per the RFCs.
      (You still have to alias it somewhere it can be delivered, of course)

      > postmaster postmaster@localhost
      > abuse postmaster@localhost
      > # example.com:
      > postmaster@... postmaster@localhost

      Superfluous, see above.

      > It seems the aliases file is not used.

      Of course it is used, for any destinations in $mydestination.
      You did not put "localhost" in $mydestination.

      --
      J.
    • Show all 37 messages in this topic