This is what I've got, which isn't working.
# groupadd -g 5000 vmail
# useradd -g vmail -u 5000 -d /var/vmail -m vmail
# chown -R vmail:vmail /var/vmail
# chmod u+w /var/vmail
/etc/dovecot/dovecot.conf:
protocols = imap
listen = *
/etc/dovecot/conf.d/10-mail.conf:
mail_location = maildir:/var/vmail/%d/%n/Maildir
/etc/dovecot/conf.d/10-auth.conf:
!include auth-passwdfile.conf.ext
/etc/dovecot/conf.d/auth-passwdfile.conf.ext:
passdb {
driver = passwd-file
args = scheme=BLF-CRYPT username_format=%n /etc/smtpd/users.db
}
userdb {
driver = passwd-file
args = username_format=%n /etc/smtpd/users.db
}
/etc/dovecot/conf.d/15-lda.conf:
protocol lda {
mail_plugins = $mail_plugins
}
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
2014-04-16 4:59 GMT+02:00 Martin Braun <[email protected]>:
> I finally got OpenSMTPD talking with Dovecot. I am using a users.db
> file which OpenSMTPD has no problems reading and authenticating
> against, but I am getting really tired of Dovecot and its HUGE
> configuration mess (IMHO).
>
> So "foo" sends an email to "bar" and when OpenSMTPD sends the mail
> through to Dovecot it looks like this:
>
> <SNIP>
> debug: smtp: new client on listener: 0x7acc5000
> smtp-in: New session 5318eda411b4f299 from host 192.168.60.8 [192.168.60.8]
> debug: lka: looking up pki "serv1.example.com"
> debug: session_start_ssl: switching to SSL
> smtp-in: Started TLS on session 5318eda411b4f299: version=TLSv1/SSLv3,
> cipher=DHE-RSA-AES128-SHA, bits=128
> debug: lka: authenticating for vpasswd:foo
> smtp-in: Accepted authentication for user foo on session 5318eda411b4f299
> debug: smtp: SIZE in MAIL FROM command
> debug: aliases_virtual_get: '[email protected]' resolved to 1 nodes
> debug: 0x8184b000: end of message, msgflags=0x0000
> smtp-in: Accepted message 16dbd93c on session 5318eda411b4f299:
> from=<[email protected]>, to=<[email protected]>, size=310, ndest=1,
> proto=ESMTP
> debug: scheduler: evp:16dbd93c11fc0afc scheduled (mda)
> mda: new user 5318eda56c11fc0d for "<getpwnam>:bar"
> smtp-in: Closing session 5318eda411b4f299
> debug: lka: userinfo <getpwnam>:bar
> debug: smtp: 0x8184b000: deleting session: done
> debug: mda: new session 5318eda6263cb9cc for user "<getpwnam>:bar"
> evpid 16dbd93c11fc0afc
> debug: mda: no more envelope for "<getpwnam>:bar"
> debug: mda: got message fd 4 for session 5318eda6263cb9cc evpid
> 16dbd93c11fc0afc
> debug: mda: querying mda fd for session 5318eda6263cb9cc evpid
> 16dbd93c11fc0afc
> debug: smtpd: forking mda for session 5318eda6263cb9cc:
> "/usr/local/libexec/dovecot/dovecot-lda -f [email protected] -d
> [email protected]" as bar
> debug: mda: got mda fd 5 for session 5318eda6263cb9cc evpid 16dbd93c11fc0afc
> debug: mda: end-of-file for session 5318eda6263cb9cc evpid 16dbd93c11fc0afc
> debug: mda: all data sent for session 5318eda6263cb9cc evpid 16dbd93c11fc0afc
> </SNIP>
>
> So OpenSMTPD has no problems authenticating foo.
>
> But, Dovecot throws this in maillog:
>
> <SNIP>
> Apr 16 04:42:15 serv1 dovecot: lda: Error: userdb lookup([email protected]):
> Disconnected unexpectedly
> Apr 16 04:42:15 serv1 dovecot: lda: Fatal: Internal error occurred.
> Refer to server log for more information.
> Apr 16 04:42:16 serv1 dovecot: master: Dovecot v2.2.10 starting up for
> imap, lmtp
> Apr 16 04:42:16 serv1 dovecot: master: Error: pipe() failed: Too many open
> files
> </SNIP>
>
> I have no idear how to proceed from here other than trashing Dovecot
> for something simpler? If any exists.
>
> The /etc/smtpd/users.db is shared between the two and it looks like this:
>
> <SNIP>
> foo:$2a$08$Vks5ezM0TWja.fYQ6nCfgOMgKp8VC2QddqtTUw3D0Ykp61pkGkGEC:5000:5000::/var/vmail:/bin/nologin
> bar:$2a$05$7MrgSQcqiphFHhvY9qGTWuihNeF5Hcgt8I0ozkO.lBgAMy39npmYG:5000:5000::/var/vmail:/bin/nologin
> </SNIP>
>
> I actually prefered when Dovecot had just one huge configuration file
> instead of the one gazillion files it has now.
>
> Any ideas?
--
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]