Cyrus domain resolution

Vilius Šumskas vilius at lnk.lt
Wed Mar 23 15:20:33 EDT 2011


> >It seems that this is an issue with SASL. Postfix SMTP auth which uses
> >SASL behaves exactly the same. %r is resolved to hostname :(
> >
> >Any ideas?
> 
> plugins/sql.c does:
> 
>      if(sparams->user_realm) {
>          user_realm = sparams->user_realm;
>      } else {
>          user_realm = sparams->serverFQDN;
>      }

NOW I remember! I've patched this code on the old server like this:

 if(sparams->user_realm) {
        user_realm = sparams->user_realm;
 } else {
         user_realm = 'my_default_domain_in_imapdconf.com';
 }

> Where user_realm would represent the sasl realm derived from the sasl
> mechanism used. I don't believe either LOGIN or PLAIN support the passing
> of
> a sasl realm, or generate one.

It does pass the realm if I set it to anything except default one which is configured under imapd.conf. 'anything.domain.com' or even 'completelydifferentdomain.com' works as expected.

Also IMO it makes no sense to default to serverFQDN. Especially when Cyrus IMAPD documentation says that %r in Cyrus defaults to fqdn minus hostname part. Very confusing and time consuming.
 
> You should be able to set a 'servername' value in imapd.conf to essentially
> hard code a value for %r. It may make more sense to disregard %r
> altogether, and get your domain information from %u.

I really don't want to set servername to domain name. This is not "a correct way team".

Do you have a suggestion how to get domain information from %u in imapd.conf?

-- 
  Vilius



More information about the Info-cyrus mailing list