Get parts from username variable

Timo Sirainen tss at iki.fi
Tue Jan 9 17:50:51 EET 2018


On 7 Jan 2018, at 20.16, Matt . <yamakasi.014 at gmail.com> wrote:
> 
> Hi Guys,
> 
> When I have a username like foo-bar-candy can I get/seperate foo, bar
> and candy as single variables for my storagepath of the usermail ?

If there aren't any @ characters, I think you can kludge this by converting '-' into '@':

auth_username_translation = -@

Then you can use %{username}, %{domain_first} and %{domain_last}




More information about the dovecot mailing list