Hi All,

I have been wrecking my brain to figure out how to get OpenSMTPD setup with 
virtual domain hosting to achieve the following:

i...@virtualdomain1.tld -> /var/vmail/i...@virtualdomain1.tld/ (Maildir)
i...@virtualdomain2.tld -> /var/vmail/i...@virtualdomain2.tld/ (Maildir)

/var/vmail is owned by vmail:vmail (1001:1001).

My smtpd.conf is:
filter filter-pause pause
filter filter-regex regex
filter all chain filter-pause filter-regex

pki mx1 certificate "/etc/ssl/mx1.crt"
pki mx1 key "/etc/ssl/private/mx1.key"

listen on lo0
listen on egress port 25 filter all tls pki mx1

table aliases file:/etc/mail/valiases
table domains file:/etc/mail/domains
table userinfo file:/etc/mail/userinfo

accept from any for domain <domains> virtual <aliases> userbase <userinfo> 
deliver to maildir
accept from local for any relay

As far as I can find from reading the docs and code is that the tables only 
match on the left side of the email address.
Which means in the above example there is a collision when the left side of the 
email address is the same.

The only way I have been able to get mail delivered, opposed to a "550 Invalid 
recipient" is with:

# /var/mail/domains

# /var/mail/valiases
i...@virtualdomain1.tld    info
info    info

# /var/mail/userinfo
info    1001:1001:/var/mail/virtual/i...@virtualdomain1.tld

Which in my mind means that the domain doesn't come into play at all, except of 
course for accepting for the domain in the table.
Any other way, for example the below, results in a "550 Invalid recipient".

# /var/mail/domains

# /var/mail/valiases
i...@virtualdomain1.tld    i...@virtualdomain1.tld

# /var/mail/userinfo
i...@virtualdomain1.tld    1001:1001:/var/mail/virtual/i...@virtualdomain1.tld

The end goal is to move the files to either sqlite or MariaDB.
Am I missing the bloody obvious or is it not possible, to have overlapping left 
hand side of the email addresses, without remapping in the aliases table?



You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org

Reply via email to