PDA

View Full Version : Postfix multi domains multi users problem


vertex2
8th March 2007, 12:06
I've setup everything according to the steps in "The perfect..." tutorial. then installed ISPconfig. I've been running one domain with no problem with multiple email users. I then added another domain and added a e-mail user to that domain. However, when i send to this new user the email gets forwarded to the administrator and doesnt arrive in the users mail box.

I've searched and checked through forums for days and haven't been able to find the solution.

Here is my main.cf file:


# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
#smtp_host_lookup = native,dns

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
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

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname=sourceline.co.za
mydomain=mail.sourceline.co.za
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin=/etc/mailname
mydestination=/etc/postfix/local-host-names
relay_domains=/etc/postfix/local-host-names
virtual_maps=hash:/etc/postfix/virtusertable
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = 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


and here are the log entries when trying to send to the newly created email ccount on the different domain:


Mar 8 05:03:32 sourceline postfix/smtpd[9787]: connect from dsl-241-45-200.telkomadsl.co.za[41.241.45.200]
Mar 8 05:03:34 sourceline postfix/smtpd[9787]: 812B7C06F7: client=dsl-241-45-200.telkomadsl.co.za[41.241.45.200], sasl_method=LOGIN, sasl_username=web2_vertex
Mar 8 05:03:36 sourceline postfix/cleanup[9788]: 812B7C06F7: message-id=<00f501c76168$f2dea8c0$d89bfa40$@co.za>
Mar 8 05:03:36 sourceline postfix/qmgr[9444]: 812B7C06F7: from=<mare@sourceline.co.za>, size=2676, nrcpt=1 (queue active)
Mar 8 05:03:36 sourceline postfix/cleanup[9788]: 7522CC07DD: message-id=<00f501c76168$f2dea8c0$d89bfa40$@co.za>
Mar 8 05:03:36 sourceline postfix/qmgr[9444]: 7522CC07DD: from=<mare@sourceline.co.za>, size=2815, nrcpt=1 (queue active)
Mar 8 05:03:36 sourceline postfix/local[9789]: 812B7C06F7: to=<web2_admin@sourceline.co.za>, orig_to=<info@cptbff.co.za>, relay=local, delay=2, status=sent (forwarded as 7522CC07DD)
Mar 8 05:03:36 sourceline postfix/qmgr[9444]: 812B7C06F7: removed
Mar 8 05:03:36 sourceline postfix/pickup[9443]: 86898C0881: uid=10023 from=<web2_vertex>
Mar 8 05:03:36 sourceline postfix/cleanup[9788]: 86898C0881: message-id=<20070308100336.86898C0881@sourceline.co.za>
Mar 8 05:03:36 sourceline postfix/local[9790]: 7522CC07DD: to=<web2_vertex@sourceline.co.za>, orig_to=<info@cptbff.co.za>, relay=local, delay=0, status=sent (delivered to command: /usr/bin/procmail -f-)
Mar 8 05:03:36 sourceline postfix/qmgr[9444]: 7522CC07DD: removed
Mar 8 05:03:36 sourceline postfix/qmgr[9444]: 86898C0881: from=<web2_vertex@sourceline.co.za>, size=385, nrcpt=1 (queue active)
Mar 8 05:03:36 sourceline postfix/local[9789]: 86898C0881: to=<admispconfig@localhost.localdomain>, relay=local, delay=0, status=sent (delivered to command: /usr/bin/procmail -f-)
Mar 8 05:03:36 sourceline postfix/qmgr[9444]: 86898C0881: removed



any help would be much appreciated, totally stumped.

till
8th March 2007, 12:45
Please have a look here:

http://www.howtoforge.com/faq/9_33_en.html

vertex2
8th March 2007, 12:57
Thanks for the response till.

I've changed my main.cf file to the following:


# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
#smtp_host_lookup = native,dns

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
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

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

#myhostname=sourceline.co.za
myhostname=localhost
mydomain=localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin=/etc/mailname
mydestination=/etc/postfix/local-host-names
relay_domains=/etc/postfix/local-host-names
virtual_maps=hash:/etc/postfix/virtusertable
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = 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



but still getting the exact same thing, any other suggestions?

vertex2
9th March 2007, 08:30
Anybody have any ideas or suggestions?

till
9th March 2007, 12:16
Is this correct: web2_vertex shall get the email but the email appears in the mailbox of web2_admin?

vertex2
9th March 2007, 12:23
The email is being sent to info@cptbff.co.za which is username: web9_info (the intended user). It doesnt go into the web9_info account but is instead forwarded to web2_admin (then to web2_vertex due to me having a forward on all admin emails to me)

till
9th March 2007, 12:29
If you added a forward, the behaviour of your system is correct. Whats the problem then?

1) You added a forward.
2) This forward is working properly as the mail is forwarded from account 1 to account 2.

By the way, you changed myhostname and mydomain in main.cf to localhost, thats a really bad idea as all external mailservers will deny your mail. What you need is a technical domain as described in the FAQ I posted above.

vertex2
9th March 2007, 12:36
I think you may be misunderstanding me, here is what is happening:

1. mail is being sent to info@cptbff.co.za which is user web9_info
2. the mail doesnt go into the web9_info mailbox and there is no forward defined for this email user
3. the mail is being forwarded to admin@sourceline.co.za for no apparent reason (this is the admin user on the system i.e admin box checked).
4. I have a forward on the admin user that forwards all mail to my account therefore at this point it is behaving correctly but admin should have never gotten the email to begin with

I realise the mydomain myhostname config is badd currently but until i get this going i'm not too worried.

till
9th March 2007, 12:39
Has web9_admin catchall enabled? If yes, the reason for this behavour is fixed by following the advice in the FAQ.

vertex2
9th March 2007, 13:45
I'm not sure i understand, web9_admin does have catchall enabled but never sees the email. I've followed the advice in the faq as per my post above. Still the same thing happens. Are you refering to another faq?

falko
9th March 2007, 17:07
3. the mail is being forwarded to admin@sourceline.co.za for no apparent reason (this is the admin user on the system i.e admin box checked).

Is sourceline.co.za the hostname of the server, and do you have a web site with that name?
Does this admin user have a catchAll account?
What's the output of telnet localhost 25?

vertex2
12th March 2007, 09:31
sourceline.co.za is the hostname of the server. There is a website with that name on the server too and the admin user does have a catchall.

Here is the output of telnet localhost 25


Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 sourceline.co.za ESMTP Postfix (Ubuntu)

vertex2
12th March 2007, 11:46
Ok, i've made a few changes but still get the same problem.

telnet localhost 25


Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 main.sourceline.co.za ESMTP Postfix (Ubuntu)



/etc/postfix/main.conf

FQDN = main.sourceline.co.za
myhostname = main.sourceline.co.za
mydomain = main.sourceline.co.za

main.sourceline.co.za is not a virtual domain or used for anything else.

falko
13th March 2007, 19:39
Take a look here: http://www.howtoforge.com/faq/9_33_en.html