I can't get root mails delivered to other account

Discussion in 'HOWTO-Related Questions' started by killfrog, Oct 27, 2005.

  1. killfrog

    killfrog New Member

    After finally finishing all the tutorials and succeeded debugging my own mistakes, I have a nice server running, thanks to Falko's HOWTO.
    (The Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV) one)
    The only little problem I have found now is that I can't get the system messages that are by default delivered to root, to be forwarded to another account so I can check them out.
    Somewhere in the setup process, I was asked to input whom will get root mails.
    at the end of the process, all my server is receiving mail only to the virtual users, and it seems that the /etc/aliases file doesn't affect the local mail transfers, because there I see it says that root : [email protected].
    Meaning, [email protected] should get root mail, but it doesn't!
    How can I fix it up?
  2. Ovidiu

    Ovidiu Active Member

    falko helped me with this too, I had to exchange the "real" emailaddress with a local username, e.g. root: web7_postmaster this way it works fine. that was acceptable for me as I was using one of the users for my personal mail
  3. killfrog

    killfrog New Member


    I'm not sure I understood, you mean to open a real unix user account to get the root mail?
    Well, if it gets to work fine, I'll do it, perhaps there is a way to make the real account that gets the root mail to then forward it to a "Virtual" one on?
    Maybe using the /home/user/.forward file?
  4. killfrog

    killfrog New Member


    I tried that last one, it doesn't work, it seems all mail delivered to root is "swallowed" somewhere, I don't even see where the heck it is going!!!

    HOLD ON, I see now where is it going!
    in the mail.log it seems that all the mail transport related stuff in the server is managed by postfix, and thus, it keeps looking for "virtual" users, even when I use the shell command "mail -s test root" it tries to deliver it to [email protected], which, of course, doesn't exist in the virtuser table!
    I wouldn't like to add "root" as a virtual user, it will get a lot of spam, instead of only local messages!
    Help me out here!
    Last edited: Oct 28, 2005
  5. falko

    falko Super Moderator Howtoforge Staff

    The virtual domain you use ("mydomain.com"), does it also exist in $mydestinations, $myhostname or $mydomain in /etc/postfix/main.cf?
  6. killfrog

    killfrog New Member

    I don't have an entry for $mydomain...

    here's all the rest:
    $myhostname = mail.mydomain.com
    $mydestination = mail.mydomain.com, localhost, localhost.localdomain

    the virtual domain I use is mydomain.com, virtuser will be then [email protected].


Share This Page