<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style>
</head>
<body><div>Hi,<br></div>
<div><br></div>
<div>The "defaultdomain" is the domain that's assumed by Cyrus for users that are uid only.  Any other domain needs to be explicitly specified in the user (this applies to login, delivery, etc).  So, if you have:<br></div>
<div><br></div>
<div>      defaultdomain: foo.com<br></div>
<div><br></div>
<div>then "user" and "<a href="mailto:user@foo.com">user@foo.com</a>" are the same account (and can login using either variation), but "<a href="mailto:user@bar.com">user@bar.com</a>" is some other account and can only login as "<a href="mailto:user@bar.com">user@bar.com</a>".<br></div>
<div><br></div>
<div>It's not clear to me how you wish to use the extra domains.  Do you want your existing users to be able to send/receive from multiple different domains?  (e.g. user "anne" has both email addresses "<a href="mailto:anne@foo.com">anne@foo.com</a>", "<a href="mailto:anne@bar.com">anne@bar.com</a>").<br></div>
<div><br></div>
<div>Or do you want accounts in different domains to be not related to each other? (e.g. "<a href="mailto:anne@foo.com">anne@foo.com</a>" and "<a href="mailto:anne@bar.com">anne@bar.com</a>" are <br></div>
<div>two totally different accounts)<br></div>
<div><br></div>
<div>In either case, I would think about having one LDAP attribute (single-value, unique) to represent a user's "primary" email address, and a separate LDAP attribute (multi-value, unique) to represent their "aliases".  You would set up Cyrus to only consider the "primary" attribute, and then set up your SMTP server to deliver email destined for "alias" addresses to  the "primary" address for the matching account.  I believe this is a common enough configuration that it shouldn't be hard to find information online.  I have managed (non-Cyrus) systems that worked like this in the past, but it was a long time ago so I can't offer much specific help.<br></div>
<div><br></div>
<div>As for autocreate, it is not  compiled in by default, it needs to be turned on at build time with the --enable-autocreate argument to configure.  If you installed Cyrus from a distribution, your distribution may have done this for you.<br></div>
<div><br></div>
<div>If you don't want to recompile to remove the feature, you can control it using the autocreate_* options in imapd.conf (see man imapd.conf.5).  For example you should be able to use "autocreate_users" to limit it only to certain LDAP groups rather than every valid login (if that is useful to you).<br></div>
<div><br></div>
<div>But if you set up your LDAP directory and Cyrus such that each user only has a single "primary" email address that they can use in Cyrus, and map delivery to aliases outside of Cyrus, then people won't be able to login with the "wrong" alias, and therefore autocreate won't accidentally make new accounts for them. :)<br></div>
<div><br></div>
<div>Cheers,<br></div>
<div><br></div>
<div>ellie<br></div>
<div><br></div>
<div>On Fri, Jul 6, 2018, at 2:42 AM, Heiler Bemerguy via Info-cyrus wrote:<br></div>
<blockquote type="cite"><p>Hi,<br></p><p>Yeah "virtdomains" is set to "userid". The "defaultdomain" was
      commented out. By setting it to "ourcompany.com.br", it prevented
      the creation of another mailbox inside
      "domain/o/ourcompany.com.br" sucessfully, thanks. <br></p><p>But now I got another problem. We used to have other "default"
      domains like that. Like "companyalias.com.br",
      "companyalias2.com.br"... So is there a way to use <b>more than
        one</b> "defaultdomain", to block the creation of redundant
      mailboxes..?<br></p><div><br></div>
<div>Em 04/07/2018 11:48, Vladislav Kurz
      escreveu:<br></div>
<blockquote type="cite" cite="mid:1f3eeef2-a3b7-ca33-fe70-76996056beff@webstep.net"><pre>On 07/04/18 16:37, Heiler Bemerguy via Info-cyrus wrote:
<br></pre><blockquote type="cite"><pre>*The problem is:* When I authenticate with @ourcompany.com.br, it
auto-creates *another *mailbox
(//var/spool/cyrus/mail/domain/o/ourcompany.com.br/h/user/heiler^bemerguy//).

As the "ourcompany.com.br" is the default domain, it would be better
(and a lot less troublesome) if it continued to use the old
"//var/spool/cyrus/mail/h/user/heiler^bemerguy" /mailbox/./ *Is it
possible*?
<br></pre></blockquote><pre>Did you set imapd.conf properly? Try this:

virtdomains: userid
defaultdomain: ourcompany.com.br

We used that when moving to multidomain system, but we used SASLDB as
backend (not LDAP).

<br></pre></blockquote><div><br></div>
<pre><br></pre><div>----<br></div>
<div>Cyrus Home Page: <a href="http://www.cyrusimap.org/">http://www.cyrusimap.org/</a><br></div>
<div>List Archives/Info: <a href="http://lists.andrew.cmu.edu/pipermail/info-cyrus/">http://lists.andrew.cmu.edu/pipermail/info-cyrus/</a><br></div>
<div>To Unsubscribe:<br></div>
<div><a href="https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus">https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus</a><br></div>
</blockquote><div><br></div>
</body>
</html>