I am setting up a new mail server using OpenBSD 5.0. Initially this
was the smtpd.conf I went with, based on the guide on calomel.org
(https://calomel.org/opensmtpd.html) and this post on daemon forums
(http://www.daemonforums.org/showthread.php?t=6228).
# cat /etc/mail/smtpd.conf
<snip>
map "virtual" { source db "/etc/mail/virtual.db" }
<snip>
accept from all for domain "domain1.com" alias "virtual" deliver to maildir
accept from all for domain "domain1.org" alias "virtual" deliver to maildir
accept from all for domain "domain1.net" alias "virtual" deliver to maildir
<snip>
# cat /etc/mail/virtual
# Tried both with and with out : separators
[email protected] user1
[email protected] user2
[email protected] user3
[email protected] user4
When I telnet in to send mail to the virtual domains (the primary
domain works fine), I get a rejection...
Mar 19 02:27:35 mail smtpd[31255]: 344f0d39: from=<[email protected]>,
relay=xxx.xxx.xxx.xxx.socal.res.rr.com [xxx.xxx.xxx.xxx],
stat=LocalError (530 5.0.0 Recipient rejected: [email protected])
So I did some more research.
On this page (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/smtpd/makemap.8
), for Revision 1.10, it states that...
- they no longer need an explicit rule in smtpd.conf for EACH domain
instead we introduce the: accept for virtual map "mapname" [...] syntax
which refers to a map that can be manipulated at runtime.
Which matches the man page for smtpd.conf. So, I have tried this in my
smtpd.conf file...
<snip>
# tried with type db and using makemap, switched to plain as a test
map "virtual" { source plain "/etc/mail/virtual" }
<snip>
accept from all for virtual "virtual" deliver to maildir
<snip>
Same problem, mail is rejected.
I have tried a bunch of different things, with no luck. I am guessing
I am missing something very basic. I wish their was more documentation
out there, but I think I have read every page out there. I can't wait
for the book.
Anyone out there have virtual domains working that would be willing to
share their config? Or help point me in the right direction?
thanks
shawn