> On 23 Dec 2015, at 07:01, Simon McFarlane <[email protected]> wrote:
> 
> I'm attempting to set up a mail server that can serve addresses on several 
> domains. OpenSMTPD works great for a single domain, but I'm having some 
> trouble with mail on multiple domains.

> …

> Let me know what you guys think, or if you know of any other possible 
> solutions.

I use several virtual users/domains on top of (mapping to) just a single system 
user (vmail). 
All maildir folders belong to the user vmail and are managed/handled by dovecot 
(pop3/imap access).
Combined with lmtp and the new rcpt-to keyword it works just fine (no 
underscore hack required):

My smtpd.conf contains:
pki ...
table aliases file:/etc/mail/aliases
table domains file:/etc/mail/domains
table passwd file:/etc/mail/passwd
table virtuals file:/etc/mail/virtuals
listen on lo0
listen on em0 port 25 tls pki ...
listen on em0 port 587 tls-require pki … auth <passwd>
…
accept from local for local alias <aliases> deliver to lmtp "/var/dovecot/lmtp" 
rcpt-to
accept from any for domain <domains> virtual <virtuals> deliver to lmtp 
"/var/dovecot/lmtp" rcpt-to
accept from local for any relay

My domains table contains:
foo.com
bar.com

My aliases table contains:
root:           baz
vmail:          /dev/null
baz:           [email protected]

My virtuals table contains:
[email protected]                [email protected]
[email protected]                     vmail
[email protected]    vmail

My passwd table contains:
[email protected]  $2b$… 
[email protected] $2b$...
--
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]

Reply via email to