Salut tout le monde,
Alors j'ai une petite question pour vous concernant le fonctionnement de postfix. Je m'y met petit à petit.
Pour le moment, ce que je veux faire, c'est utiliser une boite mail existante chez ovh, et l'utiliser à travers postfix. J'ai donc fait la configuration dans ce sens, et lowwatch envoi bien les mails.
Petite précision, j'ai un contenaire LXC mail et un apache2.
Donc le serveur physique les mails c'est OK. Ensuite, je me suis dis, tiens configurons les services web tels que dokuwiki ou encore nextcloud pour qu'il m'envoi aussi des mails au travers du LXC mail.
Et la... Les mails ne partent pas du wiki, ni nextcloud, par contre logwatch sur le serveur physique fonctionne.
J'ai le message d'erreur ci-dessous pour un mail qui devrait partir du wiki :
Feb 23 06:44:23 mail postfix/smtpd[1431]: connect from unknown[192.168.10.3]
Feb 23 06:44:23 mail postfix/smtpd[1431]: 3E3CF4C24B3: client=unknown[192.168.10.3]
Feb 23 06:44:23 mail postfix/cleanup[1434]: 3E3CF4C24B3: message-id=<442c529402f73a3f3b2724529b40f1e9@forum.t89s.ovh>
Feb 23 06:44:23 mail postfix/qmgr[1418]: 3E3CF4C24B3: from=<xxx@ovh.fr>, size=1241, nrcpt=1 (queue active)
Feb 23 06:44:23 mail postfix/smtpd[1431]: disconnect from unknown[192.168.10.3]
Feb 23 06:44:23 mail postfix/smtp[1429]: 3E3CF4C24B3: to=<txxx@gmail.com>, relay=he2.mail.ovh.net[46.105.67.238]:25, delay=0.68, delays=0.09/0/0.47/0.12, dsn=5.7.1, status=bounced (host he2.mail.ovh.net[46.105.67.238] said: 554 5.7.1 <xxx@gmail.com>: Relay access denied (in reply to RCPT TO command))
Feb 23 06:44:24 mail postfix/cleanup[1434]: 0DD974C24B7: message-id=<20170223054424.0DD974C24B7@mail.t89slan>
Feb 23 06:44:24 mail postfix/bounce[1435]: 3E3CF4C24B3: sender non-delivery notification: 0DD974C24B7
Feb 23 06:44:24 mail postfix/qmgr[1418]: 0DD974C24B7: from=<>, size=3224, nrcpt=1 (queue active)
Feb 23 06:44:24 mail postfix/qmgr[1418]: 3E3CF4C24B3: removed
Feb 23 06:44:24 mail postfix/smtp[1429]: 0DD974C24B7: to=<xxx@ovh.fr>, relay=he2.mail.ovh.net[46.105.67.238]:25, delay=0.67, delays=0.05/0/0.47/0.15, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as C9052395C78)
Feb 23 06:44:24 mail postfix/qmgr[1418]: 0DD974C24B7: removed
J'ai trouver plus ou moins l'erreur, si dans le main.cf je commente la ligne :
#relayhost = [XXXX.ovh.net]
En faisant ceci, les mails des services web partent bien, par contre, c'est logwatch qui ne tourne plus
mail du wiki qui fonctionne
Feb 23 06:49:55 mail postfix/smtpd[1582]: connect from unknown[192.168.10.3]
Feb 23 06:49:55 mail postfix/smtpd[1582]: 07AC54C24B3: client=unknown[192.168.10.3]
Feb 23 06:49:55 mail postfix/cleanup[1587]: 07AC54C24B3: message-id=<49360ecd41d8e2fe55282b4dd87e3048@xxx.ovh>
Feb 23 06:49:55 mail postfix/qmgr[1572]: 07AC54C24B3: from=<xxx@ovh.fr>, size=1242, nrcpt=1 (queue active)
Feb 23 06:49:55 mail postfix/smtpd[1582]: disconnect from unknown[192.168.10.3]
Feb 23 06:49:55 mail postfix/smtp[1588]: connect to gmail-smtp-in.l.google.com[2a00:1450:400c:c00::1a]:25: Network is unreachable
Feb 23 06:49:56 mail postfix/smtp[1588]: 07AC54C24B3: to=<xxx@gmail.com>, relay=gmail-smtp-in.l.google.com[173.194.76.27]:25, delay=1.6, delays=0.08/0.03/1.2/0.3, dsn=2.0.0, status=sent (250 2.0.0 OK 1487829026 z4si5003374wmb.59 - gsmtp)
Feb 23 06:49:56 mail postfix/qmgr[1572]: 07AC54C24B3: removed
Et le mail logwatch qui ne passe plus
Feb 23 06:51:15 mail postfix/smtpd[1582]: connect from unknown[192.168.10.254]
Feb 23 06:51:15 mail postfix/smtpd[1582]: A97EA4C24B3: client=unknown[192.168.10.254]
Feb 23 06:51:15 mail postfix/cleanup[1587]: A97EA4C24B3: message-id=<20170223055115.9E5C0180447@srv1.t89s.lan>
Feb 23 06:51:15 mail postfix/smtpd[1582]: disconnect from unknown[192.168.10.254]
Feb 23 06:51:15 mail postfix/qmgr[1572]: A97EA4C24B3: from=<root@t89s.lan>, size=6815, nrcpt=1 (queue active)
Feb 23 06:51:16 mail postfix/smtp[1588]: A97EA4C24B3: host mx1.mail.ovh.net[178.33.124.171] said: 450 4.1.8 <root@t89s.lan>: Sender address rejected: Domain not found (in reply to RCPT TO command)
Feb 23 06:51:19 mail postfix/smtp[1588]: A97EA4C24B3: to=<axxx@ovh.fr>, relay=mx2.mail.ovh.net[178.33.124.173]:25, delay=3.6, delays=0.04/0/3.3/0.27, dsn=4.1.8, status=deferred (host mx2.mail.ovh.net[178.33.124.173] said: 450 4.1.8 <root@t89s.lan>: Sender address rejected: Domain not found (in reply to RCPT TO command))
Je vois a peut près ou se situe le problème, mais je ne sais pas exactement ou et pourquoi 🙂
Si une âme charitable à déjà eu un soucis similaire, ou si quelqu'un connais le pourquoi du comment
Mareuuuchiiiii