Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions

Q0414


`Navigation(siblings)`_


Q0414

Question

I have set caseful_local_part on the routers that handle my local domain because my users have upper case letters in their login names, but incoming mail now has to use the correct case. Can I relax this somehow?

Answer

If you really have to live with caseful user names but want incoming local parts to be caseless, then you have to maintain a file, indexed by the lower case forms, that gives the correct case for each login, like this:

admin:    Admin
steven:   Steven
mcdonald: McDonald
lamanch:  LaManche
...

and at the start of the routers that handle your local domain, put one like this:

set_case_router:
  driver = redirect
  data = ${lookup{${lc:$local_part}}lsearch{/the/file}}
  qualify_preserve_domain

For efficiency, you should also set the redirect_router option to cause processing of the changed address to begin at the next router. If you are otherwise using the default configuration, the setting would be

redirect_router = system_aliases

If there are lots of users, then a DBM or cdb file would be more efficient than a linear search. If you are handling several domains, you will have to extend this configuration to cope appropriately.


Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.