Hi Leo,

the userinfo table contains all "virtual users" (respectively usernames of dovecot imap-accounts).
See example tables:

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

== virtuals table
i...@mydomain.de virtualuser1
supp...@mydomain.de virtualuser1
buchhalt...@mydomain.de virtualuser2
i...@otherdomain.com virtualuser3
supp...@otherdomain.com virtualuser3

== recipients table

I dont know why userbase/user is required for delivery via LMTP. But that should work.

Best regards

Am 05.04.2020 um 18:54 schrieb Leo Unglaub:
thank you for your response. I have a question to your workaround. In the userinfo table, did you specify every email address in there that is a virtual address? Or did you define the user that does the LMTP deliver to dovecot?

Also, would you mind pasting an example from your recipients and virtuals table? So i could check against my stuff? Maybe i messed the format up somewhere.

Thanks so much and greetings

Am 05.04.2020 um 15:57 schrieb Kai Stammer:
Hi all,

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

action "inbound"  lmtp virtual <virtuals> userbase <userinfo>

Instead of:

action "inbound"  lmtp 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 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:
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

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).


Reply via email to