Envoi d'e-mails impossible en ligne mais OK via applications tierces

Mon serveur YunoHost

Matériel: VPS OVH
Version de YunoHost: 11.2.9.1
J’ai accès à mon serveur : En SSH | Par la webadmin
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : oui
Si oui, expliquer: suppression récente de vieilles versions de php (7.4 notamment)

Description du problème

Bonjour,
Je ne sais pas depuis quand cela se produit, mais je ne peux plus envoyer de mails depuis une application installée sur le serveur (ex. : Snappymail), sans message d’erreur autre qu’une simple indication, en rouge, évoquant l’impossibilité de l’envoi. Par contre, avec une application tierce, cela fonctionne parfaitement (ex. : Gmail, BlueMail).
J’ai également remarqué ce soir que les mails envoyés aux adresses “admin”, “root”, “postmaster”, etc. ne parvenaient plus aux membres du groupe admin. Je ne sais pas si c’est lié mais je préfère le préciser.
En changement notable, j’ai récemment supprimé les versions obsolètes de php et les dossiers qui allaient avec (dans /etc/php). Idem, je ne sais pas si c’est correllé, mais au cas où…
Les diagnostics indiquent que tout va pour le mieux.
Je vous remercie par avance pour votre aide, si vous avez une idée de la racine du problème.
gwylohm

Bonjour Gwylohm,

Ma Francais ne suffit pas de repondre, j’ecris en Anglais :wink:

When I installed Snappymail, I configured an account that did not match the login (eg, I have accounts wbk and w-b-k that I both use for different purposes, and I added w-b-k as an account to wbk in Snappymail).

When opening tail -f /var/log/mail.err in a terminal and clicking ‘send’ in Snappymail, some 20 lines would be added where this line showed the reason (reject) it did not send:

NOQUEUE: reject: RCPT from domain.tld[fe80::b2de:ebff:fe5a:2668]: 553 5.7.1 <pianomail@domain.tld>: Sender address rejected: not owned by user piano_w; from=<pianomailo@domain.tld> to=<teacher@musicschool.tld> p
roto=ESMTP helo=<domain.tld>

In Snappymail the send button would become red for a moment, and nothing else would happen.

Is there anything in your log when you try to send a message?

Hi wbk, and thank you for your answer.
Unfortunately tail command in terminal returns nothing… maybe I use it wrong ?
By the way, the other matter (admin mails which did not work) was due to the cbl abuseat problem (cf. this post : [RESOLU] Reception de mails impossible,mais l'envoi fonctionne - #5 by nowis)

Hi Gwylohm,

Then there is no error at Postfix-level, which is positive of course :slight_smile:

Next, it could be that there is no error at Postfix-level because:

  • there is something wrong before that, or,
  • there is something wrong after that

Most probably already before that (else I see no reason external clients can send without a problem). Guessing: did you change something in the Yunohost-domain settings, earlier? Enabling/disabling can be set per domain; if the webmail was configured earlier with another domain, that domain is maybe not allowed to send mail anymore. I’m not sure whether it would ever reach Postfix in that case.

I am not quite sure to troubleshoot this though. You mention Snappymail; do you have other webmail apps installed? I also have Snappymail. I have a directory /var/log/snappymail, but there’s nothing in it.

My account in the top-right corner of Snappymail is the ‘main’ address for my Yunohost-account, but the corresponding domain does not have email configured.

There is a file with the configuration for connecting to the local mailserver at /var/www/snappymail/app/snappymail/v/2.31.0/app/domains/default.json ; I’d say that should just work. The same file can be found at /var/www/snappymail/app/data/_data_/_default_/domains/default.json.

The latter part also has settings per domain. In my case I have a config file for a domain that has mail disabled, that file points to localhost. Then I have a couple of files for domains that do have mail enabled; these point to the corresponding domain. To make it a bit clearer: in the path /var/www/snappymail/app/data/_data_/_default_/domains, I have:

  • default.json : points to localhost
  • subdom1 : belongs to subdom1.domain.tld, which has mail disabled. It points to localhost
  • domain.tld : it belongs to domain.tld, which has mail enabled. It points to domain.tld ; this is the domain I use for sending email
  • domain2.tld : it belongs to domain2.tld, which has mail enabled. It points to domain.tld ; snappymail can not use this domain (the app is installed in domain.tld ; I get a cross-site access denied error)

How does it look on your side?

To verify that mail does not get blocked one way or another after leaving Postfix when sending from your webmail, open the mail log for following while sending an email from webmail:

$ sudo tail -f /var/log/mail.log

Some twenty lines should appear when you send an email; you can see what to expect when you send an email with your regular mail client.

Hi wbk,
Thanks for your reply.

Guessing: did you change something in the Yunohost-domain settings, earlier? Enabling/disabling can be set per domain;

Indeed, I disabled the ability for subdomains to send emails; but I tried changing this setting and it didn’t solve the sending problem.

You mention Snappymail; do you have other webmail apps installed?

When I read your post, I tried with Roundcube installed on the server and it worked (I don’t know why I didn’t try that before…). The problem therefore concerns Snappymail.

How does it look on your side?

It looks like I don’t have any files matching my domains or subdomains. There are the files:

To verify that mail does not get blocked one way or another after leaving Postfix when sending from your webmail, open the mail log for following while sending an email from webmail:
$ sudo tail -f /var/log/mail.log

With Snappymail, the mail log shows that the user is not logged in. But everything is fine with Roundcube or other clients. :thinking:
There is the log with Snappymail :

an 27 17:21:18 domain dovecot: imap-login: Login: user=<****>, method=PLAIN, rip=::1, lip=::1, mpid=******, secured, session=<**********>
Jan 27 17:21:18 domain postfix/smtpd[393099]: connect from localhost[::1]
Jan 27 17:21:18 domain postfix/smtpd[393099]: NOQUEUE: reject: RCPT from localhost[::1]: 553 5.7.1 <user@domain.tld>: Sender address rejected: not logged in; from=<user@domain.tld> to=<receiver@gmail.com> proto=ESMTP helo=<domain.tld>
Jan 27 17:21:18 domain postfix/smtpd[393099]: disconnect from localhost[::1] ehlo=1 mail=1 rcpt=0/1 quit=1 commands=3/4
Jan 27 17:21:18 domain dovecot: imap(****)<393098><********>: Logged out in=11 out=484 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Jan 27 17:21:19 domain dovecot: imap-login: Login: user=<****>, method=PLAIN, rip=::1, lip=::1, mpid=3****, secured, session=<X**********B>
Jan 27 17:21:19 domain dovecot: imap(****)<3****><X********B>: Logged out in=107 out=958 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0

Bonjour,
As-tu résolu ce problème? J’utilise rarement Snappymail qui est installé sur le serveur mais j’ai la même erreur. Elles a dû apparaitre courant janvier également. Une mise à jour serait en cause?
Par contre en utilisant Thunderbird, tout fonctionne.

Résolus de mon côté, je n’avais pas bien cherché :

[Sorry for english but my french is not reasonable] yes, you can read the solution in the original thread (second message).

Salut et merci beaucoup, la solution dans ce topic a fonctionné.
À vrai dire, je n’avais jamais fait attention à cette interface d’administration propre à Snappymail.
Encore merci.

Peux-tu me dire ce que tu as par ailleurs dans les paramètres SMTP et IMAP? J’ai utilisé Snappymail et je suis tombé en blacklist sur Spamhaus. Je suspecte fortement la configuration qui était indiquée et qui aurait été changée en plus de ce paramètre.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.