[Dovecot] Using different auth_default_realm on multiple sockets with postfix. Is it possible?

Timo Sirainen tss at iki.fi
Fri Feb 22 12:25:10 EET 2013


On 19.2.2013, at 15.48, Gábor Lénárt <lgb at lgb.hu> wrote:

> Hi,
> 
> I have more postfix smtpd instances (via master.cf) listening on different
> ports, and the FW passes the inbound mail submit connections to the right
> port. The problem: it seems postfix is not able to append "default realm"
> and I need to set different values for the instances. As far as I see, it's
> not possible as postfix only passes the base64 encoded string from the user
> to the dovecot auth service (as I'm using dovecot for sasl authentication).
> We're talking about PLAIN and LOGIN methods.
> 
> In the other hand, dovecot is happily append "realm" with
> auth_default_realm. It works (which does not with postfix) but again: I need
> more defaults. I wouldn't like to run multiple instances of dovecot (just
> for having a single setting be different), so I've tried similar solutions:
> 
> service auth {
>  unix_listener /var/spool/postfix/private/auth-dom1 {
>    group = postfix
>    mode = 0660
>    user = postfix
>  }
>  auth_default_realm = domain1.com
> }
> 
> And the same for /var/spool/postfix/private/auth-dom2 with domain2.com.
> 
> I thought then I could use postfix's master.cf to give different auth socket
> (like /var/spool/postfix/private/auth-dom1 and auth-dom2) with
> smtpd_sasl_path postfix parameter.
> 
> However it seems dovecot finds auth_default_realm invalid unless it's used
> in the global scope of the configuration.
> 
> It's dovecot 2.0.19 (in Ubuntu 12.04 LTS).
> 
> Is it possible at all, what I would like to do? Maybe with newer dovecot, or
> can you suggest me some other solution?

Best you can do now is to run two Dovecot instances with different configs.




More information about the dovecot mailing list