On 2022-05-21 16:07, post...@ptld.com wrote:
What is the best option for changing the recipient address case such
as forcing all to be lowercase?

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.

the regexp can be tested with postmap

postmap -q sample-query regexp:/path-to-virtual-regexp-file

i dont know more :)

make mysql only give results in lowerCASE is imho more simple

from dovecot

    auth_username_format=%{if;%d;eq;hostname.startdedicated.de;%Ln;%Lu}

which is working fine. However you can use %n instead %Ln and %u instead %Lu, if you are using usernames in uppercase or uppercase/lowercase mix. change hostname.startdedicated.de to fqdn-hostname of your server.

dont know if postfix can have mysql maps to make it in postfix aswell, users can make anyCaSe on domain names and localuser aswell, with a map to do EanDomCasekey allways return lowercase is solved, %Lu should be default in dovecot and maybe as needed aswell in postfix mappings

Reply via email to