[Samba] Multiple email addresses for user accounts

Willi Schiegel willi.schiegel at posteo.de
Sun Nov 5 10:06:16 UTC 2023


On 11/4/23 11:12, Rowland Penny via samba wrote:
> On Fri,  3 Nov 2023 15:46:07 +0000
> Willi Schiegel via samba <samba at lists.samba.org> wrote:
> 
>>
>> On 11/3/23 16:29, Rowland Penny via samba wrote:
>>> On Fri,  3 Nov 2023 15:13:22 +0000
>>> Willi Schiegel via samba <samba at lists.samba.org> wrote:
>>>
>>>> Hello to all,
>>>>
>>>> how can I have multiple email addresses / aliases for an account? I
>>>> can only set one address with samba-tool's mail-address (mail is a
>>>> single value attribute) and mailAternativeAddress is not found in
>>>> the schemata.
>>>>
>>>> Best regards
>>>> Willi
>>>>
>>>
>>> Isn't 'mailAlternativeAddress' an LDAP attribute ?
>>> I think you use the 'otherMailbox' attribute on AD.
>>
>> Perfect, that's it! Will there possibly be a multi valued option for
>> samba-tool for otherMailbox(es)? Can you point me to some
>> documentation how to script account changes after an account has been
>> created?
>>
> 
> There is always the possibility of additions to samba-tool, someone
> just needs to write them.

I didn't want to complain! I am very grateful that I can use software 
into which so much work has been put by people who are taking the 
project forward.

> As for documentation, this is a bit subjective, what script language
> for instance.
> 
> But it basically boils down to (if adding to an existing user):
> 
> First check the user exists.
> Next check if the user already has the 'otherMailbox' you wish to add.
> 
> If everything is okay then create an ldif like this:
> 
> dn: CN=AD User,CN=Users,DC=samdom,DC=example,DC=com
> changetype: modify
> add: otherMailbox
> otherMailbox: email at domain.tld
> -

I think that was the information I was actually after. Doing it with an 
ldif file.

I still need to find out what attributes the mail solution we are using 
can handle, otherMailbox or proxyAddresses suggested by Ray.

Many thanks Rowland and Ray for your solutions.

Willi

> 
> That will add an 'otherMailbox' attribute, containing the email address
> 'email at domain.tld' to the user 'AD User' in the standard Users
> container on a DC that is the 'samdom.example.com' dns domain.
> To add multiple email addresses, just keep adding the last three lines
> (changing the email address).
> 
> You can then add the ldif with:
> 
> ldbmodify -H ldap://dc1.samdom.example.com -UAdministrator
>   /path/to/your/ldif
> 
> NOTE: the above ldbmodify command should be all on one line.
> 
> Second Note: Obviously, change the sample data with your actual data.
> 
> Rowland
> 
> 
>   
> 



More information about the samba mailing list