Get parts from username variable
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 ?
Thanks,
Matt
On 08.01.2018 03:16, Matt . 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 ?
Thanks,
Matt
The new lua auth backend is probably easiest for this. Dovecot variable manipulation has no separator handling. Or alternatively some dict based script backend.
Aki
On 7 Jan 2018, at 20.16, Matt . yamakasi.014@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}
participants (3)
-
Aki Tuomi
-
Matt .
-
Timo Sirainen