On Tue, Aug 6, 2024 at 10:46 AM Roland Giesler via Mailman-users < mailman-users@mailman3.org> wrote:
On 2024/08/05 19:59, Mark Sapiro wrote:
I see this reply is now moot as you have now configured list mail to go directly to the Mailman server, but ...
On 8/5/24 03:44, Roland Giesler via Mailman-users wrote:
In the logs of the MTA I see this however: warning: do not list domain fast.za.net in BOTH virtual_mailbox_domains and relay_domains
Mailman creates these entries, but postfix doesn't like it. I don't see any mail delivered to the mailman yet. Is this the problem?
Probably not. It is telling you that mail to the fast.za.net domain cannot both be delivered to local mailboxes (virtual_mailbox_domains) and relayed to foreign hosts (relay_domains)
Thanks, yes, I have since assumed that to be the case.
In the MTA postfix main.cf:
relay_domains = hash:/etc/mailman3/data/postfix_domains
cat /etc/mailman3/data/postfix_domains ...
and also
local_recipient_maps=$virtual_mailbox_maps, hash:/etc/mailman3/data/postfix_lmtp
cat /etc/mailman3/data/postfix_lmtp ...
How about
transport_maps = hash:/etc/mailman3/data/postfix_lmtp
I can't remove the $virtual_mailbox_maps entry, since Power-mailinbox (PMiaB) uses that. It may make Mailman3 work, but break PMiaB).
Then there's: virtual_mailbox_domains=sqlite:/etc/postfix/virtual-mailbox-domains.cf
cat /etc/postfix/virtual-mailbox-domains.cf dbpath=/home/user-data/mail/users.sqlite query = SELECT 1 FROM users WHERE email LIKE '%%@%s' UNION SELECT 1 FROM aliases WHERE source LIKE '%%@%s' UNION SELECT 1 FROM auto_aliases WHERE source LIKE '%%@%s'
When I run that query in sqlite3, it returns no records, so I'm not sure how this is supposed to work. %s to me means that first argument, so is this used in python and then %s is the argument sent to this query?
See https://www.postfix.org/sqlite_table.5.html
%%
is replaced with%
which is a SQL wildcard matching anything and%s
is replaced by the key postfix is looking for, i.e. the domain that it is asking about.So, that query becomes
SELECT 1 FROM users WHERE email LIKE '%@fast.za.net' UNION SELECT 1 FROM aliases WHERE source LIKE '%@fast.za.net' UNION SELECT 1 FROM auto_aliases WHERE source LIKE '%@fast.za.net'
I.e, it returns true if any user or alias or auto_alias has an address ending in '@fast.za.net' and if that's true the mail to any '@fast.za.net' address including list mail will be stored locally.
Ah, thank you! I created a ticket at MiaB about this, so I'll post your response there. The %s had be stumped at first, but now it's clear.
If you really have local users on box2.gtahardware.co.za with addresses '@fast.za.net' and you want to relay list mail to lists '@fast.za.net', you need to see
https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/mta.ht... .
Thank you for that! From that it seems it may still be possible to use PMiaB as my MTA after, but I'll work through that reference and test it and report back.
I think that ALL MTAs have the concept of local domains (for which mails are delivered to 'local mailboxes') and remote domains (aka relay domains) for which mail is relayed to another host which has the mailboxes. So in your case box2.gtahardware.co.za (this is FQDN) could be handling local emails, e.g roland@gtahardware.co.za, johndoe@gtahardware.co.za, etc. Those are local, and so gtahardware.co.za is a local domain. However, fast.za.net is a relay domain and all mail to XXX@fast.za.net should be relayed to the MM3 server. If your MTA does not have this concept, then it's either not ready for prime time or it wasn't intended to have such ability.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]