separate passdb for unix_listener

Marco Fretz marco.fretz at gmail.com
Wed Oct 7 06:10:48 UTC 2015


You can have a separate dovecot instance for smtp-auth and use that
socket in postfix config.

Just use a small config like the one below for the "auth only instance"
and fire it up with "dovecot -F -c /etc/dovecot/dovecot-auth.conf"
you can then copy and adapt the systemd script or what ever to start it
automatically. in that sql-conf you just need a password_query, no
user_query.

---
base_dir = /var/run/dovecot-auth
instance_name = dovecot-auth

passdb {
  driver = sql
  args = /etc/dovecot/dovecot-auth-sql.conf.ext
}

# disable listeners
service imap-login {
  inet_listener imap {
    port = 0
  }
  inet_listener imaps {
    port = 0
  }
}
service pop3-login {
  inet_listener pop3 {
    port = 0
  }
  inet_listener pop3s {
    port = 0
  }
}

service auth {
  unix_listener auth-userdb {
    #mode = 0666
    #user =
    #group = virtual_mail
  }

  # Postfix smtp-auth socket
  unix_listener /var/spool/postfix/private/auth-smtp {
        mode = 0660
        group = virtual_mail
  }

  # Auth process is run as this user.
  #user = $default_internal_user
}
---


On 06.10.2015 17:53, Damon wrote:
> I want to use a separate passed for the unix_listener (postfix smtp-auth) so i can limit access to the smtp server by user/domain using the postfixadmin database.
> I want to let users access map to receive email but not be able to send.
>
> Any ideas?
>
> Thanks
> Damon



More information about the dovecot mailing list