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

Gábor Lénárt lgb at lgb.hu
Tue Feb 19 15:48:11 EET 2013


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?

Any feedback is welcomed and thanked.

Thanks,

- Gábor



More information about the dovecot mailing list