On 1 November 2012 15:07, Stephen Ingram <span dir="ltr"><<a href="mailto:sbingram@gmail.com" target="_blank">sbingram@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><div class="h5">On Wed, Oct 31, 2012 at 6:25 PM, Peter Brown <<a href="mailto:rendhalver@gmail.com">rendhalver@gmail.com</a>> wrote:<br>
> On 1 November 2012 08:20, Stephen Ingram <<a href="mailto:sbingram@gmail.com">sbingram@gmail.com</a>> wrote:<br>
>><br>
>> On Tue, Oct 30, 2012 at 6:34 PM, Peter Brown <<a href="mailto:rendhalver@gmail.com">rendhalver@gmail.com</a>> wrote:<br>
>> > Hi everyone,<br>
>> ><br>
>> > I have been trying to work out how to achieve this.<br>
>> > I have freeipa 3.0.0 setup on a Fedora 18 server and I have postfix and<br>
>> > dovecot on my new mail server authenticating against Freeipa.<br>
>> > One last thing I would love to do it pull down the virtual users and<br>
>> > aliases<br>
>> > for the domains my mailserver will be serving from freeipa.<br>
>> > Is this possible?<br>
>> > Is this all automatic due to sssd looking up the user details in the ds?<br>
>> > Does it do the same for domains and email aliases or will I need extra<br>
>> > lookups to achieve this.<br>
>><br>
>> I've recently built an entire mail system around FreeIPA and it works<br>
>> great. There are two parts to be concerned with:<br>
>><br>
>> 1. Authentication - With Postfix, this is handled by saslauthd which<br>
>> can authenticate against Kerberos (using or not using sssd). I used<br>
>> Cyrus-IMAP for the mailstore which also uses saslauthd. Doveccot has<br>
>> it's own sasl built in which can authenticate against Kerberos or<br>
>> LDAP, thus it should work with IPA.<br>
><br>
><br>
> I have dovecot authing against freeipa (via pam)and I setup a sasl auth<br>
> instance in dovecot and have postfix authing against that.<br>
> I figured why setup another sasl auth daemon when dovecot can do it for me<br>
> so they effectively use the same authentication source.<br>
><br>
>> 2. Configuration - With Postfix, you can set all different areas (e.g.<br>
>> virtual, aliases, etc.) to use LDAP lookup of configuration<br>
>> information. You are typically searching for the email address (mail<br>
>> attribute in IPA) and your search will generally return the userid<br>
>> (uid attribute) of where the mail is to be stored. I don't believe<br>
>> that Dovecot or Cyrus-IMAP have any way of maintaining any<br>
>> configuration in LDAP so you generally have to setup mailboxes and<br>
>> authorization information by hand using their tools.<br>
><br>
><br>
> I have most of that worked out but getting delivery addresses for domains<br>
> that aren't the base is proving tricky.<br>
> It's looking like I will need to add some extra schemas to the ds so i can<br>
> add the delivery domain to each user and somehow use that to construct the<br>
> delivery address.<br>
> I am not sure I can do that though.<br>
<br>
</div></div>I didn't really have to add anything except for one extra attribute.<br>
You can group your users into user groups representing the domains<br>
they belong to such that Postfix can query whether or not to accept<br>
for a domain or not. I added mailAlternateAddress for aliases rather<br>
than user multi-value attribute mail so I can have a "master" email<br>
address for each user. It was easy to do with the existing schema<br>
(mailRecipient objectclass). BTW if you haven't already figured it<br>
out, postmap -q is your friend when setting up your LDAP config in<br>
Postfix. Just keep adjusting everything until you get the answer you<br>
(and Postfix) expect.<br></blockquote><div><br></div><div>I discovered that attribute when I was digging around in the ldif files and I was just wondering why they didn't use that for setting aliases.</div><div>It would certainly make my ldap queries for postfix a lot simpler.</div>
<div><br></div><div>I added the mailRecipient class to the defaults for users and tried to use the ipa user-mod --setattr=mailAlternateAddress= and it is telling me</div><div><br></div><div>ipa: ERROR: attribute "mailAlternateAddress" not allowed</div>
<div><br></div><div>I have also trying to set a few other non standard attributes that seem to be in the default schemas already and they all give me the same error.</div><div>Am I missing something?</div><div><br></div><div>
<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">
> I am half tempted to add the extra components of 389-ds and see it that will<br>
> let me do what I need.<br>
><br>
> On a side note the freeipa lads seem to be working out how to add<br>
> multitenancy support so it will be capable of serving multiple separate<br>
> Kerberos principals.<br>
> That would help a lot but I need to cobble something together now.<br>
<br>
</div>Yes, if you want unique uid's within each domain you'll have to wait<br>
for that. I gave up on that notion and simply require unique uids for<br>
every user regardless of domain and deliver to single domain style<br>
mail store setup.<br></blockquote><div><br></div><div><br></div><div>yeah that's tempting but I need to have separate domains.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<br>
Steve<br>
</blockquote></div><br></div>