I have a mailing list like:

[email protected]:
        [email protected]
        [email protected]
        [email protected]
        [email protected]

in which, [email protected] is forwarded to:
        [email protected]
        [email protected]

Sending an email to: "[email protected]" will reach the inbox in "
[email protected]", but not "[email protected]". However, sending an
email directly to: "[email protected]" will reach both inboxes.

I have read about similar issues when using virtual mailboxes. I'm using
MySQL:

virtual_alias_maps = mysql:/etc/postfix/mysql.aliases.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql.users.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql.domains.cf
smtpd_sender_login_maps = mysql:/etc/postfix/mysql.users.cf

in which, *mysql.users.cf <http://mysql.users.cf>* is:

SELECT home FROM v_login WHERE user='%s'

Example output:
example.com/yuko/

NOTE:If the user only forwards to another account (has no inbox), or it
doesn't exists, it will not return an output.

*mysql.aliases.cf <http://mysql.aliases.cf>* is:

SELECT address FROM v_alias WHERE email='%s'

Example output:
[email protected],yuko3000

NOTE: 'yuko3000' is the actual account used by the SMTP/POP3/IMAP services
for the email '[email protected]'. In that way, when "user" is "yuko3000" we
know it has a local inbox and it is not a forward only (matching at
mysql.users.cf).

NOTE: It was necessary to remove $myhostname from 'mydestination' while
adding $myhostname (e.g. mail.example.com) as a domain (without accounts)
in order to postfix to accept emails for @example.com accounts. You can
read some details in my answer here: https://serverfault.com/a/1129891/72881

My current setup works fine except for that minor detail.

I'm attaching `postconf -n` output (postfix.conf) and my database structure
(relevant to this issue) and views (mysql.sql).

How can I fix it? If more information is needed, please let me know.

Environment:
Postfix 3.7.3-r0 running in Alpine Linux 3.16.3 inside a Docker container.

Thank you in advance.

Attachment: postfix.conf
Description: Binary data

Attachment: mysql.sql
Description: application/sql

_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to