On Sat, 2021-12-25 at 21:32 -0800, Mark Sapiro wrote:
Have you added an Alias Domain for your domain?
After doing that did you run
mailman aliases
or restart mailman to (re)generate the files.postfix_domains postfix_lmtp postfix_vmap postfix_domains.db postfix_lmtp.db postfix_vmap.db
--
First, thanks for your patience. Two steps forward and one step back, here. I have the interface running and I can create a list which *does* send messages to my test recipients.
To answer your question, yes, I did all that, and that generates postfix_domains and postfix_lmtp, but not postfix_vmap. Here's what I got:
$more postfix_domains # AUTOMATICALLY GENERATED BY MAILMAN ON 2021-12-26 22:29:27 # # This file is generated by Mailman, and is kept in sync with the binary hash # file. YOU SHOULD NOT MANUALLY EDIT THIS FILE unless you know what you're # doing, and can keep the two files properly in sync. If you screw it up, # you're on your own.
libertyfp.org libertyfp.org
$more postfix_lmtp # AUTOMATICALLY GENERATED BY MAILMAN ON 2021-12-26 22:29:27 # # This file is generated by Mailman, and is kept in sync with the binary hash # file. YOU SHOULD NOT MANUALLY EDIT THIS FILE unless you know what you're # doing, and can keep the two files properly in sync. If you screw it up, # you're on your own. # Aliases which are visible only in the @libertyfp.org domain. testlist@libertyfp.org lmtp:[mail.libertyfp.org]:8024 testlist-bounces@libertyfp.org lmtp:[mail.libertyfp.org]:8024 testlist-confirm@libertyfp.org lmtp:[mail.libertyfp.org]:8024 testlist-join@libertyfp.org lmtp:[mail.libertyfp.org]:8024 testlist-leave@libertyfp.org lmtp:[mail.libertyfp.org]:8024 testlist-owner@libertyfp.org lmtp:[mail.libertyfp.org]:8024 testlist-request@libertyfp.org lmtp:[mail.libertyfp.org]:8024 testlist-subscribe@libertyfp.org lmtp:[mail.libertyfp.org]:8024 testlist-unsubscribe@libertyfp.org lmtp:[mail.libertyfp.org]:8024
But no postfix_vmap.
However, let me ask another question first:
When running mailman3, do I need to set up a completely different virtual domain for it to run in? My "real" domain name is libertyfp.org, and I'm trying to make mailman work on that domain, e.g. "testlist@libertyfp.org." I'm starting to get the idea that I need to stick a completely different domain in there for the mailinglist. Which I can do -- I've got another two or three domain names to play with. Is it a problem to run the mailinglist on the same domain that the machine sits on for its regular business? A lot of the errors I'm getting seem to be from trying to do regular mail *and* the mailinglist on the same domain.
Now that I've installed all this stuff a couple of times, I can easily re-install for a second virtual domain, if that's what I should be doing.
But, on to what's not working now...
Unfortunately, I seem to have completely screwed the pooch on getting postfix/dovecot to play nicely with respect to *receiving* mail.
First, adding "virtual_alias_domains" (and putting libertyfp.org in it) and commenting out "virtual_mailbox_domains" resulted in postfix ignoring all my virtual mailboxes. Mail still worked, but mail is now being sent to /home/<user>/Maildir instead of /home/vmail/libertyfp/<user>/Maildir -- which means that dovecot, which looks in the virtual mailboxes, is now unaware of new mail. I suppose I could link /home/<user>/Maildir to /home/vmail/libertyfp.org/<user>/Maildir, but I suspect there will be problems and it's not a real fix. But.. .a problem for another day.
Except... the same thing is happening with the mailinglist.
In mailman3:
I set up a test list (testlist@libertyfp.org) and added two test users (one local and one on a different domain). They added just fine, and both received the welcome message.
However, when I replied, both messages bounced with the error that "testlist@libertyfp.org" was "user unknown in virtual alias table."
No problem, I thought. So I added:
testlist@libertyfp.org testlist
to /etc/postfix/virtual, and
testlist libertyfp.org/testlist/Maildir
to /etc/postfix/virtual-mailbox,
and I added testlist as a user:
$ adduser -m testlist
So, now mail from my list members goes to /home/testlist/Maildir, but not to the mailinglist.
I also have managed to get another *different* warning, and the "there ain't no vmap, newbie" error as well:
Dec 26 17:33:11 libertyfp systemd[1]: certbot.service: Consumed 1.041s CPU time. Dec 26 17:33:12 libertyfp postfix/smtpd[46453]: error: open database /opt/mailman/mm/var/data/postfix_vmap.db: No such file or directory Dec 26 17:33:12 libertyfp postfix/smtpd[46453]: error: unsupported dictionary type: #hash Dec 26 17:33:12 libertyfp postfix/smtpd[46453]: connect from billoblog.com[162.144.108.19] Dec 26 17:33:16 libertyfp postfix/trivial-rewrite[46479]: warning: do not list domain libertyfp.org in BOTH virtual_alias_domains and relay_domains Dec 26 17:33:16 libertyfp postfix/smtpd[46453]: warning: hash:/opt/mailman/mm/var/data/postfix_vmap is unavailable. open database /opt/mailman/mm/var/data/postfix_vmap.db: No such file or directory Dec 26 17:33:16 libertyfp postfix/smtpd[46453]: warning: hash:/opt/mailman/mm/var/data/postfix_vmap lookup error for "fplist@libertyfp.org" Dec 26 17:33:16 libertyfp postfix/smtpd[46453]: NOQUEUE: reject: RCPT from billoblog.com[162.144.108.19]: 451 4.3.0 <fplist@libertyfp.org>: Temporary lookup failure; from=<billo@billoblog.com> to=<fplist@libertyfp.org> proto=ESMTP helo=<billoblog.com>
That "you can't have both virtual_alias_domains" and "relay_domains" seems like it should be a clue. But I don't' know what for. Adding virtual_alias_domains really changed things...
Anyway, here's the part of the /etc/postfix/main.cf that I think is likely important. Note that I comments out "virtual_mailbox_domains".
myorigin = localhost
mydestination = localhost, localhost.$mydomain alias_maps = /etc/aliases (which, by the way, just contains "postmaster: root") home_mailbox= Maildir
# add to the end (add ssl support) smtpd_use_tls = yes smtp_tls_mandatory_protocols = !SSLv2, !SSLv3 smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 smtpd_tls_cert_file = /etc/letsencrypt/live/libertyfp.org/fullchain.pem smtpd_tls_key_file = /etc/letsencrypt/live/libertyfp.org/privkey.pem smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
# add to the end (add virtual users) # if specify multiple domains, specify comma or space separated #virtual_mailbox_domains = libertyfp.org virtual_mailbox_base = /home/vmail virtual_mailbox_maps = hash:/etc/postfix/virtual-mailbox virtual_uid_maps = static:20000 virtual_gid_maps = static:20000
# mailman3 changes
owner_request_special = no always_add_missing_headers = yes transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp local_recipient_maps = proxy:unix:passwd.byname $alias_maps hash:/opt/mailman/mm/var/data/postfix_lmtp relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains default_destination_recipient_limit = 30 default_destination_concurrency_limit = 15 virtual_alias_domains = hash:/etc/postfix/domains virtual_alias_maps = hash:/opt/mailman/mm/var/data/postfix_vmap #hash:/etc/postfix/virtual
Here's the postfix maps:
/etc/postfix/domains:
libertyfp.org #
/etc/postfix/virtual:
fp145@libertyfp.org fp145 mailman@libertyfp.org mailman testlist@libertyfp.org testlist
/etc/postfix/virtual-mailbox:
mailman libertyfp.org/mailadmin/Maildir/ fp145@localhost libertyfp.org/fp145/Maildir/ testlist libertyfp.org/testlist/Maildir