Guta
15th November 2008, 19:17
Hi all,
I have a Linode box (for those that don't know it, it's a VPS). I installed Ubuntu 8 and ISPConfig 2 using the tutorials on howtoforge.
I'm using Postfix to handle my emails. I have set with ISPConfig 6 different domains. Each domain has a user and an email address configured. But for some reason, when sending emails directly to any of those domains, all emails are redirected to the first domain I set with ISPConfig.
It seems to me that there's a problem with virtual users and domains... but i'm knew to Linux so...
Here are my Postfix config files:
MAIN.CF
# 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
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
readme_directory = no
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_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 = server1.guta.fr
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = server1.guta.fr, localhost.guta.fr, , localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
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_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
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
virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names
VIRTUSERTABLE
###################################
#
# ISPConfig virtusertable Configuration File
# Version 1.0
#
###################################
contact@www.guta.fr web1_guta
web1_guta@www.guta.fr web1_guta
@www.guta.fr web1_guta
contact@guta.fr web1_guta
web1_guta@guta.fr web1_guta
@guta.fr web1_guta
contact@server1.guta.fr web1_guta
web1_guta@server1.guta.fr web1_guta
@server1.guta.fr web1_guta
contact@www.thomasbernier.com web2_thomas
web2_thomas@www.thomasbernier.com web2_thomas
@www.thomasbernier.com web2_thomas
contact@thomasbernier.com web2_thomas
web2_thomas@thomasbernier.com web2_thomas
@thomasbernier.com web2_thomas
contact@www.mystreaminglinks.com web3_mystreaminglinks
web3_mystreaminglinks@www.mystreaminglinks.com web3_mystreaminglinks
@www.mystreaminglinks.com web3_mystreaminglinks
contact@mystreaminglinks.com web3_mystreaminglinks
web3_mystreaminglinks@mystreaminglinks.com web3_mystreaminglinks
@mystreaminglinks.com web3_mystreaminglinks
contact@www.lerepitenchante.fr web5_mjthenoz
web5_mjthenoz@www.lerepitenchante.fr web5_mjthenoz
@www.lerepitenchante.fr web5_mjthenoz
contact@lerepitenchante.fr web5_mjthenoz
web5_mjthenoz@lerepitenchante.fr web5_mjthenoz
@lerepitenchante.fr web5_mjthenoz
jeane@www.bernierconsulting.com web6_admin
web6_admin@www.bernierconsulting.com web6_admin
@www.bernierconsulting.com web6_admin
jeane@bernierconsulting.com web6_admin
web6_admin@bernierconsulting.com web6_admin
@bernierconsulting.com web6_admin
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
LOCAL-HOST-NAMES
###################################
#
# ISPConfig local-host-names Configuration File
# Version 1.0
#
###################################
localhost
server1.guta.fr
localhost.server1.guta.fr
localhost.guta.fr
localhost.localdomain
www.guta.fr
www.thomasbernier.com
www.mystreaminglinks.com
www.lerepitenchante.fr
www.bernierconsulting.com
guta.fr
thomasbernier.com
mystreaminglinks.com
lerepitenchante.fr
bernierconsulting.com
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
Ok that's for the config files. Now the mail logs:
Nov 15 11:53:26 server1 postfix/cleanup[16439]: BC56E105D6: message-id=<7a7a61db0811150853n2b5ebb30p302165283e711194@mail. gmail.com>
Nov 15 11:53:26 server1 postfix/local[16457]: 4EFA8FFC0: to=<web1_guta@server1.guta.fr>, orig_to=<jeane@bernierconsulting.com>, relay=local, delay=2.5, delays=0.26/0/0/2.3, dsn=2.0.0, status=sent (forwarded as BC56E105D6)
Nov 15 11:53:26 server1 postfix/qmgr[16368]: BC56E105D6: from=<gustave.bernier@gmail.com>, size=2235, nrcpt=1 (queue active)
Nov 15 11:53:26 server1 postfix/qmgr[16368]: 4EFA8FFC0: removed
Nov 15 11:53:28 server1 postfix/smtp[16472]: BC56E105D6: to=<gustave.bernier@gmail.com>, orig_to=<jeane@bernierconsulting.com>, relay=gmail-smtp-in.l.google.com[209.85.217.181]:25, delay=1.6, delays=0/0/0.08/1.5, dsn=2.0.0, status=sent (250 2.0.0 OK 1226768008 6si4623215gxk.87)
Nov 15 11:53:28 server1 postfix/qmgr[16368]: BC56E105D6: removed
Nov 15 11:53:54 server1 postfix/smtpd[16434]: disconnect from wa-out-1112.google.com[209.85.146.178]
The log above is for a mail I sent to jeane@bernierconsulting.com. On the log we can see that postfix assumes this email address is to web1_guta@server1.guta.fr and then uses the configuration for the user web1_guta instead of using the one for web6_admin. I don't know if this is normal or not, but the thing is that it doesn't work properly.
Well that's all folks, if you need anymore info to go through this issue let me know.
Thanks!
I have a Linode box (for those that don't know it, it's a VPS). I installed Ubuntu 8 and ISPConfig 2 using the tutorials on howtoforge.
I'm using Postfix to handle my emails. I have set with ISPConfig 6 different domains. Each domain has a user and an email address configured. But for some reason, when sending emails directly to any of those domains, all emails are redirected to the first domain I set with ISPConfig.
It seems to me that there's a problem with virtual users and domains... but i'm knew to Linux so...
Here are my Postfix config files:
MAIN.CF
# 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
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
readme_directory = no
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_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 = server1.guta.fr
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = server1.guta.fr, localhost.guta.fr, , localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
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_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
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
virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names
VIRTUSERTABLE
###################################
#
# ISPConfig virtusertable Configuration File
# Version 1.0
#
###################################
contact@www.guta.fr web1_guta
web1_guta@www.guta.fr web1_guta
@www.guta.fr web1_guta
contact@guta.fr web1_guta
web1_guta@guta.fr web1_guta
@guta.fr web1_guta
contact@server1.guta.fr web1_guta
web1_guta@server1.guta.fr web1_guta
@server1.guta.fr web1_guta
contact@www.thomasbernier.com web2_thomas
web2_thomas@www.thomasbernier.com web2_thomas
@www.thomasbernier.com web2_thomas
contact@thomasbernier.com web2_thomas
web2_thomas@thomasbernier.com web2_thomas
@thomasbernier.com web2_thomas
contact@www.mystreaminglinks.com web3_mystreaminglinks
web3_mystreaminglinks@www.mystreaminglinks.com web3_mystreaminglinks
@www.mystreaminglinks.com web3_mystreaminglinks
contact@mystreaminglinks.com web3_mystreaminglinks
web3_mystreaminglinks@mystreaminglinks.com web3_mystreaminglinks
@mystreaminglinks.com web3_mystreaminglinks
contact@www.lerepitenchante.fr web5_mjthenoz
web5_mjthenoz@www.lerepitenchante.fr web5_mjthenoz
@www.lerepitenchante.fr web5_mjthenoz
contact@lerepitenchante.fr web5_mjthenoz
web5_mjthenoz@lerepitenchante.fr web5_mjthenoz
@lerepitenchante.fr web5_mjthenoz
jeane@www.bernierconsulting.com web6_admin
web6_admin@www.bernierconsulting.com web6_admin
@www.bernierconsulting.com web6_admin
jeane@bernierconsulting.com web6_admin
web6_admin@bernierconsulting.com web6_admin
@bernierconsulting.com web6_admin
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
LOCAL-HOST-NAMES
###################################
#
# ISPConfig local-host-names Configuration File
# Version 1.0
#
###################################
localhost
server1.guta.fr
localhost.server1.guta.fr
localhost.guta.fr
localhost.localdomain
www.guta.fr
www.thomasbernier.com
www.mystreaminglinks.com
www.lerepitenchante.fr
www.bernierconsulting.com
guta.fr
thomasbernier.com
mystreaminglinks.com
lerepitenchante.fr
bernierconsulting.com
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
Ok that's for the config files. Now the mail logs:
Nov 15 11:53:26 server1 postfix/cleanup[16439]: BC56E105D6: message-id=<7a7a61db0811150853n2b5ebb30p302165283e711194@mail. gmail.com>
Nov 15 11:53:26 server1 postfix/local[16457]: 4EFA8FFC0: to=<web1_guta@server1.guta.fr>, orig_to=<jeane@bernierconsulting.com>, relay=local, delay=2.5, delays=0.26/0/0/2.3, dsn=2.0.0, status=sent (forwarded as BC56E105D6)
Nov 15 11:53:26 server1 postfix/qmgr[16368]: BC56E105D6: from=<gustave.bernier@gmail.com>, size=2235, nrcpt=1 (queue active)
Nov 15 11:53:26 server1 postfix/qmgr[16368]: 4EFA8FFC0: removed
Nov 15 11:53:28 server1 postfix/smtp[16472]: BC56E105D6: to=<gustave.bernier@gmail.com>, orig_to=<jeane@bernierconsulting.com>, relay=gmail-smtp-in.l.google.com[209.85.217.181]:25, delay=1.6, delays=0/0/0.08/1.5, dsn=2.0.0, status=sent (250 2.0.0 OK 1226768008 6si4623215gxk.87)
Nov 15 11:53:28 server1 postfix/qmgr[16368]: BC56E105D6: removed
Nov 15 11:53:54 server1 postfix/smtpd[16434]: disconnect from wa-out-1112.google.com[209.85.146.178]
The log above is for a mail I sent to jeane@bernierconsulting.com. On the log we can see that postfix assumes this email address is to web1_guta@server1.guta.fr and then uses the configuration for the user web1_guta instead of using the one for web6_admin. I don't know if this is normal or not, but the thing is that it doesn't work properly.
Well that's all folks, if you need anymore info to go through this issue let me know.
Thanks!