Postfix status=bounced (mail for loops back to myself)

Bonjour,

J’ai un (gros) problème avec Postfix. J’ai le fameux message d’erreur :

Ca fait 4 heures que j’essaie pas mal de solutions et rien n’y fait… J’ai même essayé une résinstallation avec autoremove --purge … Toujours pareil.

Voici un extrait de mail.log lorsque j’envoie un email de admin@example.com (via Telnet) :

Sep 26 19:01:18 tifc-webserver postfix/smtpd[14888]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Sep 26 19:01:18 tifc-webserver postfix/smtpd[14888]: connect from localhost[127.0.0.1] Sep 26 19:01:57 tifc-webserver postfix/smtpd[14888]: 2B2CFD80058: client=localhost[127.0.0.1] Sep 26 19:02:06 tifc-webserver postfix/cleanup[14891]: 2B2CFD80058: message-id=<20120926170157.2B2CFD80058@tifc-webserver.localdomain> Sep 26 19:02:06 tifc-webserver postfix/qmgr[14884]: 2B2CFD80058: from=<postmaster@example.com>, size=493, nrcpt=1 (queue active) Sep 26 19:02:06 tifc-webserver postfix/smtp[14892]: 2B2CFD80058: to=<admin@example.com>, relay=none, delay=17, delays=17/0.01/0/0, dsn=5.4.6, status=bounced (mail for example.com loops back to myself) Sep 26 19:02:06 tifc-webserver postfix/cleanup[14891]: 863EBD8005C: message-id=<20120926170206.863EBD8005C@tifc-webserver.localdomain> Sep 26 19:02:06 tifc-webserver postfix/bounce[14893]: 2B2CFD80058: sender non-delivery notification: 863EBD8005C Sep 26 19:02:06 tifc-webserver postfix/qmgr[14884]: 863EBD8005C: from=<>, size=2441, nrcpt=1 (queue active) Sep 26 19:02:06 tifc-webserver postfix/qmgr[14884]: 2B2CFD80058: removed Sep 26 19:02:06 tifc-webserver postfix/smtp[14892]: 863EBD8005C: to=<postmaster@example.com>, relay=none, delay=0.01, delays=0.01/0/0/0, dsn=5.4.6, status=bounced (mail for example.com loops back to myself) Sep 26 19:02:06 tifc-webserver postfix/qmgr[14884]: 863EBD8005C: removed Sep 26 19:02:12 tifc-webserver postfix/smtpd[14888]: disconnect from localhost[127.0.0.1]

Et voici mon /etc/postfix/main.cf :

[code]smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
disable_vrfy_command = yes
smtpd_helo_required = yes

append_dot_mydomain = no

myhostname = smtp.example.com
myorigin = example.com
mydestination = localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8, IP_INTERNET_SERVEUR
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_aliases.cf,mysql:/etc/postfix/mysql-virtual_aliases_accounts.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_accounts.cf
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql-virtual_quotas.cf

virtual_mailbox_base = /var/spool/vmail/

virtual_uid_maps = static:5000
virtual_gid_maps = static:5000

virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "La boîte mail de votre destinataire est pleine !"
virtual_overquota_bounce = yes

smtpd_sasl_auth_enable = yes
smtpd_sasl2_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = no

smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated
smtpd_sender_restrictions =
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination[/code]
J’ai exactement la même config sur un petit serveur web chez moi et elle fonctionne très bien. La seule différence est la ligne mynetworks = 127.0.0.0/8, IP_INTERNET_SERVEUR, sur mon serveur domestique j’ai un ADRESSE_RESEAU_LOCAL/24 en plus.
Sauf que le serveur est un serveur dédié chez OVH, sur une IP Fail-Over, donc il n’y a pas d’adresse de réseau local, donc j’ai enlevé ce passage.

En bonus je vous donne /etc/hosts :

[code]127.0.0.1 localhost
IP_INTERNET_SERVEUR tifc-webserver.example.com tifc-webserver

The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters[/code]

et /etc/mailname :

Je vous remercie par avance de votre aide précieuse.

J’avais le même soucis que toi sur un serveur dédié avec IP - Fail-over, essaie cette solution qui a fonctionné pour moi :

Dans ton main.cf :

myhostname = hostnameduserveur.tonnomdedomaine
mydomaine = tonnomdedomaine
mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

et comment la ligne myorigin =

En espérant que cela fonctionne pour toi.

En fait, c’était un problème de connexion à MySQL…

Merci quand même :slightly_smiling: .

Par contre je sais pas qui a lancé une attaque bruteforce sur le serveur POP3… J’avais oublié de retirer une IP dans mon 1er message.