Serveur mail Postfix, dovecot - Erreurs

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

:slightly_smiling:

##################################################################
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]

Salut !

Voici un petit update:

Summarize problems :

  • Warning resolv domain
  • Auth login refused
  • Clamav-daemon start failed
  • Mail not send

root@facteur /home/facteur/mydomain.tld/test/new # tail /var/log/mail.info Aug 24 22:17:07 facteur postfix/qmgr[4016]: 1187EB248E: from=<root@facteur.mydomain.tld>, size=360, nrcpt=1 (queue active) Aug 24 22:17:07 facteur postfix/qmgr[4016]: warning: connect to transport private/amavis: No such file or directory Aug 24 22:17:07 facteur postfix/qmgr[4016]: 2BB11B2490: from=<root@facteur.mydomain.tld>, size=368, nrcpt=1 (queue active) Aug 24 22:17:07 facteur postfix/error[6059]: 1187EB248E: to=<support@mydomain.tld>, relay=none, delay=593, delays=593/0.01/0/0, dsn=4.3.0, status=deferred (mail transport unavailable) Aug 24 22:17:07 facteur postfix/error[6059]: 2BB11B2490: to=<test@mydomain.tld>, relay=none, delay=587, delays=587/0.01/0/0, dsn=4.3.0, status=deferred (mail transport unavailable) Aug 24 22:18:50 facteur postfix/pickup[5889]: 3682EB2495: uid=0 from=<root@facteur.mydomain.tld> Aug 24 22:18:50 facteur postfix/cleanup[6090]: 3682EB2495: message-id=<20140824201850.3682EB2495@facteur.mydomain.tld> Aug 24 22:18:50 facteur postfix/qmgr[4016]: 3682EB2495: from=<root@facteur.mydomain.tld>, size=368, nrcpt=1 (queue active) Aug 24 22:18:50 facteur postfix/qmgr[4016]: warning: connect to transport private/amavis: No such file or directory Aug 24 22:18:50 facteur postfix/error[6092]: 3682EB2495: to=<test@mydomain.tld>, relay=none, delay=0.04, delays=0.03/0.01/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable)

root@facteur /home/facteur # service clamav-daemon restart [....] Stopping ClamAV daemon: clamdNo clamd found running; none killed. . ok [....] Starting ClamAV daemon: clamd Killed failed!

root@facteur /home/facteur # tail /var/log/clamav/clamav.log Sun Aug 24 21:53:35 2014 -> LOCAL: Unix socket file /var/run/clamav/clamd.ctl Sun Aug 24 21:53:35 2014 -> LOCAL: Setting connection queue length to 15 Sun Aug 24 21:53:35 2014 -> ERROR: daemonize() failed: Cannot allocate memory Sun Aug 24 21:53:35 2014 -> Socket file removed. Sun Aug 24 21:57:39 2014 -> +++ Started at Sun Aug 24 21:57:39 2014 Sun Aug 24 21:57:39 2014 -> clamd daemon 0.98.4 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64) Sun Aug 24 21:57:39 2014 -> Log file size limited to 4294967295 bytes. Sun Aug 24 21:57:39 2014 -> Reading databases from /var/lib/clamav Sun Aug 24 21:57:39 2014 -> Not loading PUA signatures. Sun Aug 24 21:57:39 2014 -> Bytecode: Security mode set to "TrustSigned".

strace start clamav-daemon service if you want.

root@facteur /home/facteur/mydomain.tld # tail /var/log/mail.warn Aug 24 22:07:08 facteur postfix/qmgr[4016]: warning: connect to transport private/amavis: No such file or directory

root@facteur /home/facteur/mydomain.tld # tail /var/log/clamav/freshclam.log Sun Aug 24 21:53:08 2014 -> -------------------------------------- Sun Aug 24 21:53:08 2014 -> ClamAV update process started at Sun Aug 24 21:53:08 2014 Sun Aug 24 21:53:15 2014 -> Downloading main.cvd [100%] Sun Aug 24 21:53:20 2014 -> main.cvd updated (version: 55, sigs: 2424225, f-level: 60, builder: neo) Sun Aug 24 21:53:23 2014 -> Downloading daily.cvd [100%] Sun Aug 24 21:53:25 2014 -> daily.cvd updated (version: 19306, sigs: 1093902, f-level: 63, builder: neo) Sun Aug 24 21:53:25 2014 -> Downloading bytecode.cvd [100%] Sun Aug 24 21:53:26 2014 -> bytecode.cvd updated (version: 242, sigs: 46, f-level: 63, builder: dgoddard) Sun Aug 24 21:53:28 2014 -> Database updated (3518173 signatures) from db.local.clamav.net (IP: 212.227.138.145) Sun Aug 24 21:53:28 2014 -> ERROR: NotifyClamd: Can't find or parse configuration file /etc/clamav/clamd.conf

[code]root@facteur /home/facteur/mydomain.tld # cat /etc/clamav/clamd.conf
#Automatically Generated by clamav-daemon postinst
#To reconfigure clamd run #dpkg-reconfigure clamav-daemon
#Please read /usr/share/doc/clamav-daemon/README.Debian.gz for details
LocalSocket /var/run/clamav/clamd.ctl
FixStaleSocket true
LocalSocketGroup clamav
LocalSocketMode 666

TemporaryDirectory is not set to its default /tmp here to make overriding

the default with environment variables TMPDIR/TMP/TEMP possible

User clamav
AllowSupplementaryGroups false
ScanMail true
ScanArchive true
ArchiveBlockEncrypted false
MaxDirectoryRecursion 15
FollowDirectorySymlinks false
FollowFileSymlinks false
ReadTimeout 180
MaxThreads 12
MaxConnectionQueueLength 15
LogSyslog false
LogRotate true
LogFacility LOG_LOCAL6
LogClean false
LogVerbose false
PidFile /var/run/clamav/clamd.pid
DatabaseDirectory /var/lib/clamav
OfficialDatabaseOnly false
SelfCheck 3600
Foreground false
Debug false
ScanPE true
MaxEmbeddedPE 10M
ScanOLE2 true
ScanPDF true
ScanHTML true
MaxHTMLNormalize 10M
MaxHTMLNoTags 2M
MaxScriptNormalize 5M
MaxZipTypeRcg 1M
ScanSWF true
DetectBrokenExecutables false
ExitOnOOM false
LeaveTemporaryFiles false
AlgorithmicDetection true
ScanELF true
IdleTimeout 30
CrossFilesystems true
PhishingSignatures true
PhishingScanURLs true
PhishingAlwaysBlockSSLMismatch false
PhishingAlwaysBlockCloak false
PartitionIntersection false
DetectPUA false
ScanPartialMessages false
HeuristicScanPrecedence false
StructuredDataDetection false
CommandReadTimeout 5
SendBufTimeout 200
MaxQueue 100
ExtendedDetectionInfo true
OLE2BlockMacros false
ScanOnAccess false
AllowAllMatchScan true
ForceToDisk false
DisableCertCheck false
DisableCache false
MaxScanSize 100M
MaxFileSize 25M
MaxRecursion 10
MaxFiles 10000
MaxPartitions 50
MaxIconsPE 100
StatsEnabled false
StatsPEDisabled true
StatsHostID auto
StatsTimeout 10
StreamMaxLength 25M
LogFile /var/log/clamav/clamav.log
LogTime true
LogFileUnlock false
LogFileMaxSize 0
Bytecode true
BytecodeSecurity TrustSigned
BytecodeTimeout 60000[/code]

Merci,

Tchuss

EDIT :

Problems are the same.

Just update configuration files :

root@facteur /home/facteur/mydomain.tld/test/new # grep -v -E "#" /etc/postfix/main.cf | grep -v -E "^$" 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 = IPPUBSERV/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 smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth content_filter = amavis:[127.0.0.1]:10024 receive_override_options = no_address_mappings

[code]root@facteur /home/facteur/mydomain.tld/test/new # grep -v -E “#” /etc/postfix/master.cf | grep -v -E "^$"
smtp inet n - - - - smtpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - - - - smtp
relay unix - - - - - smtp
showq unix n - - - - showq
error unix - - - - - error
retry unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
dovecot unix - n n - - pipe
flags=DRhu user=facteur:facteur argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes

127.0.0.1:10025 inet n - - - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_bind_address=127.0.0.1[/code]

[code]root@facteur /home/facteur/mydomain.tld/test/new # grep -v -E “#” /etc/amavis/conf.d/50-user | grep -v -E "^$"
use strict;

$final_spam_destiny = D_DISCARD;[/code]

root@facteur /home/facteur/mydomain.tld/test/new # grep -v -E "#" /etc/amavis/conf.d/15-content_filter_mode | grep -v -E "^$" use strict; @bypass_virus_checks_maps = ( \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re); @bypass_spam_checks_maps = ( \%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);