Setting primary_mail to (FirstInitial)(surname) ?

Daniel Hoffend dh at dotlan.net
Fri Jan 24 23:33:50 CET 2014


Hi Paul

for the uid setting you can take the following syntax (it's working on 
my setup this way):
policy_uid = '%(givenname)s'[0:1]%(surname)s.lower()

maybe the following syntax would work for mail (not tested)
primary_mail = '%(givenname)s'[0:1]%(surname)s@%(domain)s

Regards
Daniel

------ Originalnachricht ------
Von: "Paul Fine" <paul_fine at cca.ca>
An: "'Aleksander Machniak'" <machniak at kolabsys.com>; 
users at lists.kolab.org
Gesendet: 24.01.2014 22:38:31
Betreff: RE: Setting primary_mail to (FirstInitial)(surname) ?

>Thanks Aleksander. I have tried several efforts with the policy_uid, it
>definitely doesn't take the same syntax as the default secondary_mail 
>and I
>tried simplifying to no avail. Any suggestion would be appreciated!
>
>Regards
>
>
>
>-----Original Message-----
>From: users-bounces at lists.kolab.org 
>[mailto:users-bounces at lists.kolab.org]
>On Behalf Of Aleksander Machniak
>Sent: Friday, January 24, 2014 8:42 AM
>To: users at lists.kolab.org
>Subject: Re: Setting primary_mail to (FirstInitial)(surname) ?
>
>On 01/23/2014 11:13 PM, Paul Fine wrote:
>>  I would like my default user e_mail addresses to be in the above 
>>format.
>>  For example Mike Hunt = mhunt at mydomain.com 
>><mailto:mhunt at mydomain.com>.
>>
>>  I am able to set secondary_mail to above by: "{0}{1}@{2}":
>>  "format('%(givenname)s'[0:1].capitalize(), '%(surname)s', 
>>'%(domain)s')"
>>  but I can't get this to work for primary_mail
>
>This is not possible with primary_mail (not without code changes), but 
>you
>could try to keep "primary_mail = %(uid)s@%(domain)s" and define 
>policy_uid.
>Policy_uid setting supports the same syntax as secondary_mail or 
>similar
>(there are some differences).
>
>I don't know why primary_mail config is not compatible with 
>secondary_mail.
>I suppose we would accept a patch for this.
>
>>  Also another question. why/what is the second attribute primary_mail
>>  at the bottom of the conf file for. is that global (ie. all domains?)
>
>Globals are in [kolab] section, in domain sections you can overwrite 
>globals
>for specified domains.
>
>--
>Aleksander Machniak
>Web Developer, Kolab Systems AG
>-------------------------------------------------------
>PGP:19359DC1 - http://www.kolabsys.com - http://alec.pl
>_______________________________________________
>users mailing list
>users at lists.kolab.org
>https://lists.kolab.org/mailman/listinfo/users
>
>_______________________________________________
>users mailing list
>users at lists.kolab.org
>https://lists.kolab.org/mailman/listinfo/users



More information about the users mailing list