Open svargh opened 8 months ago
Could you not simply add an alias (or another mailbox + forwarding) for each user, called ua
, ub
, or bla
? Of course you would have to assign them rights to send under that name in the mailcow UI, just as you assign them regexes now. Then they could send mail as ub+onlineshopxxx@example.com
etc. Not exactly the same, but still hiding their real name.
Could you not simply add an alias (or another mailbox + forwarding) for each user, called
ua
,ub
, orbla
? Of course you would have to assign them rights to send under that name in the mailcow UI, just as you assign them regexes now. Then they could send mail asub+onlineshopxxx@example.com
etc. Not exactly the same, but still hiding their real name.
Sounds good! Is it possible to do this without the + symbol or using the dot?
Well, the + is called recipient_delimiter
and you could configure it to something else if you really want (see #1146), but that's not supported and I don't think it can be empty as in the examples in your first post.
Summary
I want to migrate our old postfix system. Users can have multiple flexible permanent identities both for sending and receiving.
It would be nice, if this is natively supported in mailcow:
How I tried to solve it with current Mailcow (2024-01a):
Current state, how I solved it: 1) These identities are defined here and not overlapping: cat /opt/mailcow-dockerized/data/conf/postfix/virtual-regexp /^ua[-.[:alnum:]]*@example.com/ user01@example.com /^ub[-.[:alnum:]]@example.com/ user02@example.com /^bla[-_.[:alnum:]]@example.com/ user02@example.com
Example: Receive (SPAM) email and also reply for these identity <-> mailbox mappings : blablasdacsa@example.com - user02@example.com ubonlineshopxxx@example.com - user02@example.com If user01 tries to send mail as blablasdacsa@example.com or ubonlineshopxxx@example.com, he will get error ("Sender address rejected: not owned by user ")
2) Add in extras.cf using stuff from main.cf virtual_alias_maps = regexp:/opt/postfix/conf/virtual-regexp, proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_alias_maps.cf, proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_resource_maps.cf, proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_spamalias_maps.cf, proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_alias_domain_maps.cf, regexp:/opt/postfix/conf/virtual-regexp smtpd_sender_login_maps = regexp:/opt/postfix/conf/virtual-regexp,proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_sender_acl.cf
Test, that regexp works and not overalapping: docker exec -it -u root mailcowdockerized-postfix-mailcow-1 bash postmap -q "blasd@example.com" regexp:/opt/postfix/conf/virtual-regexp user02@example.com
Motivation
Because the mailbox is loosely coupled to one or more identities for sending and receiving:
Users can keep there real address secret, things like user+randomname@example.com where real mailbox can be easily identified is not a problem.
Sending from an another identity without using the admin GUI because we have once defined wildcard/regexp
Identities can easily be remapped to another mailbox for receiving AND sending
Some identities can be used for more mailboxes. For example receiving amazon mails to amazon@example.com or ebay-private@example.com and also replying for these mailboxes is allowed.
Additional context
No response