#1  
Old 21st May 2007, 00:08
the_spy the_spy is offline
Member
 
Join Date: May 2007
Posts: 91
Thanks: 20
Thanked 6 Times in 6 Posts
Default email redirection problem

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 webmaster@domain1.com and webmaster@domain2.com
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 webmaster@domain1.com to an external email, for example to a gmail account blabla@gmail.com :
the redirection works great. it's ok

- third case, here is the problem, I redirect webmaster@domain1.com to webmaster@domain2.com , 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=<4650B224.2040709@externaldomain.com>
May 20 22:38:44 server postfix/qmgr[6151]: A54854A05F2: from=<user@externaldomain.com>, 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=<4650B224.2040709@externaldomain.com>
May 20 22:38:44 server postfix/qmgr[6151]: B52F84A05F3: from=<user@externaldomain.com>, size=911, nrcpt=1 (queue active)
May 20 22:38:44 server postfix/local[25139]: A54854A05F2: to=<web1_webmaster@my.ispconfig-server.com>, orig_to=<webmaster@domain1.com>, 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=<blabla@gmail.com>, orig_to=<webmaster@domain1.com>, 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=<4650B4B2.9080800@externaldomain.com>
May 20 22:49:38 server postfix/qmgr[6151]: B74894A05F2: from=<user@externaldomain.com>, 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=<root@my.ispconfig-server.com>, orig_to=<webmaster@domain1.com>, 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 by the_spy; 21st May 2007 at 00:11.
Reply With Quote
Sponsored Links
  #2  
Old 21st May 2007, 10:52
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

Please check the root mailbox, does the email contain any postfix error messages? Please check your postfix alias file, maybe you have a redirect for webmaster accounts to root there.

Is the email address webmaster@domain1.com listed in the file /etc/postfix/virtusertable with the correct mailbox user?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
the_spy (21st May 2007)
  #3  
Old 21st May 2007, 11:21
the_spy the_spy is offline
Member
 
Join Date: May 2007
Posts: 91
Thanks: 20
Thanked 6 Times in 6 Posts
Default

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 webmaster@domain2.com, 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:

Quote:
server:~# cat /etc/aliases
# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
server:~#
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 webmaster@domain1.com and webmaster@domain2.com :

Quote:
[...]
webmaster@domain1.com web1_webmaster
[...]
webmaster@domain2.net web2_webmaster
and in the .forward file of web1 I have the right redirection email where it should send:

Quote:
server:~# cat /var/www/web1/.forward
webmaster@domain2.net

here is the postfix main.cf I have:

Quote:
server:/etc/postfix# cat main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

myhostname = my.ispconfig-server.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = my.ispconfig-server.com, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

header_checks = regexp:/etc/postfix/header_checks
body_checks = regexp:/etc/postfix/body_checks

virtual_maps = hash:/etc/postfix/virtusertable

mydestination = /etc/postfix/local-host-names
smtp_bind_address = m.y.ip.address
disable_vrfy_command = yes
message_size_limit = 40960000

relay_domains = a-friend-domain.com
I have also tried to force the user in the email, I mean sending an email to web1_webmaster@domain1.com instead of webmaster@domain1.com, but the problem is the same.

Last edited by the_spy; 21st May 2007 at 11:24.
Reply With Quote
  #4  
Old 21st May 2007, 11:33
the_spy the_spy is offline
Member
 
Join Date: May 2007
Posts: 91
Thanks: 20
Thanked 6 Times in 6 Posts
 
Default

Quote:
do you think I should remove these lines, particulary the line "webmaster: root" ?
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
Reply With Quote
The Following User Says Thank You to the_spy For This Useful Post:
mtuser (9th July 2007)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange email problem for one of my domains... any help appreciated paulrobert_a Installation/Configuration 5 9th August 2010 15:15
Postfix Email Delivery Problem sedat1903 HOWTO-Related Questions 2 22nd December 2008 12:19
Weird problem when sending email from a PHP form. edge Installation/Configuration 5 5th September 2006 17:57
Problem with 'CC' & 'BCC' email not being delivered. snowfly HOWTO-Related Questions 10 20th July 2006 13:36
ISPConfig 2.2.0 problem with email addresses DataJet General 1 29th March 2006 14:29


All times are GMT +2. The time now is 19:02.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.