Hi, I am new to OpenSMTPD (having used Postfix so far), and am unsure about the handling of mixed destination addresses in virtual tables. In Postfix, I had configured something like this:
================================================== /etc/postfix/virtual [email protected] [email protected] [email protected] [email protected], [email protected] [email protected] [email protected] /etc/postfix/mailbox_users [email protected] OK ================================================== Mails to "[email protected]" are delivered via Dovecot (lmtp), while external addresses are handled by Postfix. Instead of the virtual mailbox user, I understand that I need to specify the Dovecot system user (vmail) directly when combining Dovecot with OpenSMTPD: ================================================== /usr/local/etc/mail/virtuals [email protected] vmail [email protected] vmail, [email protected] [email protected] [email protected] ================================================== Now my question is – what happens to messages for external destinations in the following setup: ================================================== /usr/local/etc/mail/smtpd.conf table virtuals file:/usr/local/etc/mail/virtuals [...] action "local_mail" lmtp "/var/run/dovecot/lmtp" rcpt-to virtual <virtuals> action "outbound" relay helo mail.example.com match from any for domain example.com action "local_mail" match for local action "local_mail" match from any auth for any action "outbound" match for any action "outbound" ================================================== When a message to [email protected] or [email protected] arrives, will the expansion through the <virtuals> table insert the resulting message into the cycle again, and if so, will the last rule match (i.e. will the message be considered as coming "from local")? If the message is relayed directly instead, how can I specify additional parameters (e.g. the helo hostname, as in the "outbound" action)? My second question is related to SRS. I did not see the srs option specified explicitly in any example configuration, although it is required in any forwarding scenario (like the one outlined above) – will srs be used implicitly by default, and how do I specify which domains are exempt from srs? I use PostSRSd with Postfix, and have to define an SRS_DOMAIN as well as SRS_EXLUDE_DOMAINS. - Jan
