# Configuration avancée mails

**URL:** https://forum.yunohost.org/t/configuration-avancee-mails/12215
**Category:** Advanced use case
**Tags:** french
**Created:** [July 29, 2020, 7:45am UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215 "2020-07-29T07:45:22Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![unsui](https://forum.yunohost.org/user_avatar/forum.yunohost.org/unsui/32/2898_2.png) [@unsui](https://forum.yunohost.org/u/unsui)
#### Post date: [July 29, 2020, 7:45am UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/1 "2020-07-29T07:45:22Z")

</div>

Suite du sujet [Permettre aux apps d'envoyer du mail même si le serveur de mail principal est ailleurs](https://forum.yunohost.org/t/permettre-aux-apps-denvoyer-du-mail-meme-si-le-serveur-de-mail-principal-est-ailleurs/10941/24) :

Hello @ljf,

Ton post sur la configuration avancée des mails m’a déjà bien servi mais je cale pour configurer mon serveur selon le point 3. L’envoi fonctionne sur des adresses externes au domaine mais pas vers @domaine.tld.

YH est installé sur mon domaine principal (ports, reverse, etc ok) et j’ai suivi en partie un autre de tes posts ([How to keep your mailbox outside yunohost](https://forum.yunohost.org/t/how-to-keep-your-mailbox-outside-yunohost/4860)) pour modifier le fichier dnsmasq du domaine :

`mx-host=domaine.tld, spool.mail.gandi.net,5`

Et ma config dns chez Gandi :

```
@ 10800 IN MX 10 spool.mail.gandi.net.
@ 10800 IN MX 50 fb.mail.gandi.net.
@ 10800 IN TXT "v=spf1 include:_mailcust.gandi.net ?all"

```

Je n’ai pas su quoi faire avec la config recommandée par YH pour le spf1 mais j’ai bien configuré le \_dmarc et le mail.\_domainkey comme proposé par YH.

Une idée de ce qui bloque ?

---

<div class="post-metadata">

### Author: ![unsui](https://forum.yunohost.org/user_avatar/forum.yunohost.org/unsui/32/2898_2.png) [@unsui](https://forum.yunohost.org/u/unsui)
#### Post date: [August 1, 2020, 10:45am UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/2 "2020-08-01T10:45:04Z")

</div>

Hello @ljf,

Petite relance.

Merci d’avance

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [August 1, 2020, 12:21pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/3 "2020-08-01T12:21:44Z")

</div>

(Il est en vacances 😜 )

---

<div class="post-metadata">

### Author: ![unsui](https://forum.yunohost.org/user_avatar/forum.yunohost.org/unsui/32/2898_2.png) [@unsui](https://forum.yunohost.org/u/unsui)
#### Post date: [August 1, 2020, 1:18pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/4 "2020-08-01T13:18:44Z")

</div>

Puisse-t-il en profiter pleinement ! 🙂

---

<div class="post-metadata">

### Author: ![unsui](https://forum.yunohost.org/user_avatar/forum.yunohost.org/unsui/32/2898_2.png) [@unsui](https://forum.yunohost.org/u/unsui)
#### Post date: [September 2, 2020, 11:47am UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/5 "2020-09-02T11:47:29Z")

</div>

Hello,

Est-ce que quelqu’un pourrait m’aider ?  
J’aurais vraiment besoin de pouvoir rentrer en “production” rapidement et c’est le seul problème qui m’en empêche.

A vot’ bon coeur m’sieurs-dames

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [September 2, 2020, 1:45pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/6 "2020-09-02T13:45:43Z")

</div>

> [@unsui](#):
>
> . L’envoi fonctionne sur des adresses externes au domaine mais pas vers @domaine.tld.

Est-ce que tu préciser l’envoi _depuis où_ ?

---

<div class="post-metadata">

### Author: ![unsui](https://forum.yunohost.org/user_avatar/forum.yunohost.org/unsui/32/2898_2.png) [@unsui](https://forum.yunohost.org/u/unsui)
#### Post date: [September 2, 2020, 2:26pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/7 "2020-09-02T14:26:59Z")

</div>

Depuis le serveur YH (domaine.tld configuré en domaine principal).

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [September 2, 2020, 2:32pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/8 "2020-09-02T14:32:34Z")

</div>

À voir avec @ljf mais naivement je mettrais pas

```auto
mx-host=domaine.tld, spool.mail.gandi.net,5

```

dans dnsmasq, mais plutot

```auto
mx-host=spool.mail.gandi.net,5

```

(a moins que postfix en local soit configuré pour relayer vers ton gandi)

---

<div class="post-metadata">

### Author: ![unsui](https://forum.yunohost.org/user_avatar/forum.yunohost.org/unsui/32/2898_2.png) [@unsui](https://forum.yunohost.org/u/unsui)
#### Post date: [September 2, 2020, 2:56pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/9 "2020-09-02T14:56:55Z")

</div>

Je viens d’essayer avec ce que tu proposes mais ça ne fonctionne pas. Est-ce que je dois redémarrer un service après avoir modifié dnsmasq ?

Aussi, dans le fichier dnsmasq, il y a cette ligne juste au-dessus de mx-host :

> txt-record=domaine.tld,“v=spf1 mx a -all”

> [@Aleks](#):
>
> (a moins que postfix en local soit configuré pour relayer vers ton gandi)

Je n’ai pas touché à postfix.

Et niveau config dns chez Gandi je ne suis pas sûr que c’est bon, j’ai ajouté les entrées suggérées par YH mais je n’ai pas su quoi faire avec le spf1. Ma config chez Gandi :

> @ 10800 IN MX 10 [spool.mail.gandi.net](http://spool.mail.gandi.net).  
> @ 10800 IN MX 50 [fb.mail.gandi.net](http://fb.mail.gandi.net).  
> @ 10800 IN TXT “v=spf1 include:\_mailcust.gandi.net ?all”  
> \_dmarc 1800 IN TXT “v=DMARC1; p=none”  
> mail.\_domainkey 1800 IN TXT “v=DKIM1; h=sha256; k=rsa; key”

Et ce que me renvoi le diagnostic YH :

> - Cet enregistrement DNS ne semble pas correspondre à la configuration recommandée :  
> Type : `MX`  
> Nom : `@`  
> La valeur actuelle est : `[u'10 spool.mail.gandi.net.', u'50 fb.mail.gandi.net.']`  
> La valeur attendue est : `10 domaine.tld.`
> - Cet enregistrement DNS ne semble pas correspondre à la configuration recommandée :  
> Type : `TXT`  
> Nom : `@`  
> La valeur actuelle est : `"v=spf1 include:_mailcust.gandi.net ?all"`  
> La valeur attendue est : `"v=spf1 a mx -all"`

Merci en tout cas de te pencher sur le problème 😉

---

<div class="post-metadata">

### Author: ![ljf](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ljf/32/58_2.png) [@ljf](https://forum.yunohost.org/u/ljf)
#### Post date: [September 2, 2020, 2:58pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/10 "2020-09-02T14:58:26Z")

</div>

> [@unsui](#):
>
> Je viens d’essayer avec ce que tu proposes mais ça ne fonctionne pas. Est-ce que je dois redémarrer un service après avoir modifié dnsmasq ?

Oui le service dnsmasq

---

<div class="post-metadata">

### Author: ![unsui](https://forum.yunohost.org/user_avatar/forum.yunohost.org/unsui/32/2898_2.png) [@unsui](https://forum.yunohost.org/u/unsui)
#### Post date: [September 2, 2020, 3:09pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/11 "2020-09-02T15:09:34Z")

</div>

> [@ljf](#):
>
> Oui le service dnsmasq

Je l’ai redémarré mais ça ne passe toujours pas.

Pour info, comme test, j’utilise un formulaire de contact Wordpress qui envoie un message de confirmation à l’adresse renseignée par celui qui rempli le formulaire (ça, ça fonctionne) et un message de confirmation sur une adresse @domaine.tld (domaine principal YH) configurée chez Gandi donc (là ça n’arrive jamais).

---

<div class="post-metadata">

### Author: ![ljf](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ljf/32/58_2.png) [@ljf](https://forum.yunohost.org/u/ljf)
#### Post date: [September 2, 2020, 3:16pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/12 "2020-09-02T15:16:01Z")

</div>

Regarde les logs du mail via la webadmin ou via:

```auto
yunohost service log postfix

```

Ou alors avec

```auto
tail -f /var/log/mail.*

```

---

<div class="post-metadata">

### Author: ![unsui](https://forum.yunohost.org/user_avatar/forum.yunohost.org/unsui/32/2898_2.png) [@unsui](https://forum.yunohost.org/u/unsui)
#### Post date: [September 2, 2020, 3:32pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/13 "2020-09-02T15:32:45Z")

</div>

J’essaie de partager avec YunoPaste mais Pacman a visiblement très faim…

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [September 2, 2020, 3:33pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/14 "2020-09-02T15:33:37Z")

</div>

Si c’est pas immédiat c’est peut-être qu’il y a un bug … si tu veux tu peux regarder dans la console JS (avec F12 sur Firefox) pour voir si il y a une erreur évidente qu’on peut corriger…

Sinon tu peux contourner le probleme en copiant-collant le log ailleurs :s

---

<div class="post-metadata">

### Author: ![unsui](https://forum.yunohost.org/user_avatar/forum.yunohost.org/unsui/32/2898_2.png) [@unsui](https://forum.yunohost.org/u/unsui)
#### Post date: [September 2, 2020, 3:38pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/15 "2020-09-02T15:38:25Z")

</div>

Voilà pour la console Firefox (si c’est bien ça qu’il fallait récup ?) :

> Cette page utilise la propriété non standard « zoom ». Envisagez d’utiliser calc() dans les valeurs des propriétés pertinentes ou utilisez « transform » avec « transform-origin: 0 0 ». admin  
> Le cookie « SSOwAuthRedirect » a été rejeté car il a déjà expiré. admin  
> Le cookie « SSOwAuthRedirect » a été rejeté car il a déjà expiré. script.min.js  
> Le cookie « SSOwAuthRedirect » a été rejeté car il a déjà expiré. en.json  
> Le cookie « SSOwAuthRedirect » a été rejeté car il a déjà expiré. fr.json  
> Le cookie « SSOwAuthRedirect » a été rejeté car il a déjà expiré. versions  
> Le cookie « SSOwAuthRedirect » a été rejeté car il a déjà expiré. postfix  
> Le cookie « SSOwAuthRedirect » a été rejeté car il a déjà expiré. log  
> Le cookie « SSOwAuthRedirect » a été rejeté car il a déjà expiré. service\_info.ms

> Uncaught TypeError: $.ajax(…).success is not a function  
> [https://domaine.tld/yunohost/admin/dist/js/script.min.js?version=71c20a24:22](https://domaine.tld/yunohost/admin/dist/js/script.min.js?version=71c20a24:22)  
> dispatch [https://domaine.tld/yunohost/admin/dist/js/script.min.js?version=71c20a24:1](https://domaine.tld/yunohost/admin/dist/js/script.min.js?version=71c20a24:1)  
> handle [https://domaine.tld/yunohost/admin/dist/js/script.min.js?version=71c20a24:1](https://domaine.tld/yunohost/admin/dist/js/script.min.js?version=71c20a24:1)  
> script.min.js:22:1592

---

<div class="post-metadata">

### Author: ![unsui](https://forum.yunohost.org/user_avatar/forum.yunohost.org/unsui/32/2898_2.png) [@unsui](https://forum.yunohost.org/u/unsui)
#### Post date: [September 2, 2020, 3:42pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/16 "2020-09-02T15:42:14Z")

</div>

Les journaux postfix :

journalctl :

> – Logs begin at Tue 2020-09-01 14:52:43 CEST, end at Wed 2020-09-02 17:38:03 CEST. –  
> Sep 02 17:04:54 postfix/bounce[1405]: EF5BD3ED53: sender non-delivery notification: 04DCC3ED59  
> Sep 02 17:04:54 postfix/qmgr[1382]: EF5BD3ED53: removed  
> Sep 02 17:04:54 postfix/pipe[1400]: 04DCC3ED59: to=[wordpress@mjcspa.be](mailto:wordpress@mjcspa.be), relay=dovecot, delay=0.02, delays=0/0/0/0.02, dsn=5.1.1, status=bounced (user unknown. Command output: lda(wordpress@mjcspa.be,)Error: net\_connect\_unix(/var/run/dovecot/stats-writer) failed: Permission denied )  
> Sep 02 17:04:54 postfix/qmgr[1382]: 04DCC3ED59: removed  
> Sep 02 17:04:54 postfix/smtp[1401]: Trusted TLS connection established to [unsuido.net](http://unsuido.net)[159.69.36.208]:25: TLSv1.3 with cipher TLS\_AES\_256\_GCM\_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256  
> Sep 02 17:04:55 postfix/smtp[1401]: F30613ED2C: to=[christophe@unsuido.net](mailto:christophe@unsuido.net), [relay=unsuido.net](http://relay=unsuido.net)[159.69.36.208]:25, delay=1.5, delays=0.01/0.03/0.19/1.3, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 5CCF53ED7E)  
> Sep 02 17:04:55 postfix/qmgr[1382]: F30613ED2C: removed  
> Sep 02 17:05:15 postfix/smtpd[1408]: connect from unknown[212.70.149.4]  
> Sep 02 17:05:19 postfix/smtpd[1408]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 02 17:08:27 postfix/smtpd[1423]: connect from unknown[212.70.149.4]  
> Sep 02 17:08:31 postfix/smtpd[1423]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 02 17:09:20 postfix/submission/smtpd[1516]: connect from unknown[37.49.230.33]  
> Sep 02 17:09:20 postfix/submission/smtpd[1516]: disconnect from unknown[37.49.230.33] ehlo=1 auth=0/1 rset=0/1 quit=1 commands=2/4  
> Sep 02 17:11:39 postfix/smtpd[1518]: connect from unknown[212.70.149.4]  
> Sep 02 17:11:42 postfix/smtpd[1518]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 02 17:14:51 postfix/smtpd[1525]: connect from unknown[212.70.149.4]  
> Sep 02 17:14:54 postfix/smtpd[1525]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 02 17:15:15 postfix/anvil[1410]: statistics: max connection rate 1/60s for (smtp:212.70.149.4) at Sep 2 17:05:15  
> Sep 02 17:15:15 postfix/anvil[1410]: statistics: max connection count 1 for (smtp:212.70.149.4) at Sep 2 17:05:15  
> Sep 02 17:15:15 postfix/anvil[1410]: statistics: max cache size 2 at Sep 2 17:09:20  
> Sep 02 17:16:10 postfix/submission/smtpd[1534]: connect from unknown[37.49.230.33]  
> Sep 02 17:16:10 postfix/submission/smtpd[1534]: disconnect from unknown[37.49.230.33] ehlo=1 auth=0/1 rset=0/1 quit=1 commands=2/4  
> Sep 02 17:18:00 postfix/smtpd[1550]: connect from unknown[212.70.149.4]  
> Sep 02 17:18:04 postfix/smtpd[1550]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 02 17:21:08 postfix/smtpd[1591]: connect from unknown[212.70.149.4]  
> Sep 02 17:21:10 postfix/smtpd[1591]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 02 17:23:00 postfix/submission/smtpd[1605]: connect from unknown[37.49.230.33]  
> Sep 02 17:23:00 postfix/submission/smtpd[1605]: disconnect from unknown[37.49.230.33] ehlo=1 auth=0/1 rset=0/1 quit=1 commands=2/4  
> Sep 02 17:24:19 postfix/smtpd[1607]: connect from unknown[212.70.149.4]  
> Sep 02 17:24:23 postfix/smtpd[1607]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 02 17:25:15 postfix/anvil[1410]: statistics: max connection rate 1/60s for (submission:37.49.230.33) at Sep 2 17:16:10  
> Sep 02 17:25:15 postfix/anvil[1410]: statistics: max connection count 1 for (submission:37.49.230.33) at Sep 2 17:16:10  
> Sep 02 17:25:15 postfix/anvil[1410]: statistics: max cache size 1 at Sep 2 17:16:10  
> Sep 02 17:27:31 postfix/smtpd[1640]: connect from unknown[212.70.149.4]  
> Sep 02 17:27:35 postfix/smtpd[1640]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 02 17:29:53 postfix/submission/smtpd[1664]: connect from unknown[37.49.230.33]  
> Sep 02 17:29:53 postfix/submission/smtpd[1664]: disconnect from unknown[37.49.230.33] ehlo=1 auth=0/1 rset=0/1 quit=1 commands=2/4  
> Sep 02 17:30:42 postfix/smtpd[1666]: connect from unknown[212.70.149.4]  
> Sep 02 17:30:46 postfix/smtpd[1666]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 02 17:33:54 postfix/smtpd[1696]: connect from unknown[212.70.149.4]  
> Sep 02 17:33:57 postfix/smtpd[1696]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 02 17:35:15 postfix/anvil[1410]: statistics: max connection rate 1/60s for (smtp:212.70.149.4) at Sep 2 17:27:31  
> Sep 02 17:35:15 postfix/anvil[1410]: statistics: max connection count 1 for (smtp:212.70.149.4) at Sep 2 17:27:31  
> Sep 02 17:35:15 postfix/anvil[1410]: statistics: max cache size 2 at Sep 2 17:30:42  
> Sep 02 17:36:42 postfix/submission/smtpd[1710]: connect from unknown[37.49.230.33]  
> Sep 02 17:36:42 postfix/submission/smtpd[1710]: disconnect from unknown[37.49.230.33] ehlo=1 auth=0/1 rset=0/1 quit=1 commands=2/4  
> Sep 02 17:37:01 postfix/smtpd[1712]: connect from unknown[212.70.149.4]  
> Sep 02 17:37:04 postfix/smtpd[1712]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 02 17:37:21 postfix/smtpd[1712]: connect from unknown[156.96.44.166]  
> Sep 02 17:37:22 postfix/smtpd[1712]: disconnect from unknown[156.96.44.166] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4

/var/log/mail.err :

> Jun 10 15:53:44 mjcspa postfix/pickup[26736]: error: open file /etc/mailname: No such file or directory  
> Jun 10 15:53:44 mjcspa postfix/qmgr[26737]: error: open file /etc/mailname: No such file or directory  
> Jun 10 15:54:47 mjcspa postfix/qmgr[7782]: error: open file /etc/mailname: No such file or directory  
> Jun 10 15:54:47 mjcspa postfix/pickup[7781]: error: open file /etc/mailname: No such file or directory  
> Jun 10 16:04:49 mjcspa postfix/pickup[11559]: error: open file /etc/mailname: No such file or directory  
> Jun 10 16:04:49 mjcspa postfix/qmgr[11560]: error: open file /etc/mailname: No such file or directory  
> Jul 28 15:27:00 portail dovecot: lda(christophe@mjcspa.be): Error: sieve: msgid=[82c7dd08-922b-0416-dbe9-85aef9e24926@mjcspa.be](mailto:82c7dd08-922b-0416-dbe9-85aef9e24926@mjcspa.be): failed to store into mailbox ‘Junk’: Mailbox doesn’t exist: Junk  
> Jul 28 15:27:00 portail dovecot: lda(christophe@mjcspa.be): Error: sieve: Execution of script /etc/dovecot/global\_script/rspamd.sieve failed, but implicit keep was successful  
> Jul 28 16:16:26 portail dovecot: lda(christophe@mjcspa.be): Error: sieve: msgid=[05b3c4fb-0a4c-95f2-b0a3-cbe26c946627@mjcspa.be](mailto:05b3c4fb-0a4c-95f2-b0a3-cbe26c946627@mjcspa.be): failed to store into mailbox ‘Junk’: Mailbox doesn’t exist: Junk  
> Jul 28 16:16:26 portail dovecot: lda(christophe@mjcspa.be): Error: sieve: Execution of script /etc/dovecot/global\_script/rspamd.sieve failed, but implicit keep was successful  
> Jul 30 08:44:47 mjcspa dovecot: auth: Error: LDAP: Connection lost to LDAP server, reconnecting  
> Jul 30 08:44:47 mjcspa dovecot: auth: Error: LDAP: Can’t connect to server: 127.0.0.1  
> Jul 30 08:48:49 mjcspa dovecot: auth: Error: LDAP: Connection lost to LDAP server, reconnecting  
> Jul 30 08:48:49 mjcspa dovecot: auth: Error: LDAP: Can’t connect to server: 127.0.0.1  
> Aug 31 22:36:51 mjcspa dovecot: imap-login: Error: Failed to initialize SSL server context: Couldn’t parse DH parameters: error:0909006C:PEM routines:get\_name:no start line: Expecting: DH PARAMETERS: user=\<\>, rip=80.67.172.144, lip=94.130.173.243, session=  
> Aug 31 22:36:51 mjcspa dovecot: imap-login: Error: Failed to initialize SSL server context: Couldn’t parse DH parameters: error:0909006C:PEM routines:get\_name:no start line: Expecting: DH PARAMETERS: user=\<\>, rip=2001:910:1410::1, lip=2a01:4f8:c0c:86a0::1, session=\<uF/GXDKuvJkgAQkQFBAAAAAAAAAAAAAB\>  
> Sep 1 05:04:28 mjcspa dovecot: imap-login: Error: Failed to initialize SSL server context: Couldn’t parse DH parameters: error:0909006C:PEM routines:get\_name:no start line: Expecting: DH PARAMETERS: user=\<\>, rip=192.241.223.27, lip=94.130.173.243, session=\<L4v+xjeuNJzA8d8b\>  
> Sep 1 07:00:17 mjcspa dovecot: imap-login: Error: Failed to initialize SSL server context: Couldn’t parse DH parameters: error:0909006C:PEM routines:get\_name:no start line: Expecting: DH PARAMETERS: user=\<\>, rip=80.67.172.144, lip=94.130.173.243, session=  
> Sep 1 07:00:17 mjcspa dovecot: imap-login: Error: Failed to initialize SSL server context: Couldn’t parse DH parameters: error:0909006C:PEM routines:get\_name:no start line: Expecting: DH PARAMETERS: user=\<\>, rip=2001:910:1410::1, lip=2a01:4f8:c0c:86a0::1, session=\<h+8wZTmucI8gAQkQFBAAAAAAAAAAAAAB\>

/var/log/mail.log :

> Sep 2 17:04:54 mjcspa postfix/qmgr[1382]: EF5BD3ED53: removed  
> Sep 2 17:04:54 mjcspa postfix/pipe[1400]: 04DCC3ED59: to=[wordpress@mjcspa.be](mailto:wordpress@mjcspa.be), relay=dovecot, delay=0.02, delays=0/0/0/0.02, dsn=5.1.1, status=bounced (user unknown. Command output: lda(wordpress@mjcspa.be,)Error: net\_connect\_unix(/var/run/dovecot/stats-writer) failed: Permission denied )  
> Sep 2 17:04:54 mjcspa postfix/qmgr[1382]: 04DCC3ED59: removed  
> Sep 2 17:04:54 mjcspa postfix/smtp[1401]: Trusted TLS connection established to [unsuido.net](http://unsuido.net)[159.69.36.208]:25: TLSv1.3 with cipher TLS\_AES\_256\_GCM\_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256  
> Sep 2 17:04:55 mjcspa postfix/smtp[1401]: F30613ED2C: to=[christophe@unsuido.net](mailto:christophe@unsuido.net), [relay=unsuido.net](http://relay=unsuido.net)[159.69.36.208]:25, delay=1.5, delays=0.01/0.03/0.19/1.3, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 5CCF53ED7E)  
> Sep 2 17:04:55 mjcspa postfix/qmgr[1382]: F30613ED2C: removed  
> Sep 2 17:05:15 mjcspa postfix/smtpd[1408]: connect from unknown[212.70.149.4]  
> Sep 2 17:05:19 mjcspa postfix/smtpd[1408]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 2 17:08:27 mjcspa postfix/smtpd[1423]: connect from unknown[212.70.149.4]  
> Sep 2 17:08:31 mjcspa postfix/smtpd[1423]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 2 17:09:20 mjcspa postfix/submission/smtpd[1516]: connect from unknown[37.49.230.33]  
> Sep 2 17:09:20 mjcspa postfix/submission/smtpd[1516]: disconnect from unknown[37.49.230.33] ehlo=1 auth=0/1 rset=0/1 quit=1 commands=2/4  
> Sep 2 17:11:39 mjcspa postfix/smtpd[1518]: connect from unknown[212.70.149.4]  
> Sep 2 17:11:42 mjcspa postfix/smtpd[1518]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 2 17:14:51 mjcspa postfix/smtpd[1525]: connect from unknown[212.70.149.4]  
> Sep 2 17:14:54 mjcspa postfix/smtpd[1525]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 2 17:15:15 mjcspa postfix/anvil[1410]: statistics: max connection rate 1/60s for (smtp:212.70.149.4) at Sep 2 17:05:15  
> Sep 2 17:15:15 mjcspa postfix/anvil[1410]: statistics: max connection count 1 for (smtp:212.70.149.4) at Sep 2 17:05:15  
> Sep 2 17:15:15 mjcspa postfix/anvil[1410]: statistics: max cache size 2 at Sep 2 17:09:20  
> Sep 2 17:16:10 mjcspa postfix/submission/smtpd[1534]: connect from unknown[37.49.230.33]  
> Sep 2 17:16:10 mjcspa postfix/submission/smtpd[1534]: disconnect from unknown[37.49.230.33] ehlo=1 auth=0/1 rset=0/1 quit=1 commands=2/4  
> Sep 2 17:18:00 mjcspa postfix/smtpd[1550]: connect from unknown[212.70.149.4]  
> Sep 2 17:18:04 mjcspa postfix/smtpd[1550]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 2 17:21:08 mjcspa postfix/smtpd[1591]: connect from unknown[212.70.149.4]  
> Sep 2 17:21:10 mjcspa postfix/smtpd[1591]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 2 17:23:00 mjcspa postfix/submission/smtpd[1605]: connect from unknown[37.49.230.33]  
> Sep 2 17:23:00 mjcspa postfix/submission/smtpd[1605]: disconnect from unknown[37.49.230.33] ehlo=1 auth=0/1 rset=0/1 quit=1 commands=2/4  
> Sep 2 17:24:19 mjcspa postfix/smtpd[1607]: connect from unknown[212.70.149.4]  
> Sep 2 17:24:23 mjcspa postfix/smtpd[1607]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 2 17:25:15 mjcspa postfix/anvil[1410]: statistics: max connection rate 1/60s for (submission:37.49.230.33) at Sep 2 17:16:10  
> Sep 2 17:25:15 mjcspa postfix/anvil[1410]: statistics: max connection count 1 for (submission:37.49.230.33) at Sep 2 17:16:10  
> Sep 2 17:25:15 mjcspa postfix/anvil[1410]: statistics: max cache size 1 at Sep 2 17:16:10  
> Sep 2 17:27:31 mjcspa postfix/smtpd[1640]: connect from unknown[212.70.149.4]  
> Sep 2 17:27:35 mjcspa postfix/smtpd[1640]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 2 17:29:53 mjcspa postfix/submission/smtpd[1664]: connect from unknown[37.49.230.33]  
> Sep 2 17:29:53 mjcspa postfix/submission/smtpd[1664]: disconnect from unknown[37.49.230.33] ehlo=1 auth=0/1 rset=0/1 quit=1 commands=2/4  
> Sep 2 17:30:42 mjcspa postfix/smtpd[1666]: connect from unknown[212.70.149.4]  
> Sep 2 17:30:46 mjcspa postfix/smtpd[1666]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 2 17:33:54 mjcspa postfix/smtpd[1696]: connect from unknown[212.70.149.4]  
> Sep 2 17:33:57 mjcspa postfix/smtpd[1696]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 2 17:35:15 mjcspa postfix/anvil[1410]: statistics: max connection rate 1/60s for (smtp:212.70.149.4) at Sep 2 17:27:31  
> Sep 2 17:35:15 mjcspa postfix/anvil[1410]: statistics: max connection count 1 for (smtp:212.70.149.4) at Sep 2 17:27:31  
> Sep 2 17:35:15 mjcspa postfix/anvil[1410]: statistics: max cache size 2 at Sep 2 17:30:42  
> Sep 2 17:35:34 mjcspa dovecot: imap(christophe)\<32463\>\<i2qYYVWu5sLBIH/q\>: Disconnected for inactivity in=355 out=1081 deleted=0 expunged=0 trashed=0 hdr\_count=0 hdr\_bytes=0 body\_count=0 body\_bytes=0  
> Sep 2 17:36:42 mjcspa postfix/submission/smtpd[1710]: connect from unknown[37.49.230.33]  
> Sep 2 17:36:42 mjcspa postfix/submission/smtpd[1710]: disconnect from unknown[37.49.230.33] ehlo=1 auth=0/1 rset=0/1 quit=1 commands=2/4  
> Sep 2 17:37:01 mjcspa postfix/smtpd[1712]: connect from unknown[212.70.149.4]  
> Sep 2 17:37:04 mjcspa postfix/smtpd[1712]: disconnect from unknown[212.70.149.4] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4  
> Sep 2 17:37:21 mjcspa postfix/smtpd[1712]: connect from unknown[156.96.44.166]  
> Sep 2 17:37:22 mjcspa postfix/smtpd[1712]: disconnect from unknown[156.96.44.166] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [September 2, 2020, 3:54pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/17 "2020-09-02T15:54:41Z")

</div>

> [@unsui](#):
>
> Uncaught TypeError: $.ajax(…).success is not a function

Woké en effet ça marchait pas du tout … ça devrait être corrigé par [Stupid typo breaking yunopaste for service logs · YunoHost/yunohost-admin@7e03213 · GitHub](https://github.com/YunoHost/yunohost-admin/commit/7e0321395798de9191479153ec5fff0aa91b8115) pour les prochaines releases …

Pour revenir à l’histoire des mails, je ne sais pas trop quel est le soucis mis à part que ça a l’air lié à :

> [@unsui](#):
>
> Sep 02 17:04:54 postfix/pipe[1400]: 04DCC3ED59: to=[wordpress@tondomaine.tld]([mailto:wordpress@tondomaine.tld](mailto:wordpress@tondomaine.tld), relay=dovecot, delay=0.02, delays=0/0/0/0.02, dsn=5.1.1, status=bounced (user unknown. Command output: lda(wordpress@tondomaine.tld,)Error: net\_connect\_unix(/var/run/dovecot/stats-writer) failed: Permission denied )

J’ai l’impression que c’est le serveur local qui refuse le mail, soit parce que le destinataire n’existe pas, soit l’expéditeur (j’ai l’impression que pour cet email c’est le meme, pas sur de si c’est normal … aussi il y a ptete un truc chelou avec le fait qu’il y a une virgule à la fin …?)

---

<div class="post-metadata">

### Author: ![unsui](https://forum.yunohost.org/user_avatar/forum.yunohost.org/unsui/32/2898_2.png) [@unsui](https://forum.yunohost.org/u/unsui)
#### Post date: [September 3, 2020, 9:09am UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/18 "2020-09-03T09:09:14Z")

</div>

> [@Aleks](#):
>
> Woké en effet ça marchait pas du tout … ça devrait être corrigé par [Stupid typo breaking yunopaste for service logs · YunoHost/yunohost-admin@7e03213 · GitHub](https://github.com/YunoHost/yunohost-admin/commit/7e0321395798de9191479153ec5fff0aa91b8115) pour les prochaines releases …

👍

> [@Aleks](#):
>
> J’ai l’impression que c’est le serveur local qui refuse le mail, soit parce que le destinataire n’existe pas, soit l’expéditeur (j’ai l’impression que pour cet email c’est le meme, pas sur de si c’est normal … aussi il y a ptete un truc chelou avec le fait qu’il y a une virgule à la fin …?)

Le destinataire existe, ça j’en suis sûr. Le mail wordpress@domaine.tld, c’est Wordpress qui génère ça tout seul. Le truc c’est que ça fonctionne avec n’importe quelle autre adresse que celles @domaine.tld donc je suppose que c’est forcément lié au fait que le domaine soit hébergé sur YH et les mails chez Gandi ?

---

<div class="post-metadata">

### Author: ![ljf](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ljf/32/58_2.png) [@ljf](https://forum.yunohost.org/u/ljf)
#### Post date: [September 6, 2020, 7:49pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/19 "2020-09-06T19:49:03Z")

</div>

Tu as redémarré postfix aprés avoir redémarré dnsmasq ?

---

<div class="post-metadata">

### Author: ![unsui](https://forum.yunohost.org/user_avatar/forum.yunohost.org/unsui/32/2898_2.png) [@unsui](https://forum.yunohost.org/u/unsui)
#### Post date: [September 6, 2020, 9:40pm UTC](https://forum.yunohost.org/t/configuration-avancee-mails/12215/20 "2020-09-06T21:40:10Z")

</div>

Je viens de redémarrer le serveur et j’ai testé en m’envoyant un mail sur @domaine.tld (en remplissant le formulaire Wordpress comme expliqué plus haut) et je le reçois en local sur YH alors que cette adresse n’y est pas configurée. Par contre, je ne reçois pas le mail indiquant que quelqu’un a rempli ce formulaire.

Pour le dire plus simplement (en testant avec des adresses existantes chez Gandi en @domaine.tld) :

user@domaine.tld (celui qui rempli le formulaire) : ok (reçu en local, n’arrive pas chez Gandi donc)  
admin@domaine.tld (celui qui doit en être averti) : perdu dans la nature

C’est quand même étrange…

Pour être sûr, est-ce que ma configuration est bonne ?

> [@Configuration avancée mails](https://forum.yunohost.org/t/configuration-avancee-mails/12215/9):
>
> Je viens d’essayer avec ce que tu proposes mais ça ne fonctionne pas. Est-ce que je dois redémarrer un service après avoir modifié dnsmasq ? Aussi, dans le fichier dnsmasq, il y a cette ligne juste au-dessus de mx-host : txt-record=domaine.tld,“v=spf1 mx a -all” Je n’ai pas touché à postfix. Et niveau config dns chez Gandi je ne suis pas sûr que c’est bon, j’ai ajouté les entrées suggérées par YH mais je n’ai pas su quoi faire avec le spf1. Ma config chez Gandi : @ 10800 IN MX 10 [spool.…](http://spool.mail.gandi.net)

Peux-tu me confirmer que le fichier dnsmasq correspondant au domaine est le seul fichier que je dois éditer ?

Merci en tout cas de vous pencher sur le problème parce que c’est vraiment important pour moi que ça finisse par fonctionner.

[Next page](https://forum.yunohost.org/t/configuration-avancee-mails/12215.md?page=2)
