mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
13.91k stars 1.43k forks source link

What does postfix config sqlite query do on mail.-users.sh line 118? #2419

Open lifeboy opened 1 month ago

lifeboy commented 1 month ago

On line 118 of setup/mail-postfix.sh the sqlite query that retrieves the virtual-mailbox-domains for Postfix doesn't make sense to me. Could someone please explain what this query does?

I'm trying to do an integration with Mailman3, but need to see what the actual output of that query is, but I get no result when I run it. However, I do get a warning from Postfix: "warning: do not list domain <mydomainname> in BOTH virtual_mailbox_domains and relay_domains".

I have a couple of users in the users table, some aliases and some auto_aliases, but the SELECT 1 FROM users WHERE email LIKE "%%@%s" returns no results. Neither does the aliases or auto_aliases table with that LIKE condition.
Is this just a place holder for the real query or what's going on here?

Some assistance would be hugely appreciated!

lifeboy commented 1 month ago

I'm wondering if "%s" in the query is actually used when the query is run and it's the first argument/parameter that is passed with the query?