OVH Community, votre nouvel espace communautaire.

Postfix : email adress "EXPANDED FROM" ?


Didier Misson
05/09/2014, 01h13
Ok !

C'est bien un problème de hostname qui n'est pas dans la liste "mydestination" de Postfix !

J'ai trouvé des messages sur Google, parlant de /etc/hosts, ou hostsname, qui ne correspondaient pas à la ligne "myhostname" dans /etc/postfix/main.cf" ...

Mais ce n'est pas le problème que j'ai, car mon hostname est correct !

Ce que j'ai oublié, c'est que les mails sont reçus par le serveur Posffix, pas par le domaine !
ça veut dire que c'est "ct312-gb.misson.net" qui reçoit les mails ...

J'ai corrigé dans Webmin, dans Server / Postfix / General Options , le paramètre "What domains to receive mail for" :

What domain to receive mail for
mydestination
You specify what domains this machine will deliver locally, instead of forwarding to another machine. The default is to receive mail for the machine itself.

Local machine: $myhostname, localhost.$mydomain
Whole Domain: $myhostname, localhost.$mydomain, $mydomain

You can also specify the full path of a file, which will contain the names of domains that this machine will deliver mail locally for.

Example: /etc/postfix/mydestination

Caution: in order to avoid mail delivery loops, you must list all hostnames of the machine, including $myhostname, and localhost.$mydomain. DO NOT LIST VIRTUAL DOMAINS HERE. LIST THEM IN THE VIRTUAL FILE INSTEAD.
C'est bien le paramètre "mydestination" !

J'ai introduit dans cette ligne, ce que me proposait le popup d'aide :

"$myhostname, localhost.$mydomain, $mydomain"

En fait, ça correspond simple à sélectionner dans la page Webmin :

What domains to receive mail for : Whole domain

ça doit correspondre : localhost.$mydomain = ct312-gb.misson.net ... (enfin, je crois)

Et ça fonctionne !




Bonne nuit

Didier Misson
05/09/2014, 00h49
ok, j'ai une piste !

Les sites web et les emails sont configurés à l'aide de Webmin/Virtualmin.

Quand je refais un "Checking Configuration" dans Webmin, j'ai un message d'erreur :

Checking Configuration

The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active ..

Your system has 4 GB of memory, which is at or above the Virtualmin recommended minimum of 256 MB.

BIND DNS server is installed, and the system is configured to use it.

Your Postfix configuration is missing the system's mail hostname misson.net from the mydestination line, which will cause mail to bounce.

.. your system is not ready for use by Virtualmin.


Je vérifie ça... et je vais comparer avec un autre Conteneur où Webmin est bien configuré, càd un autre CT où les mails sont OK.

Je continue mes recherches...


Didier Misson
04/09/2014, 20h52
Citation Envoyé par Nowwhat
Bonsoir,

J'avais vu cette page hier soir, mais il était tard...

Je n'ai pas ce fichier /etc/postfix/aliases (Ubuntu 14.04)

/etc/postfix# ls -lh
total 108K

-rwxr-xr-x 1 root root 0 Aug 30 12:48 bcc
-rw-r--r-- 1 root root 12K Aug 30 12:49 bcc.db
-rw-r--r-- 1 root root 326 Aug 30 12:48 dynamicmaps.cf
-rw-r--r-- 1 root root 1.7K Sep 4 02:48 main.cf
-rw-r--r-- 1 root root 6.0K Aug 30 12:49 master.cf
-rwxr-xr-x 1 root root 28K Feb 12 2014 post-install
-rw-r--r-- 1 root root 20K Feb 12 2014 postfix-files
-rwxr-xr-x 1 root root 8.7K Feb 12 2014 postfix-script
drwxr-xr-x 2 root root 4.0K Aug 30 12:49 sasl
-rwxr-xr-x 1 root root 239 Sep 4 02:48 virtual
-rw-r--r-- 1 root root 12K Sep 4 02:48 virtual.db



Dans la configuration du domaine dans Webmin, j'ai :


3 aliases in domain exemple.be

abuse Address webmaster.exemple
hostmaster Address webmaster.exemple
postmaster Address webmaster.exemple


Donc, rien en rapport avec "luc" ou "misson.net" ...

J'ai trouvé des alias dans le ficvhier virtual :

Code:
exemple.be   exemple.be
webmaster@exemple.be webmaster.exemple
abuse@exemple.be     webmaster.exemple
hostmaster@exemple.be        webmaster.exemple
postmaster@exemple.be        webmaster.exemple
luc@exemple.be       luc.exemple
Tout me semble normal, mais je connais encore peu Postfix


Je vais continuer à chercher.

Merci et bonne soirée.
Didier

Nowwhat
04/09/2014, 07h25
Salut.

Google postfix expand from me dit qu'il faut aller voir ton aliases.

Didier Misson
04/09/2014, 02h29
Bonjour,

J'ai un SP64 en Proxmox, et des conteneurs avec Webmin.

Je configure les emails avec Webmin, dans un des conteneurs pour le domaine exemple.be
J'ai installé Roundcube.

Je teste.

Ma boite webmaster@exemple.be fonctionne parfaitement !
Émission et réception depuis Gmail : ok

Mais j'ai des problèmes avec la boite luc@exemple.be
(la 1ère créée)

Depuis Roundcube, je peux envoyé depuis luc@exemple.be.
Le mail arrive bien sur ma boite didier.misson@gmail.com

Mais PAS l'inverse !
Le mail depuis ma boite Gmail n'arrive jamais dans la boite Roundcube sur le serveur !

Je check le message d'erreur reçu dans Gmail :

Code HTML:
your message could not
be delivered to one or more recipients. It's attached below.

...

                   The mail system

 (expanded from ): host
    aspmx.l.google.com[64.233.167.27] said: 550-5.1.1 The email account that
    you tried to reach does not exist. Please try 550-5.1.1 double-checking the
    recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn
    more at 550 5.1.1 http://support.google.com/mail/bin/answer.py?answer=6596
    wi8si13332991wjc.169 - gsmtp (in reply to RCPT TO command)
Qu'est ce que c'est ce :

(expanded from


Je n'ai JAMAIS créé d'alias, ni de redirection pour luc@exemple.be

-------------
Je regarde les logs mail dans le serveur :

Code HTML:
Sep  4 02:52:48 ct312 postfix/smtpd[29805]: connect from mail-vc0-f182.google.com[209.85.220.182]
Sep  4 02:52:49 ct312 postfix/smtpd[29805]: 53E92B1497D: client=mail-vc0-f182.google.com[209.85.220.182]
Sep  4 02:52:49 ct312 postfix/cleanup[29004]: 53E92B1497D: message-id=
Sep  4 02:52:49 ct312 postfix/qmgr[22478]: 53E92B1497D: from=, size=1831, nrcpt=1 (queue active)

Sep  4 02:52:49 ct312 postfix/smtp[29005]: 53E92B1497D: to=, orig_to=, 

relay=aspmx.l.google.com[64.233.167.27]:25, delay=0.34, delays=0.28/0/0.04/0.02, dsn=5.1.
1, status=bounced (host aspmx.l.google.com[64.233.167.27] said: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typ
os or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 http://support.google.com/mail/bin/answer.py?answer=6596 wi8si13332991wjc.169 - gsmtp (in reply to RCPT TO command))
Sep  4 02:52:49 ct312 postfix/cleanup[29004]: 927E4B14985: message-id=<20140904005249.927E4B14985@ct312-gb.misson.net>
Sep  4 02:52:49 ct312 postfix/bounce[29024]: 53E92B1497D: sender non-delivery notification: 927E4B14985
Sep  4 02:52:49 ct312 postfix/qmgr[22478]: 927E4B14985: from=<>, size=4375, nrcpt=1 (queue active)
Sep  4 02:52:49 ct312 postfix/qmgr[22478]: 53E92B1497D: removed
Sep  4 02:52:49 ct312 postfix/smtpd[29805]: disconnect from mail-vc0-f182.google.com[209.85.220.182]
On voit clairement le "remplacement de l'adresse email de destination" :

to=, orig_to=


J'ai l'impression que c'est mon serveur qui fait le remplacement (c'est un message de ct312)..
Mais pourquoi ?

Ok, j'ai bien un nom de machine qui est ct312-gb.misson.net ... mais ça n'explique pas pourquoi il prendre ce "@misson.net" pour remplacer dans l'adresse de destination

Une idée ?
Ou une méthode pour affiner le diagnostique ?

Merci d'avance et bonne journée