Hi all,

i have the same problem. My current workaround is to use a userbase-table:

action "inbound"  lmtp 127.0.0.1:24 virtual <virtuals> userbase <userinfo>

Instead of:

action "inbound"  lmtp 127.0.0.1:24 virtual <virtuals> user "vmail"

== userinfo table
virtualuser1 1010:1010:/home/vmail
virtualuser2 1010:1010:/home/vmail
virtualuser3 1010:1010:/home/vmail
==



Configuration file (FreeBSD 12.1 - OpenSMTPD 6.6.4p1):

# === General === #
queue ttl 1h
smtp max-message-size 120M

# === TLS Certificates === #
pki mydomain.de cert "fullchain.pem"
pki mydomain.de key  "privkey.pem"

# === Tables === #
table recipients    file:/usr/local/etc/mail/tables/recipients
table outgoing      file:/usr/local/etc/mail/tables/outgoing
table credentials   file:/usr/local/etc/mail/tables/credentials
table virtuals      file:/usr/local/etc/mail/tables/virtuals
table userinfo      file:/usr/local/etc/mail/tables/userinfo

# === Filter === #
filter no_dyndns phase connect match rdns regex { '.*\.dyn\..*', '.*\.dsl\..*' } disconnect "550 no residential connections" filter no_rdns   phase connect match !rdns   disconnect "550 no valid rdns entry" filter no_fcrdns phase connect match !fcrdns disconnect "550 no valid fcrdns entry"

# === Listen === #
listen on em1   inet4 port smtp tls                                               pki mydomain.de filter { no_dyndns, no_rdns, no_fcrdns } listen on em1   inet4 port submission tls-require auth <credentials> senders <outgoing> pki mydomain.de

# === Actions === #
action "inbound"  lmtp 127.0.0.1:24 virtual <virtuals> userbase <userinfo>
action "outbound" relay

# === Handle Messages === #
match from any      for any rcpt-to <recipients> action "inbound"
match from any auth for any action "outbound"

Am 05.04.2020 um 15:54 schrieb Leo Unglaub:
Hey,
thank you for your help. I am going to describe my goal a little bit different, maybe it gets clearer when i do.

I am trying to have a list of email accounts that OpenSMTPD recieves emails for and sends to Dovecot via lmtp without having the email accounts as real system accounts on that server. Currently there is a Postfix running for that usecase and in there i have virtual maps for those cases:

 - virtual_mailbox_maps
 - virtual_mailbox_domains

But i want to switch that server from Postfix to OpenSMTPD because i like OpenSMTPD much more and it comes with OpenBSD in base.

So i am looking for a way to recieve emails for accounts that dont have a system account on that server and just send them to Dovecot.

An alias map is not helping me here because i cannot say

us...@foo.com: us...@foo.com

As far as i understand it, that would create a loop.

Thanks and greetings
Leo

Am 05.04.2020 um 14:35 schrieb Tassilo Philipp:
I might be misunderstanding what you are trying to achieve, but it sounds to me that you need mail aliases.

Check the "alias" option of "action", and also the section "Aliasing tables" in table(5).

hth


Reply via email to