On 24.05.18 16:14, Reio Remma wrote:
On 24.05.18 16:07, Gilles Chehade wrote:
On Thu, May 24, 2018 at 04:01:32PM +0300, Reio Remma wrote:
On 24.05.18 15:55, Gilles Chehade wrote:
On Thu, May 24, 2018 at 03:53:14PM +0300, Reio Remma wrote:
That's exactly the problem. Alias resolution wasn't possible
before with
relay and I'm wondering if it will be in the future. :)
aliases resolution with relay will not be possible because it makes no
sense, however a mechanism that's somehow similar and that makes sense
for relaying might be possible if we know what your use-case is.
I'm using the common setup where OpenSMTPD relays incoming mail to
amavisd-new and amavisd is scanning all messages, even those that
are sent
to non-existent users.
listen on 0.0.0.0 port 25 tls pki orc.mrstuudio.ee
# Incoming mail from Amavisd (SpamAssassin/ClamAV)
listen on 127.0.0.1 port 10025 tag Filtered
# Accept "Filtered" from Amavisd for delivery.
accept tagged Filtered for domain <domains> virtual <virtuals>
userbase <userinfo> deliver to lmtp "/var/run/dovecot/lmtp" rcpt-to
# Relay incoming mail to Amavisd for spam check and virus scan.
accept from !local for domain <domains> relay via
smtp://127.0.0.1:10024
you can filter recipients in a rule so that it doesnt get matched if the
recipient address is not part of a table.
this is doable in both old grammar and new grammar
Oh, thanks! Now I'm left a little red faced for missing the obvious! :)
I'll have a look at that and how it'll work with SQLite - not entirely
sure which query_ it uses for recipients, but I can glean that from
smtpd debug log.
Reio
It works like a charm.
accept from !local for domain <domains> recipient <recipients> relay via
smtp://127.0.0.1:10024
For posterity - since the *recipient* table uses the same
*query_mailaddr* query as my sender blacklist table, I had to split the
sqlite queries to separate files:
table recipients sqlite:/etc/opensmtpd/sqlite.conf
table blacklist sqlite:/etc/opensmtpd/sqlite-blacklist.conf
Thanks again,
Reio