YunoHost-Apps / mailman_ynh

Mailman packaging for YunoHost
http://www.list.org/
GNU Affero General Public License v3.0
10 stars 1 forks source link

User unknown in virtual mailbox table #5

Closed red0queen closed 6 years ago

red0queen commented 6 years ago

Hi, When I send mail to mailman, I see in mail.log the following error 550 5.1.1 mailman-join@listes.domain.tld: Recipient address rejected: User unknown in virtual mailbox table

/var/lib/mailman/data/virtual-mailman know this address, but /etc/postfix/main.cf dosen't contain any reference to virtual-mailman. I don't know if it's expected ?

mailman 2.1 yunohost 2.7.9 over debian jessie in LXC

thanks for help

alexAubin commented 6 years ago

Hello,

weeeell, it should :s This hook's job is specifically to modify postfix's conf to add the proper hash things : https://github.com/YunoHost-Apps/mailman_ynh/blob/master/sources/hooks/conf_regen/98-postfix_mailman#L14-L15

But your issue could be due to manual editing of postfix's configuration files. What do you see if you run yunohost service regen-conf postfix --dry-run -d (this won't change anything, but will tell you if postfix's conf file have been edited manually and what's the diff with what yunohost want it to be)

red0queen commented 6 years ago

luky luke ! The output form the regen-conf postfix: applied: pending: /etc/postfix/main.cf: diff: @@ -67,7 +67,7 @@ virtual_mailbox_domains = ldap:/etc/postfix/ldap-domains.cf virtual_mailbox_maps = ldap:/etc/postfix/ldap-accounts.cf virtual_mailbox_base = -#virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman,ldap:/etc/postfix/ldap-aliases.cf +virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman,ldap:/etc/postfix/ldap-aliases.cf virtual_alias_domains = virtual_minimum_uid = 100 virtual_uid_maps = static:vmail @@ -147,4 +147,3 @@

Skip email without checking if milter has died

milter_default_action = accept -virtual_alias_maps = hash:/var/www/emailpoubelle/var/virtual status: modified

Strange, I did'nt change anything in this files from myself. A conflict with emailpoubelle ? I just add the line started by + ?

thanks !

alexAubin commented 6 years ago

Hmmm yes it could be, not sure how you installed emailpoubelle ? But I imagined it just edited the postfix conf file without asking questions, something like that ;)

But thing is, it looks like emailpoubelle also needs a line for virtual_alias_maps, so it looks like you actually need to have this single line to get both :

virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman,ldap:/etc/postfix/ldap-aliases.cf,hash:/var/www/emailpoubelle/var/virtual

Edit : also that means that in your current state, YunoHost mail aliases won't be working either. But having all three (virtual-mailman, ldap-aliases and hash:...emailpoubelle) on the same line should make everything work :+1:

red0queen commented 6 years ago

yeaahhh ! I will reset this test server in some days, and test mailman before install emailpoubelle. If I'm returning in the same case, I suppose open a bug in emailpoubelle is the right thing to do ?

alexAubin commented 6 years ago

Hmmm well that's a tricky thing ¯\_(ツ)_/¯

I don't know how emailpoubelle works, but outside the context of YunoHost, they either "tell the user they should edit postfix's conf manually" or "edit postfix's conf automatically". But as long as emailpoubelle is not integrated in YunoHost (e.g. as an app), it was expected that you would end up in that situation, it's not really anybody's fault I think.

So imho, the short-term fix is just to fix manually your conf file with what with just discussed, and the long-term fix would be to package it as an app.

Another possible thing to do would be to integrate, in the core of yunohost, a mechanism for people to easily create "conf patches" such that you can have like a 2-line script that says that you want to customize your postfix conf with emailpoubelle's stuff. This could even get generated automatically somehow... but that's well beyond the scope of this small issue :wink:

alexAubin commented 6 years ago

(Closing the issue, assuming it's fixed)

ljoets commented 5 years ago

I had the same message after a physical migration (RPi to Proxmox VM) by backup and restore on a fresh ynh install (restore in place of post_install). I need to restore etc/postfix/main.cf and /var/lib/mailman/data/virtual-mailman form the RPi and restart mailman to resolve the problem.