Can not consult number of pending emails in queue / Impossible de consulter le nombre d'emails en attente dans la file d'attente

What type of hardware are you using: Virtual machine
What YunoHost version are you running: 12.1.25
How are you able to access your server: The webadmin
SSH

Describe your issue

:united_kingdom: Good evening,

I don’t know exactly since when, but I noticed that in Diagnosis > Email, I get the message: Can not consult number of pending emails in queue.

Note: I’m using the Mailman3 application.

Can anyone help me resolve this error?

Thank you in advance. Have a good Friday evening and a good weekend,

C.

:france: Bonsoir,

Je ne sais pas exactement depuis quand, mais je me rends compte que dans Diagnostic > Email j’ai le message : Impossible de consulter le nombre d'emails en attente dans la file d'attente.

nb : j’utilise l’application Mailman3.

Si quelqu’un sait m’aider pour résoudre cette erreur ?

Par avance merci, bon vendredi soir et bon week-end,

C.

Share relevant logs or error messages

Erreur : invalid literal for int() with base 10: 'postqueue: warning: /etc/postfix/main.cf, line 203: overriding earlier entry: relay_domains=$mydestination null\n21'

Tu as modifié les configurations de postfix par hasard ?
Essaie d’exécuter yunohost tools regen-conf postfix

(In particular it looks like a duplicate entry for relay_domains)

:united_kingdom: Thank you very much, I’ll try that this weekend :smiling_face:

Apart from netplan for a random IPv6 problem, I don’t think I’ve changed anything other than the admin interface, precisely to avoid files that would no longer update.

I’ll keep you informed and add an English translation in case it can be of more use to the community. Thanks :person_bowing:

:france: Merci beaucoup, j’essaie ça dans le week-end :smiling_face:

En dehors de netplan pour un problème d’IPv6 aléatoires, je ne pense rien avoir changé autrement que par l’interface d’administration, justement pour éviter les fichiers qui ne se mettraient plus à jour.

Je vous tiens informé-es et j’ajoute une traduction en anglais au cas où ça puisse servir au maximum la communauté. Merci :person_bowing:

:united_kingdom: When I run the yunohost tools regen-conf postfix command I get:

:france: Quand j’exécute la commande yunohost tools regen-conf postfix j’obtiens :

Warning: postmap: warning: /etc/postfix/main.cf, line 203: overriding earlier entry: relay_domains=$mydestination null
Success! Configuration updated for 'postfix'
Warning: postmap: warning: /etc/postfix/main.cf, line 203: overriding earlier entry: relay_domains=$mydestination null
postfix:
  applied:
    /etc/postfix/relay_recipients.db:
      status: updated
  pending:

:united_kingdom: And when I look in /etc/postfix/main.cf I find at the end:

:france: Et quand je regarde dans /etc/postfix/main.cf je trouve Ă  la fin :

# Backup MX (secondary MX)
relay_domains = $mydestination null
relay_recipient_maps = hash:/etc/postfix/relay_recipients
maximal_queue_lifetime = 20d

unknown_local_recipient_reject_code = 550
owner_request_special = no

transport_maps =
    hash:/var/lib/mailman3/data/postfix_lmtp
local_recipient_maps =
    hash:/var/lib/mailman3/data/postfix_lmtp
relay_domains =
    hash:/var/lib/mailman3/data/postfix_domains

:united_kingdom: Is this a file that needs to be updated, or is it a configuration file that can remain static?

Do I need to correct or delete lines? Or if the file needs to be updated from time to time, is it possible to reset it?

Thanks in advance :smiling_face:

:france: Est-ce que c’est un fichier qui a besoin d’être mis à jour ou est-ce que c’est un fichier de configuration qui peut rester figé ?

Dois-je corriger ou supprimer des lignes ? Ou si le fichier a besoin d’être mis à jour de temps en temps est-il possible de le réinitialiser ?

Par avance merci :smiling_face:

:united_kingdom: Additionally, I notice in the yunohost logs that the problem appeared since the update I made on September 9: 20250909-005739-tools_upgrade.log

:france: En complément, je m’aperçois dans les logs yunohost que le problème est apparu depuis la mise à jour que j’ai faite le 9 septembre : 20250909-005739-tools_upgrade.log

https://paste.yunohost.org/raw/uvohosanih

:united_kingdom: And in the postfix logs I find:

:france: Et dans les logs de postfix je trouve :

postfix/trivial-rewrite[25096]: warning: do not list domain listes.sud-culture.org in BOTH virtual_mailbox_domains and relay_domains
postfix/sendmail[25601]: warning: /etc/postfix/main.cf, line 203: overriding earlier entry: relay_domains=$mydestination null
postfix/postdrop[25602]: warning: /etc/postfix/main.cf, line 203: overriding earlier entry: relay_domains=$mydestination null

Sounds like an issue with mailman3 that adds a relay_domains statement that ~conflicts with the relay_domains added via the “backup_mx_domains” from yunohost’s global settings … though in your case I see that it’s null which actually means there’s a bug in the core about it … i’m guessing you played with this setting but somehow it wasnt 100% reverted …

can you share the output of sudo grep backup_mx_domain /etc/yunohost/settings.yml

:united_kingdom: I’ve never actually touched these files. I haven’t logged into the servers via the console since at least July.
sudo grep backup_mx_domain /etc/yunohost/settings.yml asks me for the password and then displays nothing at all. And when I try to go to /etc/yunohost/ via ftp it says permission denied.
When I access the folder in command line and display the contents of the file there is:

admin_strength: '2'
nginx_compatibility: modern
portal_allow_edit_email_alias: 0
portal_allow_edit_email_forward: 0
postfix_compatibility: modern
user_strength: '2'
webadmin_allowlist: xxx.xxx.xxx.xxx>
webadmin_allowlist_enabled: 1

:france: Je n’ai vraiment jamais touché à ces fichiers. Je ne m’étais pas connecté au serveurs via la console depuis au moins le mois de juillet.
sudo grep backup_mx_domain /etc/yunohost/settings.yml me demande le mot de passe puis n’affiche rien du tout. Et quand j’essaie d’aller dans /etc/yunohost/ via ftp ça me dit permission denied.
Quand j’accède au dossier en lignes de commandes et que j’affiche le contenu du fichier il y a :

admin_strength: '2'
nginx_compatibility: modern
portal_allow_edit_email_alias: 0
portal_allow_edit_email_forward: 0
postfix_compatibility: modern
user_strength: '2'
webadmin_allowlist: xxx.xxx.xxx.xxx>
webadmin_allowlist_enabled: 1

:united_kingdom: So the best thing would be for me to open an issue here GitHub - YunoHost-Apps/mailman3_ynh: Mailman - The GNU Mailing List Management System packaged for YunoHost. to ask the developers?

:france: Du coup le mieux serait que j’ouvre une issue ici GitHub - YunoHost-Apps/mailman3_ynh: Mailman - The GNU Mailing List Management System packaged for YunoHost. pour solliciter les développeur-ices ?

Just to be sure :

  1. did you make any customisations to your mail configuration
  2. did you setup an email relay
  3. this seems to be happening after 12.1 upgrade, is it the case?

Then :

  1. try running yunohost tools regen-conf postfix --force IF you don’t have custom mail config
  2. after that try running mailq and see if you have an output

:united_kingdom: Hi @jarod5001 and thank you for your help :smiling_face:

  1. From what I remember, I haven’t changed anything via the console outside /etc/netplan/50-cloud-init.yaml to define a static IPv6. After maybe Mailman3 made some changes in the configuration to work and I don’t know the details :person_shrugging:

  2. Below my email configuration:

  3. It was since I went from yunohost 12.1.17.1 to yunohost 12.1.20 on September 9 that I have the error Can not consult number of pending emails in queue in Diagnosis.

My only concern is that I’m running in production, and Mailman3 is used to send messages between 30 and 60 times a day by my colleagues, among about forty discussion lists with up to 1500 email addresses in some.

Is the yunohost tools regen-conf postfix --force command without risk or should I save something before (files and-or configuration via the Backup tool in the yunohost portal)? Knowing that I’ve already run yunohost tools regen-conf postfix in my initial support attempts, it yielded the results mentioned above: Can not consult number of pending emails in queue / Impossible de consulter le nombre d'emails en attente dans la file d'attente - #5 by Diabolo

And that a priori I don’t have any operating problems currently, apart from the error message in the diagnostics.

:france: Salut @jarod5001 et merci pour ton aide :smiling_face:

  1. De ce que je me rappelle, je n’ai rien changé via à la console en dehors de /etc/netplan/50-cloud-init.yaml pour définir une IPv6 statique. Après peut-être que Mailman3 a fait des modifications dans la configuration pour fonctionner et j’ignore les détails :person_shrugging:

  2. Ci-dessous ma configuration email :

  3. C’est depuis que je suis passé de yunohost 12.1.17.1 à yunohost 12.1.20 le 9 septembre dernier que j’ai l’erreur Impossible de consulter le nombre d'emails en attente dans la file d'attente dans Diagnostic.

Ma seule inquiétude c’est que je fonctionne en production et que Mailman3 est utilisé pour envoyer des messages entre 30 et 60 fois par jour par mes camarades, parmi une quarantaine de listes de discussion avec jusqu’à 1500 emails dans certaines.

Est-ce que la commande yunohost tools regen-conf postfix --force est sans risques ou est-ce qu’il faut que je sauvegarde quelque chose avant (fichiers et-ou configuration via l’outils Sauvegardes dans le portail yunohost) ? En sachant que j’ai déjà exécuté yunohost tools regen-conf postfix dans les premières tentatives d’assistance et que ça a donné les résultats mentionnés plus haut : Can not consult number of pending emails in queue / Impossible de consulter le nombre d'emails en attente dans la file d'attente - #5 by Diabolo

Et qu’à priori je n’ai pas de problème de fonctionnement actuellement, en dehors du message d’erreur dans les diagnostics.

@Diabolo you can run the command in dry-run (-n option) to check what is the outcome:

$ sudo yunohost tools regen-conf -n postfix
Attention : postmap: warning: /etc/postfix/main.cf, line 211: overriding earlier entry: relay_domains=$mydestination null
Succès ! La configuration aurait dû être mise à jour pour la catégorie 'postfix'
postfix: 
  applied: 
    /etc/postfix/relay_recipients.db: 
      status: updated
  pending: 
1 Like

I have the same problem. It seems to be related to mailman3.

When I force regenerate the config, I get:

$ sudo yunohost tools regen-conf postfix --force
Succès ! La configuration a été mise à jour pour 'postfix'
Attention : postmap: warning: /etc/postfix/main.cf, line 211: overriding earlier entry: relay_domains=$mydestination null
Attention : postmap: warning: /etc/postfix/main.cf, line 200: overriding earlier entry: relay_domains=hash:/var/lib/mailman3/data/postfix_domains
Attention : postmap: warning: /etc/postfix/main.cf, line 211: overriding earlier entry: relay_domains=$mydestination null
Attention : postmap: warning: /etc/postfix/main.cf, line 200: overriding earlier entry: relay_domains=hash:/var/lib/mailman3/data/postfix_domains
Attention : postmap: warning: /etc/postfix/main.cf, line 211: overriding earlier entry: relay_domains=$mydestination null
Attention : postmap: warning: /etc/postfix/main.cf, line 200: overriding earlier entry: relay_domains=hash:/var/lib/mailman3/data/postfix_domains
Attention : postmap: warning: /etc/postfix/main.cf, line 211: overriding earlier entry: relay_domains=$mydestination null
Attention : postmap: warning: /etc/postfix/main.cf, line 200: overriding earlier entry: relay_domains=hash:/var/lib/mailman3/data/postfix_domains
Attention : postmap: warning: /etc/postfix/main.cf, line 211: overriding earlier entry: relay_domains=$mydestination null
Attention : postmap: warning: /etc/postfix/main.cf, line 200: overriding earlier entry: relay_domains=hash:/var/lib/mailman3/data/postfix_domains
Attention : postmap: warning: /etc/postfix/main.cf, line 211: overriding earlier entry: relay_domains=$mydestination null
Attention : postmap: warning: /etc/postfix/main.cf, line 211: overriding earlier entry: relay_domains=$mydestination null
postfix: 
  applied: 
    /etc/postfix/main.cf: 
      status: force-updated
    /etc/postfix/relay_recipients.db: 
      status: updated
  pending: 

End of the /etc/postfix/main.cf file:

# Backup MX (secondary MX)
relay_domains = $mydestination null
relay_recipient_maps = hash:/etc/postfix/relay_recipients
maximal_queue_lifetime = 20d

unknown_local_recipient_reject_code = 550
owner_request_special = no

transport_maps =
    hash:/var/lib/mailman3/data/postfix_lmtp
local_recipient_maps =
    hash:/var/lib/mailman3/data/postfix_lmtp
relay_domains =
    hash:/var/lib/mailman3/data/postfix_domains

If I comment the relay_domains = $mydestination null, I solve the issue:

$ sudo diff /etc/postfix/main.cf /etc/postfix/main.cf_bck_2025_09_27
200c200
< #relay_domains = $mydestination null
---
> relay_domains = $mydestination null
$ sudo systemctl restart postfix.service 
$ sudo yunohost diagnosis run --force mail
Succès ! Tout semble OK pour Email ! (+ 2 problème(s) ignoré(s))

(ignored problems are not the one with the mail queue)

1 Like

:united_kingdom: Thank you very much for the suggestion :smiling_face:

I hadn’t made the manual change yet. I just updated from yunohost 12.1.25 to yunohost 12.1.26, and the problem is solved :partying_face:

I still have on question :sweat_smile: :

  • Perhaps since I ran yunohost tools regen-conf postfix, but it didn’t exist before, I see WARNING: The configuration file '/etc/postfix/relay_recipients.db' has been manually modified and will not be updated. Is there a way to put this file back in a position that allows it to be updated?

Thank you in advance, and thank you very much for your help :person_bowing:


:france: Merci beaucoup pour la suggestion :smiling_face:

Je n’avais pas encore fait la modification manuelle, je viens de faire la mise à jour de yunohost 12.1.25 vers yunohost 12.1.26 et le problème est résolu :partying_face:

J’ai encore 1 question :sweat_smile: :

  • Peut-ĂŞtre depuis que j’ai exĂ©cutĂ© yunohost tools regen-conf postfix, en tout cas ça n’existait pas avant, je vois WARNING The configuration file '/etc/postfix/relay_recipients.db' has been manually modified and will not be updated. Existe-t-il un moyen de remettre ce fichier dans un position qui lui permette d’être mis Ă  jour ?

Par avance merci et merci beaucoup pour votre aide :person_bowing:

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