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

Re: root-alias Problem

Expand Messages
  • Jeroen Geilman
    ... No, aliasing happens before mail is put on the queue, as is evident from the above entry (orig_to= ). The REAL issue is that mail is being sent (from
    Message 1 of 7 , May 27, 2011
      On 05/27/2011 02:54 PM, Peter H. Coffin wrote:
      > On Fri, May 27, 2011 at 09:14:54AM +0200, Finzel, Heiko wrote:
      >> Hi, I'm currently having some trouble setting up an alias for the root user on several Redhat machines.
      >>
      >> Although I the alias was set using newaliases and postalias and although postmap -q is telling me the alias is ok, postfix keeps sending root mails to "root@##MYORIGIN##".
      >>
      >> The following entry was added to the default entries (postmaster: root etc.) of the /etc/aliases:
      >>
      >> root: xxxx-admin@...
      >>
      >> It was mapped with "newaliases"/" postalias" and postfix was reloaded/restarted, then it was tested with "postmap -q root hash:/etc/aliases". But if the system is now actually sending mail to root (for example cron, but also mail send via "mailx"), it will still go to "root@##MYORIGIN##" and not to the one listed in /etc/aliases.
      >>
      >> > From the logs:
      >>
      >> May 26 15:15:52 ##### postfix/qmgr[22268]: 5B001895D: from=<root@##MYORIGIN##>, size=453, nrcpt=1 (queue active)
      >> May 26 15:15:52 ##### postfix/smtp[22736]: 5B001895D: to=<root@##MYORIGIN##>, orig_to=<root>, relay=mail. ##MYORIGIN## [###.###.###.###]:25, delay=0.28, delays=0.11/0.01/0.07/0.1, dsn=2.0.0, status=sent (250 Message accepted for delivery)
      > I think we're missing the rest of the log. This shows the mail being
      > accepted, but not where it's being delivered to. The alias processing
      > happens after that.

      No, aliasing happens before mail is put on the queue, as is evident from
      the above entry (orig_to=<root>).

      The REAL issue is that mail is being sent (from the system user root) to
      the unqualified address of the system user "root".

      The aliases in alias_database are applied to addresses whose domain is
      in $mydestination.

      However, the behaviour shown here is that he has append_at_myorigin set
      to yes, which transforms the unqualified address "root" to "root@$myorigin".

      If $myorigin is NOT in $mydestination (and it is obvious that it is not)
      then the shown behaviour is the result.


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