On 21.05.22 10:07, post...@ptld.com wrote:
What is the best option for changing the recipient address case such as forcing all to be lowercase?
I think this can be done when receiving mail by postfix by using canonical_maps, sender_canonical_maps and recipient_canonical_maps.
if you want to overwrite header addresses, you must define remote_header_rewrite_domain - without this setting header rewriting is not done.
you should not overwrite remote domains.
All you need is a case folding regexp before your real virtual table. /etc/postfix/main.cf: virtual_maps = regexp:/etc/postfix/virtual_regexp mysql:/etc/postfix/mysql-virtual.cf /etc/postfix/virtual_regexp: /^(.*[A-Z].*)$/ $1 It's a little disgusting, but I expect that it would work. Wietse
I found this from 2003, is it still the best/only way?
Im using virtual_mailbox_maps instead of virtual_maps.
virtual_alias_maps (the successor of virtual_maps) is applied for all recipient addresses in incoming mail, no matter if the destination mail is local.
Note that it only overwrites recipients and only envelope addresses, headers stay intact.
So, you can use virtual_alias_maps to translate destination addresses from uppercase to lowercate AND still use virtual_mailbox_maps to deliver mail to virtual mailboxes.
-- Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. "To Boot or not to Boot, that's the question." [WD1270 Caviar]