Salut tout le monde !
Je voulais m’installer mon propre serveur mail en suivant un tutorial d’isalo.
Par contre j’ai encore quelques problèmes.
Ressource : isalo.org/wiki.debian-fr/In … _Roundcube_avec_gestion_des_filtres_Imap_et_des_quotas
##################################################################
EDIT 5 :
For the warning in mail.info, it’s strange :
Remind - Aug 24 20:27:55 facteur postfix/smtpd[4095]: warning: hostname facteur.mydomain.tld does not resolve to address IPPUB_SRV
[code]root@facteur /home/facteur/mydomain.tld/test # nslookup facteur.mydomain.tld
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
Name: facteur.mydomain.tld
Address: IPPUB_SRV
root@facteur /home/facteur/mydomain.tld/test # nslookup facteur.mydomain.tld 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: facteur.mydomain.tld
Address: IPPUB_SRV
root@facteur /home/facteur/mydomain.tld/test # nslookup facteur.mydomain.tld 208.67.222.222
Server: 208.67.222.222
Address: 208.67.222.222#53
Non-authoritative answer:
Name: facteur.mydomain.tld
Address: IPPUB_SRV
root@facteur /home/facteur/mydomain.tld/test # host -t MX mydomain.tld
mydomain.tld mail is handled by 1 facteur.mydomain.tld.
dev@localhost ~$ ping facteur.mydomain.tld
PING facteur.mydomain.tld (IPPUB_SRV) 56(84) bytes of data.
64 bytes from static.XXXXXX (IPPUB_SRV): icmp_seq=1 ttl=47 time=56.4 ms
64 bytes from static.XXXXXX (IPPUB_SRV): icmp_seq=2 ttl=47 time=55.9 ms
^C
— facteur.myh ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 55.912/56.184/56.457/0.361 ms
dev@localhost ~$ ping mydomain.tld
PING mydomain.tld (IPPUB_SRV) 56(84) bytes of data.
64 bytes from static.XXXXXX (IPPUB_SRV): icmp_seq=1 ttl=47 time=56.0 ms
64 bytes from static.XXXXXX (IPPUB_SRV): icmp_seq=2 ttl=47 time=55.5 ms
^C
— mydomain.tld ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 55.527/55.772/56.018/0.340 ms[/code]
##################################################################
EDIT 4 :
I added the two next lines to main.cf (postfix):
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
And I have auth failed.
[code]root@facteur /home/facteur/mydomain.tld/test # telnet IPPUB_SRV 25
Trying IPPUB_SRV…
Connected to IPPUB_SRV.
Escape character is ‘^]’.
220 facteur.mydomain.tld ESMTP Postfix (Debian/GNU)
EHLO facteur.mydomain.tld
250-facteur.mydomain.tld
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH LOGIN dGVzdC5mcg==
334 UGFzc3dvcmQ6
dGVzdA==
535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6
quit
221 2.0.0 Bye
Connection closed by foreign host.
root@facteur /home/facteur/mydomain.tld/test # tail /var/log/mail.err
root@facteur /home/facteur/mydomain.tld/test # tail /var/log/mail.warn
Aug 24 20:27:11 facteur dovecot: master: Warning: Killed with signal 15 (by pid=4049 uid=0 code=kill)
Aug 24 20:27:55 facteur postfix/smtpd[4095]: warning: hostname facteur.mydomain.tld does not resolve to address IPPUB_SRV
Aug 24 20:28:34 facteur postfix/smtpd[4095]: warning: unknown[IPPUB_SRV]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Aug 24 20:28:58 facteur postfix/smtpd[4095]: warning: unknown[IPPUB_SRV]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
root@facteur /home/facteur/mydomain.tld/test # tail /var/log/mail.info
Aug 24 20:27:36 facteur postfix/pickup[4015]: E1448B23DA: uid=0 from=root@facteur.mydomain.tld
Aug 24 20:27:36 facteur postfix/cleanup[4081]: E1448B23DA: message-id=20140824182736.E1448B23DA@facteur.mydomain.tld
Aug 24 20:27:36 facteur postfix/qmgr[4016]: E1448B23DA: from=root@facteur.mydomain.tld, size=357, nrcpt=1 (queue active)
Aug 24 20:27:36 facteur postfix/pipe[4085]: E1448B23DA: to=test@mydomain.tld, relay=dovecot, delay=0.06, delays=0.02/0.01/0/0.03, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 24 20:27:36 facteur postfix/qmgr[4016]: E1448B23DA: removed
Aug 24 20:27:55 facteur postfix/smtpd[4095]: warning: hostname facteur.mydomain.tld does not resolve to address IPPUB_SRV
Aug 24 20:27:55 facteur postfix/smtpd[4095]: connect from unknown[IPPUB_SRV]
Aug 24 20:28:34 facteur postfix/smtpd[4095]: warning: unknown[IPPUB_SRV]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Aug 24 20:28:58 facteur postfix/smtpd[4095]: warning: unknown[IPPUB_SRV]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Aug 24 20:29:07 facteur postfix/smtpd[4095]: disconnect from unknown[IPPUB_SRV]
root@facteur /home/facteur/mydomain.tld/test # tail /var/log/dovecot-info.log
2014-08-24 20:07:52 auth-worker(3771): Info: mysql(127.0.0.1): Connected to database postfix
2014-08-24 20:07:52 lda(test@mydomain.tld): Info: msgid=20140824175017.9017CB238F@facteur.mydomain.tld: saved mail to INBOX
2014-08-24 20:08:33 lda(test@mydomain.tld): Info: msgid=20140824180833.B3665B23DA@facteur.mydomain.tld: saved mail to INBOX
2014-08-24 20:09:04 lda(test@mydomain.tld): Info: msgid=CABZtTbsUj_3PpmC8BRK1Se=EYzBUjMW_tXOXKHJRjB2FaD=R-w@mail.gmail.com: saved mail to INBOX
2014-08-24 20:11:04 auth-worker(3832): Info: mysql(127.0.0.1): Connected to database postfix
2014-08-24 20:11:04 lda(test1@mydomain.tld): Info: msgid=20140824181104.62900B238F@facteur.mydomain.tld: saved mail to INBOX
2014-08-24 20:11:58 lda(test2@mydomain.tld): Info: msgid=20140824181158.50CD8B238F@facteur.mydomain.tld: saved mail to INBOX
2014-08-24 20:27:11 master: Info: Dovecot v2.1.7 starting up (core dumps disabled)
2014-08-24 20:27:36 auth-worker(4089): Info: mysql(127.0.0.1): Connected to database postfix
2014-08-24 20:27:36 lda(test@mydomain.tld): Info: msgid=20140824182736.E1448B23DA@facteur.mydomain.tld: saved mail to INBOX
[/code]
##################################################################
EDIT 3 :
The auth login in telnet mode failed :
Trying IPPUB_SERV...
Connected to IPPUB_SERV.
Escape character is '^]'.
220 facteur.mydomain.tld ESMTP Postfix (Debian/GNU)
EHLO facteur.mydomain.tld
250-facteur.mydomain.tld
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH LOGIN dGVzdC5mcg==
334 UGFzc3dvcmQ6
dGVzdA==
535 5.7.8 Error: authentication failed: no mechanism available
##################################################################
EDIT 2 :
For this error, I forgot to install dovecot-mysql package :
Aug 24 19:50:17 facteur dovecot: auth: Fatal: Unknown database driver 'mysql'
sudo apt-get install dovecot-mysql
New test, and the output :
root@facteur ~ # echo test | mail -s "Premier test SMTP" test@mydomain.tld && tail -f /var/log/mail.info
Aug 24 19:58:03 facteur postfix/pickup[3635]: 3F999B23E1: uid=0 from=<root@facteur.mydomain.tld>
Aug 24 19:58:03 facteur postfix/cleanup[3697]: 3F999B23E1: message-id=<20140824175803.3F999B23E1@facteur.mydomain.tld>
Aug 24 19:58:03 facteur postfix/qmgr[3636]: 3F999B23E1: from=<root@facteur.mydomain.tld>, size=357, nrcpt=1 (queue active)
Aug 24 19:58:03 facteur postfix/pipe[3702]: 3F999B23E1: to=<test@mydomain.tld>, relay=dovecot, delay=0.09, delays=0.03/0.01/0/0.05, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 24 19:58:03 facteur postfix/qmgr[3636]: 3F999B23E1: removed
##################################################################
EDIT :
Now I have this result :
root@facteur ~ # echo test | mail -s "Premier test SMTP" test@mydomain.tld && tail -f /var/log/mail.info
Aug 24 19:50:17 facteur postfix/smtpd[3418]: connect from localhost.localdomain[127.0.0.1]
Aug 24 19:50:17 facteur postfix/smtpd[3418]: 9017CB238F: client=localhost.localdomain[127.0.0.1]
Aug 24 19:50:17 facteur postfix/cleanup[3425]: 9017CB238F: message-id=<20140824175017.9017CB238F@facteur.mydomain.tld>
Aug 24 19:50:17 facteur postfix/smtpd[3418]: disconnect from localhost.localdomain[127.0.0.1]
Aug 24 19:50:17 facteur postfix/qmgr[3271]: 9017CB238F: from=<admin@mydomain.tld>, size=491, nrcpt=1 (queue active)
Aug 24 19:50:17 facteur dovecot: auth: Fatal: Unknown database driver 'mysql'
Aug 24 19:50:17 facteur dovecot: master: Error: service(auth): command startup failed, throttling for 2 secs
Aug 24 19:50:17 facteur dovecot: lda: Error: userdb lookup(test@mydomain.tld): Disconnected unexpectedly
Aug 24 19:50:17 facteur dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information.
Aug 24 19:50:17 facteur postfix/pipe[3428]: 9017CB238F: to=<test@mydomain.tld>, relay=dovecot, delay=0.08, delays=0.02/0.01/0/0.05, dsn=4.3.0, status=deferred (temporary failure)
Aug 24 19:50:38 facteur postfix/pickup[3270]: 1FC7CB23DD: uid=0 from=<root@facteur.mydomain.tld>
Aug 24 19:50:38 facteur postfix/cleanup[3425]: 1FC7CB23DD: message-id=<20140824175038.1FC7CB23DD@facteur.mydomain.tld>
Aug 24 19:50:38 facteur postfix/qmgr[3271]: 1FC7CB23DD: from=<root@facteur.mydomain.tld>, size=357, nrcpt=1 (queue active)
Aug 24 19:50:38 facteur dovecot: auth: Fatal: Unknown database driver 'mysql'
Aug 24 19:50:38 facteur dovecot: master: Error: service(auth): command startup failed, throttling for 4 secs
Aug 24 19:50:38 facteur dovecot: lda: Error: userdb lookup(test@mydomain.tld): Disconnected unexpectedly
Aug 24 19:50:38 facteur dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information.
Aug 24 19:50:38 facteur postfix/pipe[3428]: 1FC7CB23DD: to=<test@mydomain.tld>, relay=dovecot, delay=0.02, delays=0.01/0/0/0.01, dsn=4.3.0, status=deferred (temporary failure)
##################################################################
Initial topic
#########################
####### Problems:
#########################
Logs warning :
Aug 24 19:01:23 facteur postfix/smtpd[3102]: warning: hostname facteur.mydomain.tld does not resolve to address IPPUB_SRV
Aug 24 19:01:23 facteur postfix/smtpd[3102]: connect from unknown[IPPUB_SRV]
Aug 24 19:01:46 facteur postfix/smtpd[3102]: warning: unknown[IPPUB_SRV]: SASL LOGIN authentication failed: no mechanism available
Aug 24 19:01:48 facteur postfix/smtpd[3102]: disconnect from unknown[IPPUB_SRV]
Send to internal : (KO)
[code]root@facteur ~ # echo test | mail -s “Premier test SMTP” essai@mydomain.tld && tail -f /var/log/mail.info
Aug 24 19:28:25 facteur postfix/pickup[3270]: 81FB1B23D7: uid=0 from=root@facteur.mydomain.tld
Aug 24 19:28:25 facteur postfix/cleanup[3380]: 81FB1B23D7: message-id=20140824172825.81FB1B23D7@facteur.mydomain.tld
Aug 24 19:28:25 facteur postfix/qmgr[3271]: 81FB1B23D7: from=root@facteur.mydomain.tld, size=358, nrcpt=1 (queue active)
Aug 24 19:28:25 facteur postfix/smtp[3385]: 81FB1B23D7: to=essai@mydomain.tld, relay=none, delay=0.05, delays=0.03/0.01/0.01/0, dsn=5.4.6, status=bounced (mail for mydomain.tld loops back to myself)
Aug 24 19:28:25 facteur postfix/cleanup[3380]: 8CA79B23D8: message-id=20140824172825.8CA79B23D8@facteur.mydomain.tld
Aug 24 19:28:25 facteur postfix/bounce[3386]: 81FB1B23D7: sender non-delivery notification: 8CA79B23D8
Aug 24 19:28:25 facteur postfix/qmgr[3271]: 8CA79B23D8: from=<>, size=2147, nrcpt=1 (queue active)
Aug 24 19:28:25 facteur postfix/qmgr[3271]: 81FB1B23D7: removed
Aug 24 19:28:25 facteur postfix/cleanup[3380]: 91E33B238F: message-id=20140824172825.8CA79B23D8@facteur.mydomain.tld
Aug 24 19:28:25 facteur postfix/local[3387]: 8CA79B23D8: to=root@facteur.mydomain.tld, relay=local, delay=0.03, delays=0.01/0.01/0/0.01, dsn=2.0.0, status=sent (forwarded as 91E33B238F)
Aug 24 19:28:25 facteur postfix/qmgr[3271]: 91E33B238F: from=<>, size=2285, nrcpt=1 (queue active)
Aug 24 19:28:25 facteur postfix/qmgr[3271]: 8CA79B23D8: removed
Aug 24 19:28:25 facteur postfix/smtp[3385]: 91E33B238F: to=admin@mydomain.tld, orig_to=root@facteur.mydomain.tld, relay=none, delay=0.01, delays=0.01/0.01/0/0, dsn=5.4.6, status=bounced (mail for mydomain.tld loops back to myself)
Aug 24 19:28:25 facteur postfix/qmgr[3271]: 91E33B238F: removed
[/code]
Send to external mailbox : (OK)
Aug 24 19:07:04 facteur postfix/master[2919]: terminating on signal 15
Aug 24 19:07:04 facteur postfix/master[3266]: daemon started -- version 2.9.6, configuration /etc/postfix
Aug 24 19:07:26 facteur postfix/pickup[3270]: 21544B23D7: uid=0 from=<root@facteur.mydomain.tld>
Aug 24 19:07:26 facteur postfix/cleanup[3291]: 21544B23D7: message-id=<20140824170726.21544B23D7@facteur.mydomain.tld>
Aug 24 19:07:26 facteur postfix/qmgr[3271]: 21544B23D7: from=<root@facteur.mydomain.tld>, size=364, nrcpt=1 (queue active)
Aug 24 19:07:26 facteur postfix/smtp[3296]: connect to gmail-smtp-in.l.google.com[2a00:1450:4013:c01::1b]:25: Network is unreachable
Aug 24 19:07:27 facteur postfix/smtp[3296]: 21544B23D7: to=<testmail_extern@gmail.com>, relay=gmail-smtp-in.l.google.com[173.194.65.26]:25, delay=1.2, delays=0.03/0.01/0.28/0.83, dsn=2.0.0, status=sent (250 2.0.0 OK 1408900047 bv2si52193866wjc.157 - gsmtp)
Aug 24 19:07:27 facteur postfix/qmgr[3271]: 21544B23D7: removed
When I try to connect with telnet :
[code]root@facteur ~ # telnet IPPUB_SRV 25
Trying IPPUB_SRV…
Connected to IPPUB_SRV.
Escape character is ‘^]’.
220 facteur.mydomain.tld ESMTP Postfix (Debian/GNU)
EHLO facteur.mydomain.tld
250-facteur.mydomain.tld
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH LOGIN ZXNzYWlAZXNzYWkub3Jn
334 UGFzc3dvcmQ6
ZXNzYWk=
535 5.7.8 Error: authentication failed: no mechanism available
quit
221 2.0.0 Bye
Connection closed by foreign host.[/code]
#########################
####### CONFIGURATIONS FILES
#########################
[code]root@facteur ~ # cat /etc/hosts
nameserver config
IPv4
127.0.0.1 localhost.localdomain localhost
127.0.1.1 facteur.mydomain.tld facteur
IPPUB_SERVER facteur.mydomain.tld facteur
IPv6
::1 localhost6.localdomain localhost6 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
root@facteur ~ # cat /etc/mailname
facteur.mydomain.tld
root@facteur ~ # cat /etc/hostname
facteur.mydomain.tld
root@facteur ~ # cat /etc/dovecot/dovecot.conf
OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.6 ext3
auth_mechanisms = plain login
listen = *, ::
disable_plaintext_auth = no
info_log_path = /var/log/dovecot-info.log
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/facteur/%d/%n:INDEX=/home/facteur/%d/%n/indexes
mail_privileged_group = mail
passdb {
args = /etc/dovecot/dovecot-mysql.conf
driver = sql
}
protocols = imap pop3
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-master {
mode = 0600
user = facteur
}
}
service imap-login {
chroot = login
inet_listener imap {
address = 127.0.0.1
port = 143
}
inet_listener imaps {
address = *
port = 993
}
service_count = 1
user = dovecot
}
service pop3-login {
chroot = login
service_count = 1
user = dovecot
}
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
args = /etc/dovecot/dovecot-mysql.conf
driver = sql
}
protocol lda {
auth_socket_path = /var/run/dovecot/auth-master
mail_plugin_dir = /usr/lib/dovecot/modules/lda
postmaster_address = admin@mydomain.tld
}
protocol imap {
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
}
root@facteur ~ # cat /etc/postfix/main.cf
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
delay_warning_time = 1h
dovecot_destination_recipient_limit = 1
inet_interfaces = all
mailbox_size_limit = 0
mydestination = facteur.mydomain.tld, localhost.mydomain.tld, , localhost, mail.mydomain.tld
myhostname = facteur.mydomain.tld
mynetworks = IPPUB_SRV/29 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relay_domains = mysql:/etc/postfix/mysql_relay_domains.cf
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:3000
virtual_mailbox_base = /home/facteur
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_transport = dovecot
virtual_uid_maps = static:3000
root@facteur ~ # dovecot -n
2.1.7: /etc/dovecot/dovecot.conf
OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.6 ext3
auth_mechanisms = plain login
disable_plaintext_auth = no
info_log_path = /var/log/dovecot-info.log
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/facteur/%d/%n:INDEX=/home/facteur/%d/%n/indexes
mail_privileged_group = mail
passdb {
args = /etc/dovecot/dovecot-mysql.conf
driver = sql
}
protocols = imap pop3
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-master {
mode = 0600
user = facteur
}
}
service imap-login {
chroot = login
inet_listener imap {
address = 127.0.0.1
port = 143
}
inet_listener imaps {
address = *
port = 993
}
service_count = 1
user = dovecot
}
service pop3-login {
chroot = login
service_count = 1
user = dovecot
}
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
args = /etc/dovecot/dovecot-mysql.conf
driver = sql
}
protocol lda {
auth_socket_path = /var/run/dovecot/auth-master
mail_plugin_dir = /usr/lib/dovecot/modules/lda
postmaster_address = admin@mydomain.tld
}
protocol imap {
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
}
root@facteur ~ # postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
delay_warning_time = 1h
dovecot_destination_recipient_limit = 1
inet_interfaces = all
mailbox_size_limit = 0
mydestination = facteur.mydomain.tld, localhost.mydomain.tld, , localhost, mail.mydomain.tld
myhostname = facteur.mydomain.tld
mynetworks = IPPUB_SRV/29 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relay_domains = mysql:/etc/postfix/mysql_relay_domains.cf
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:3000
virtual_mailbox_base = /home/facteur
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_transport = dovecot
virtual_uid_maps = static:3000[/code]
#########################
####### LOG
#########################
[code]
root@facteur ~ # cat /var/log/mail.info
Aug 24 18:59:59 facteur postfix/qmgr[2925]: D5037B23D7: removed
Aug 24 19:01:23 facteur postfix/smtpd[3102]: warning: hostname facteur.mydomain.tld does not resolve to address IPPUB_SRV
Aug 24 19:01:23 facteur postfix/smtpd[3102]: connect from unknown[IPPUB_SRV]
Aug 24 19:01:46 facteur postfix/smtpd[3102]: warning: unknown[IPPUB_SRV]: SASL LOGIN authentication failed: no mechanism available
Aug 24 19:01:48 facteur postfix/smtpd[3102]: disconnect from unknown[IPPUB_SRV]
Aug 24 19:07:04 facteur postfix/master[2919]: terminating on signal 15
Aug 24 19:07:04 facteur postfix/master[3266]: daemon started – version 2.9.6, configuration /etc/postfix
Aug 24 19:07:26 facteur postfix/pickup[3270]: 21544B23D7: uid=0 from=root@facteur.mydomain.tld
Aug 24 19:07:26 facteur postfix/cleanup[3291]: 21544B23D7: message-id=20140824170726.21544B23D7@facteur.mydomain.tld
Aug 24 19:07:26 facteur postfix/qmgr[3271]: 21544B23D7: from=root@facteur.mydomain.tld, size=364, nrcpt=1 (queue active)
Aug 24 19:07:26 facteur postfix/smtp[3296]: connect to gmail-smtp-in.l.google.com[2a00:1450:4013:c01::1b]:25: Network is unreachable
Aug 24 19:07:27 facteur postfix/smtp[3296]: 21544B23D7: to=testmail_extern@gmail.com, relay=gmail-smtp-in.l.google.com[173.194.65.26]:25, delay=1.2, delays=0.03/0.01/0.28/0.83, dsn=2.0.0, status=sent (250 2.0.0 OK 1408900047 bv2si52193866wjc.157 - gsmtp)
Aug 24 19:07:27 facteur postfix/qmgr[3271]: 21544B23D7: removed
Aug 24 19:07:36 facteur postfix/pickup[3270]: 841EAB23D7: uid=0 from=root@facteur.mydomain.tld
Aug 24 19:07:36 facteur postfix/cleanup[3291]: 841EAB23D7: message-id=20140824170736.841EAB23D7@facteur.mydomain.tld
Aug 24 19:07:36 facteur postfix/qmgr[3271]: 841EAB23D7: from=root@facteur.mydomain.tld, size=358, nrcpt=1 (queue active)
Aug 24 19:07:36 facteur postfix/smtp[3296]: 841EAB23D7: to=essai@mydomain.tld, relay=none, delay=0.02, delays=0.01/0/0.01/0, dsn=5.4.6, status=bounced (mail for mydomain.tld loops back to myself)
Aug 24 19:07:36 facteur postfix/cleanup[3291]: 892CFB23D8: message-id=20140824170736.892CFB23D8@facteur.mydomain.tld
Aug 24 19:07:36 facteur postfix/bounce[3302]: 841EAB23D7: sender non-delivery notification: 892CFB23D8
Aug 24 19:07:36 facteur postfix/qmgr[3271]: 892CFB23D8: from=<>, size=2147, nrcpt=1 (queue active)
Aug 24 19:07:36 facteur postfix/qmgr[3271]: 841EAB23D7: removed
Aug 24 19:07:36 facteur postfix/cleanup[3291]: 8CE2CB238F: message-id=20140824170736.892CFB23D8@facteur.mydomain.tld
Aug 24 19:07:36 facteur postfix/local[3304]: 892CFB23D8: to=root@facteur.mydomain.tld, relay=local, delay=0.02, delays=0.01/0.01/0/0.01, dsn=2.0.0, status=sent (forwarded as 8CE2CB238F)
Aug 24 19:07:36 facteur postfix/qmgr[3271]: 8CE2CB238F: from=<>, size=2285, nrcpt=1 (queue active)
Aug 24 19:07:36 facteur postfix/qmgr[3271]: 892CFB23D8: removed
Aug 24 19:07:36 facteur postfix/smtp[3296]: 8CE2CB238F: to=admin@mydomain.tld, orig_to=root@facteur.mydomain.tld, relay=none, delay=0.02, delays=0.02/0/0/0, dsn=5.4.6, status=bounced (mail for mydomain.tld loops back to myself)
Aug 24 19:07:36 facteur postfix/qmgr[3271]: 8CE2CB238F: removed
root@facteur ~ # cat /var/log/mail.err
root@facteur ~ # cat /var/log/dovecot-info.log
2014-08-24 17:49:20 imap-login: Info: Disconnected (disconnected before greeting, waited 0 secs): user=<>, rip=88.174.217.19, lip=IPPUB_SRV, TLS: SSL_read() failed: error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown: SSL alert number 46, session=<V3+DA2IBPgBYrtkT>
2014-08-24 17:49:22 imap-login: Info: Disconnected (disconnected before greeting, waited 0 secs): user=<>, rip=88.174.217.19, lip=IPPUB_SRV, TLS: SSL_read() failed: error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown: SSL alert number 46, session=
2014-08-24 18:06:08 master: Info: Dovecot v2.1.7 starting up (core dumps disabled)
2014-08-24 18:08:39 master: Info: Dovecot v2.1.7 starting up (core dumps disabled)
2014-08-24 18:37:08 master: Info: Dovecot v2.1.7 starting up (core dumps disabled)
2014-08-24 18:38:19 master: Info: Dovecot v2.1.7 starting up (core dumps disabled)
2014-08-24 18:47:16 pop3-login: Info: Disconnected: Auth process broken (disconnected before greeting, waited 0 secs): user=<>, rip=IPPUB_SRV, lip=IPPUB_SRV, secured, session=
2014-08-24 18:48:35 master: Info: Dovecot v2.1.7 starting up (core dumps disabled)
2014-08-24 18:49:34 pop3-login: Info: Disconnected: Auth process broken (disconnected before greeting, waited 0 secs): user=<>, rip=IPPUB_SRV, lip=IPPUB_SRV, secured, session=
2014-08-24 18:49:36 pop3-login: Info: Disconnected: Auth process broken (disconnected before greeting, waited 0 secs): user=<>, rip=IPPUB_SRV, lip=IPPUB_SRV, TLS handshaking, session=
2014-08-24 18:49:40 imap-login: Info: Disconnected: Auth process broken (disconnected before greeting, waited 0 secs): user=<>, rip=IPPUB_SRV, lip=IPPUB_SRV, TLS handshaking, session=<0ZFI22IBhABOL0Ts>
2014-08-24 18:58:13 master: Info: Dovecot v2.1.7 starting up (core dumps disabled)
root@facteur ~ # netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 2545/mysqld
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 2709/dovecot
tcp 0 0 127.0.0.1:143 0.0.0.0:* LISTEN 2709/dovecot
tcp 0 0 IPPUB_SRV:53 0.0.0.0:* LISTEN 2051/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 2051/named
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2618/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 3266/master
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 2051/named
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 2709/dovecot
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 2709/dovecot
tcp6 0 0 :::110 :::* LISTEN 2709/dovecot
tcp6 0 0 :::80 :::* LISTEN 2090/apache2
tcp6 0 0 :::53 :::* LISTEN 2051/named
tcp6 0 0 :::22 :::* LISTEN 2618/sshd
tcp6 0 0 :::25 :::* LISTEN 3266/master
tcp6 0 0 ::1:953 :::* LISTEN 2051/named
tcp6 0 0 :::443 :::* LISTEN 2090/apache2
tcp6 0 0 :::995 :::* LISTEN 2709/dovecot[/code]