On 2015-06-16 12:14, [email protected] wrote: > Hello, > > I currently run a personal mailserver using postfix + dovecot (and a few > other things for anti-spam, dkim etc, but i'm not worried about that at > the moment). > > I am very interested in replacing postfix with OpenSMTPD, especially for > clarity of configuration. > > However, I am a little stuck as to how I can get OpenSMTPD and Dovecot > to use the same source for authentication. > > In my current setup, each of my virtual domains has a file called > /var/mail/vhosts/passwd-%DOMAIN% which is in the format of Dovecot's > passwd-file. I then use SASL to provide postfix with a way of > authenticating submissions. > > If you'd like to see how that actually works from a configuration > standpoint, see the following link: > http://slexy.org/view/s20baUvUI8 > > As far as I can tell, OpenSMTPD does not support SASL, therefore > directly copying this approach will not work. > > I don't believe I can customise the format of the auth table for either > OpenSMTPD or Dovecot to make them compatible with each other, so I don't > think that's an option (although if i'm wrong on that point, please let > me know!). > > After spending some time researching I seem to have come across a couple > of references to a passwd table format for OpenSMTPD. It seems to be in > OpenSMTPD-extras, which is not currently a port on FreeBSD. I tried > compiling that particular table format based on instructions from > github, and making sure that I specified the correct directory for the > FreeBSD installation, but it still didn't appear to detect the format > when I started OpenSMTPD (giving the error: "fatal: table_create: > backend "passwd" does not exist"). > > At this point I imagine i'm probably overcomplicating the situation, and > there is a simpler solution. > > Does anybody have a recommended way to do the following?: > - virtual users and domains, not tied to system accounts > - stored in maildir format (using my existing solution of > /var/mail/vhosts/%DOMAIN%/%USER% would be a bonus) > - single source for authentication (I don't mind that being a single > file, rather than my current system of 1 file per domain, so long as I > can have for instance jonathan@DOMAIN1 and jonathan@DOMAIN2 having > different passwords). > > Thanks for taking the time to read my question. > > -- > Jonathan Price > www.jonathanprice.uk > Verify my identity at https://keybase.io/pricetx > > -- > You received this mail because you are subscribed to [email protected] > To unsubscribe, send a mail to: [email protected] >
I documented how I got around this some time ago: https://hugo.barrera.io/journal/2015/02/15/opensmtpd-dovecot-shared-sql-db/ Contrary to other responses, I *am* using lmtp, which means dovecot's filtering (eg: sieve) works. There's some minor issues with that setup and wildcard addresses, but it works find for normal setups. -- Hugo Osvaldo Barrera A: Because we read from top to bottom, left to right. Q: Why should I start my reply below the quoted text?
signature.asc
Description: PGP signature
