Hello,

Yes OpenSMTPD can work with Dovecot via LDA, but from my experience LMTP is 
much faster.  With LDA, the LDA process is spawned for every incoming 
connection. With LMTP, you have a single process listening which accepts 
connections via TCP. I've seen my server load drop significantly after 
switching from LDA to LMTP.

To set up LMTP, you can do this in smtpd.conf:

#Accept email for these domains and recipients
table vdomains "file:/usr/local/etc/mail/vdomains"
table recipients "file:/usr/local/etc/mail/recipients"

#Other accept lines included to show where to place the LMTP line
accept from any for domain <vdomains> recipient <recipients> relay via 
lmtp://127.0.0.1:2525
accept for local alias <aliases> deliver to mbox
accept tagged DKIM for any relay source <fromIPs> hostnames <hostnamelist>
accept for any relay via smtp://127.0.0.1:10027

In vdomains, just list every virtual domain you have, one domain per line

For recipients, list of virtual users, one user per line ([email protected])

You have to use "relay via" instead of deliver because with deliver, OpenSMTPD 
needs to convert the full email address to a local user. Also, relay via can 
only communicate with LMTP via TCP, sadly UNIX sockets don't work.

Of course if you have a high load don't forget to include this in dovecot.conf 
so it won't be the bottleneck

service lmtp {
        inet_listener lmtp {
                address = 127.0.0.1
                port = 2525
        }

        #This is here to handle high traffic
        process_min_avail = 10
}

Hope this helps, and sorry for the long email

-----Original Message-----
From: Adam Thompson [mailto:[email protected]]
Sent: Sunday, November 2, 2014 2:27 AM
To: Eric Kom; [email protected]
Subject: Re: Support of Dovecot LDA for local delivery

On 14-11-01 02:27 AM, Eric Kom wrote:
> Good day all,
> I'm running a Mail server based on Dovecot and Postfix for 2 years now
> without problem and would like to try OpenSMTPD instead of Sendmail.
> Where can I find an user documentation?
> It is possible for OpenSMTPD to support a MDA like LDA from Dovecot?

Absolutely.

In smtpd.conf, use something like:
> delivery = "mda \"/usr/local/libexec/dovecot/dovecot-lda -a %{rcpt} -d
> %{user.username} -e -f %{sender} -m INBOX\""
then:
> accept from local for local alias <aliases> deliver to $delivery
(etc.)

RTFM: "man smtpd.conf"

--
-Adam Thompson
  [email protected]


--
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]

Reply via email to