email redirection problem

Discussion in 'Installation/Configuration' started by the_spy, May 20, 2007.

  1. the_spy

    the_spy New Member

    with the current stable ispconfig + debian etch with postfix,

    I have for example 2 domains, domain1.com and domain2.com configured in ispconfig
    both of them have an administrator user, web1_webmaster and web2_webmaster, which correspond also to [email protected] and [email protected]
    I have named the server my.ispconfig-server.com in log lines

    In all cases I'm sending the test emails from an external email with an external smtp server to make the situation real.
    And of course I setup the redirections in the ISPConfig panel.

    - first case, without any redirection:
    both email accounts are working great. it's ok

    - second case, I redirect [email protected] to an external email, for example to a gmail account [email protected] :
    the redirection works great. it's ok

    - third case, here is the problem, I redirect [email protected] to [email protected] , so both domains are on the same server here:
    the redirection is not working.


    here is the syslog lines when it works (second case):
    Code:
    May 20 22:38:44 server postfix/smtpd[25134]: connect from smtp3-g19.free.fr[i.p.address]
    May 20 22:38:44 server postfix/smtpd[25134]: A54854A05F2: client=smtp3-g19.free.fr[i.p.address]
    May 20 22:38:44 server postfix/cleanup[25137]: A54854A05F2: message-id=<[email protected]>
    May 20 22:38:44 server postfix/qmgr[6151]: A54854A05F2: from=<[email protected]>, size=756, nrcpt=1 (queue active)
    May 20 22:38:44 server postfix/smtpd[25134]: disconnect from smtp3-g19.free.fr[i.p.address]
    May 20 22:38:44 server postfix/cleanup[25137]: B52F84A05F3: message-id=<[email protected]>
    May 20 22:38:44 server postfix/qmgr[6151]: B52F84A05F3: from=<[email protected]>, size=911, nrcpt=1 (queue active)
    May 20 22:38:44 server postfix/local[25139]: A54854A05F2: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=0, status=sent (forwarded as B52F84A05F3)
    May 20 22:38:44 server postfix/qmgr[6151]: A54854A05F2: removed
    May 20 22:38:45 server postfix/smtp[25140]: B52F84A05F3: to=<[email protected]>, orig_to=<[email protected]>, relay=mail.gmail.com[i.p.address], delay=1, status=sent (250 Ok: queued as 1178E6B8DBC)
    May 20 22:38:45 server postfix/qmgr[6151]: B52F84A05F3: removed
    compared to the syslog lines when it don't work (third case):
    Code:
    May 20 22:49:38 server postfix/smtpd[25539]: connect from smtp3-g19.free.fr[i.p.address]
    May 20 22:49:38 server postfix/smtpd[25539]: B74894A05F2: client=smtp3-g19.free.fr[i.p.address]
    May 20 22:49:38 server postfix/cleanup[25540]: B74894A05F2: message-id=<[email protected]>
    May 20 22:49:38 server postfix/qmgr[6151]: B74894A05F2: from=<[email protected]>, size=758, nrcpt=1 (queue active)
    May 20 22:49:38 server postfix/smtpd[25539]: disconnect from smtp3-g19.free.fr[i.p.address]
    May 20 22:49:38 server postfix/local[25541]: B74894A05F2: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=0, status=sent (delivered to command: procmail -a "$EXTENSION")
    May 20 22:49:38 server postfix/qmgr[6151]: B74894A05F2: removed
    
    you can easily see here the difference here. it seems that in the third case when both domains are on the same server, the email is directly sent to the root email instead of getting to the right user and redirected like in the second case.


    Thanks
     
    Last edited: May 20, 2007
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. the_spy

    the_spy New Member

    I think I have found where the root emails go,

    in the file /var/mail/nobody

    there is no postfix email error, just the email I should have received in [email protected], and some root cron mails, so I think it's the root mailbox.

    I have never changed the /etc/aliases file, here is the content:

    do you think I should remove these lines, particulary the line "webmaster: root" ?

    in /etc/postfix/virtusertable yes I have the 2 lines which correspond to [email protected] and [email protected] :

    and in the .forward file of web1 I have the right redirection email where it should send:


    here is the postfix main.cf I have:

    I have also tried to force the user in the email, I mean sending an email to [email protected] instead of [email protected], but the problem is the same.
     
    Last edited: May 21, 2007
  4. the_spy

    the_spy New Member

    I answer to myself, the problem was here !
    I removed this line and regenerated the aliases.db file with newaliases command,

    and now the redirection is working :)

    Thanks till
     

Share This Page