Leo,
I don't use dovecot lmtp, I deliver directly into maildir for local
users, but here's what works for me:
# smtpd.conf
action "mldir" maildir virtual <vmailstub>
match from any for domain <vdomains> rcpt-to <vaddr> action "mldir"
# table-vmailstub
[email protected] user1
[email protected] user2,[email protected]
I don't know if a simple comma separated list will work for lmtp, or if it even
wants to deliver to external addresses.
ED.
> On 2021, Apr 13, at 12:44 PM, Leo Unglaub <[email protected]> wrote:
>
> Hi,
> i am on the latest OpenBSD release and i have a little email server running.
> It works perfect, very stable. I host the following domains:
>
>> foo.com
>> bar.com
>
> Both of them have some email accounts on them.
>
>> [email protected]
>> [email protected]
>> [email protected]
>
> The config is as follows:
>
>> ##
>> ## Tables
>> ##
>> table aliases file:/etc/mail/aliases
>> table vdomains file:/etc/mail/table-vdomains
>> table vaddr file:/etc/mail/table-vaddr
>> table credentials file:/etc/mail/table-credentials
>> table filter-dyndns file:/etc/mail/table-filter-dyndns
>> table vmailstub file:/etc/mail/table-vmailstub
>> ##
>> ## Listen
>> ##
>> listen on lo0
>> listen on egress tls filter { "check-dyndns" "check-rdns" "check-fcrdns"
>> "dnsbl" }
>> listen on egress port submission tls-require auth <credentials>
>> listen on egress port 25255 tls-require auth <credentials>
>> ##
>> ## Actions
>> ##
>> action "outbound" relay
>> action "local-lmtp" lmtp "/var/dovecot/lmtp" rcpt-to virtual <vmailstub>
>> ##
>> ## Matches
>> ##
>> match from any for domain <vdomains> rcpt-to <vaddr> action "local-lmtp"
>> match auth from any for any action "outbound"
>
>
> Here are the tables:
>
>> # table-vdomains
>> foo.com
>> bar.com
>
>> # table-vaddr
>> [email protected]
>> [email protected]
>> [email protected]
>> [email protected]
>
>> # table-vmailstub
>> [email protected] [email protected]
>> @ dovecot-worker
>
> Up until this point it works perfectly (i remove the TLS stuff from the email
> for clarity)
>
> [email protected], [email protected] and [email protected] can access there emails via
> IMAP over Dovecot, OpenSMTPD hands of emails via lmtp to Dovecot and emails
> send to [email protected] are stored in the [email protected] account.
>
> But here is my problem, now i want to add "forwardings" for some accounts. An
> email send to [email protected] should be stored in the mailbox but also send ot
> [email protected]. Sadly i have no idea on how to do that. Any
> ideas? Maybe i am not finding stuff because "forwarding" is the wrong term
> for this? Maybe you could be so kind to send me off in the right direction.
>
> That would be sooo nice of you!
> Thanks and greetings
> Leo
>