OVH Community, votre nouvel espace communautaire.

PB : Posfix: alias vers domaine externe (user unknow)


r.carlier
27/03/2015, 14h45
Bonjour,
sur ma release 3, j'ai un probleme avec Postfix. :
J'ai un domaine "domaine.com", j'ai créé un alias (mail) test@mondomaine.com qui pointe vers mon_email@gmail.com
je recois une notification me disant que la boite test@domaine.com n'existe pas (user unknow)
Cela fonctionne bien si test@mondomaine.com pointe vers BAL_existante_en_local@mondomaine.com
Les requetes mySql s'execute bien. (j'ai tracé dans mysql)
Un "postmap -q test@domaine.com mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf" me retourne bien mon_email@gmail.com
Dans les log, je peu voir que Postfix recoit le mail, puis donne ca a amavis et SpamAssassin, puis apres ca finit sur dovecot... qui forcement repond que test@mondomaine.com ==> Unknow User

/etc/postfix/main.cf ('allégé' pour ne pas saturer le topic)
Code:
smtpd_recipient_restrictions = check_recipient_access mysql:/etc/postfix/sql/mysql_amavis_in.cf permit_mynetworks reject_unauth_destination permit_sasl_authenticated
#smtpd_relay_restrictions =check_recipient_access mysql:/etc/postfix/sql/mysql_amavis_in.cf, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
external_submission_restrictions=check_recipient_access mysql:/etc/postfix/sql/mysql_amavis_in.cf, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

virtual_mailbox_domains = mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf, mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
virtual_alias_maps = mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf, mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf, mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf, mysql:/etc/postfix/sql/mysql_virtual_mailing.cf
virtual_mailbox_base = /var/mail/vhosts
virtual_uid_maps = static:500
virtual_gid_maps = static:101
virtual_transport = dovecot

virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/sql/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
virtual_overquota_bounce = yes
transport_maps = hash:/etc/postfix/transport
maillog :
Code:
Mar 27 15:23:33 srvmail postfix/smtpd[25388]: connect from bas-X-78-X-X-1.fbx.proxad.net[78.X.X.1]
Mar 27 15:23:33 srvmail postfix/smtpd[25388]: warning: connect to Milter service inet:localhost:8891: Connection refused
Mar 27 15:23:33 srvmail postfix/smtpd[25388]: setting up TLS connection from bas-X-78-X-X-1.fbx.proxad.net[78.X.X.1]
Mar 27 15:23:34 srvmail postfix/smtpd[25388]: Anonymous TLS connection established from bas-X-78-X-X-1.fbx.proxad.net[78.X.X.1]: TLSv1 with cipher AES256-SHA (256/256 bits)
Mar 27 15:23:34 srvmail dovecot: auth: mysql: Connected to localhost (mail)
Mar 27 15:23:34 srvmail postfix/smtpd[25388]: NOQUEUE: filter: RCPT from bas-X-78-X-X-1.fbx.proxad.net[78.X.X.1]: : Recipient address triggers FILTER amavisfeed:[127.0.0.1]:10024; from= to= proto=ESMTP helo=
Mar 27 15:23:34 srvmail postfix/smtpd[25388]: 772B01071C2: client=bas-X-78-X-X-1.fbx.proxad.net[78.X.X.1], sasl_method=PLAIN, sasl_username=bal_existante@mondomaine.com
Mar 27 15:23:34 srvmail postfix/cleanup[25397]: 772B01071C2: message-id=<008201d06899$9c7199c0$d554cd40$@mondomaine.com>
Mar 27 15:23:34 srvmail postfix/qmgr[24607]: 772B01071C2: from=, size=2774, nrcpt=1 (queue active)
Mar 27 15:23:36 srvmail postfix/smtpd[25401]: connect from localhost.localdomain[127.0.0.1]
Mar 27 15:23:36 srvmail postfix/smtpd[25401]: 33E581071FE: client=localhost.localdomain[127.0.0.1]
Mar 27 15:23:36 srvmail postfix/cleanup[25397]: 33E581071FE: message-id=<008201d06899$9c7199c0$d554cd40$@mondomaine.com>
Mar 27 15:23:36 srvmail postfix/smtpd[25401]: disconnect from localhost.localdomain[127.0.0.1]
Mar 27 15:23:36 srvmail postfix/qmgr[24607]: 33E581071FE: from=, size=3226, nrcpt=1 (queue active)
Mar 27 15:23:36 srvmail amavis[3551]: (03551-09) Passed CLEAN {RelayedInbound}, [78.X.X.1]:11085 [78.X.X.1]  -> , Message-ID: <008201d06899$9c7199c0$d554cd40$@mondomaine.com>, mail_id: utwbel7LyIuY, Hits: -0.998, size: 2737, queued_as: 33E581071FE, 1499 ms
Mar 27 15:23:36 srvmail postfix/smtp[25398]: 772B01071C2: to=, relay=127.0.0.1[127.0.0.1]:10024, delay=1.8, delays=0.32/0.01/0/1.5, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 33E581071FE)
Mar 27 15:23:36 srvmail postfix/qmgr[24607]: 772B01071C2: removed
Mar 27 15:23:36 srvmail dovecot: auth: sql(alias@mondomaine.com): Unknown user
Mar 27 15:23:36 srvmail postfix/pipe[25402]: 33E581071FE: to=, relay=dovecot, delay=0.07, delays=0.03/0.01/0/0.04, dsn=5.1.1, status=bounced (user unknown)
Mar 27 15:23:36 srvmail postfix/cleanup[25397]: 459E6107203: message-id=<20150327142336.459E6107203@srvmail.mondomaine.com>
Mar 27 15:23:36 srvmail postfix/bounce[25404]: 33E581071FE: sender non-delivery notification: 459E6107203
Mar 27 15:23:36 srvmail postfix/qmgr[24607]: 459E6107203: from=<>, size=5068, nrcpt=1 (queue active)
Mar 27 15:23:36 srvmail postfix/qmgr[24607]: 33E581071FE: removed
Mar 27 15:23:36 srvmail dovecot: lda(bal_existante@mondomaine.com): sieve: msgid=<20150327142336.459E6107203@srvmail.mondomaine.com>: stored mail into mailbox 'INBOX'
Mar 27 15:23:36 srvmail dovecot: dict: mysql: Connected to localhost (mail)
Mar 27 15:23:36 srvmail postfix/pipe[25402]: 459E6107203: to=, relay=dovecot, delay=0.17, delays=0.03/0/0/0.14, dsn=2.0.0, status=sent (delivered via dovecot service)
Mar 27 15:23:36 srvmail postfix/qmgr[24607]: 459E6107203: removed
Mar 27 15:23:37 srvmail postfix/smtpd[25388]: disconnect from bas-X-78-X-X-1.fbx.proxad.net[78.X.X.1]
soit postfix ne recupere pas le destinataire @gmail.com et reste sur l'alias...
ET au final il le donne a dovedoc pour une distribution locale qui n'a aucune chance de fonctionner....

Une piste ???? est ce normal que postfix confie le mail a dovecot ou il aurait du le forwarder directement sur gmail ? ou est ce que c'est a dovecot de faire sortir le mail vers gmail.com ?

En vous remerciant.