[Rspamd-Users] Postfix aliases and Rspamd rcpt to address

Jozef Matický cibula at gamepub.sk
Sat Mar 28 10:15:03 UTC 2020


Hello,

I'm using Postfix with Dovecot LMTP and Rspamd via milter and have one 
problem.
I have some catch-all addresses defined in Postfix (pretty much as an 
alias @gamepub.sk to cibula at gamepub.sk), so e-mail sent to 
-anything- at gamepub.sk gets delivered to cibula at gamepub.sk.
In Postfix I have disabled "receive_override_options = 
no_address_mappings" to expand aliases before the content filter (was 
using amavisd before).
I'm using Dovecot LMTP to verify address deliverrability before the 
queue, which is working as expected. Address first gets expanded from 
-anything- at gamepub.sk to cibula at gamepub.sk, then Dovecot is asked if 
such address exists.

Rspamd however is checking user settings based on the non-expanded rcpt 
-anything- at gamepub.sk instead of the expanded cibula at gamepub.sk, thus no 
scores are assigned as such user doesn't exists in the filter settings 
(as with catch all rcpt can be anything).
In Postfix logs, the non-expanded address is displayed as orig_to=, the 
expanded is displayed as to=.
I was thinking about setting @domain.tld user for Rspamd, but the 
catch-all can be redirected to multiple e-mail addresses and I would 
like to respect individual user settings.
I'm not sure how this behaves with redirects configured on Postfix 
(again as an alias), but I assume I will have the same problem.
Some addresses I have configured are aliased to multiple addresses (to 
deliver single email to multiple mailboxes and I assume this will be 
problem as well).

Can someone please advise if this can be somehow configured (to check 
settings of the expanded addresses), if this even is a viable option 
(considering single email, if for example delivered to multiple 
addresses as aliases gets checked multiple times as multiple users, and 
what if one is configured to reject such email and other is not when 
using Rspamd before Postfix queue)?

Thank you.


Postfix log:
Mar 26 14:07:20 zipiju postfix/lmtp[6987]: F230E40383: 
to=<cibula at gamepub.sk>, orig_to=<vub at gamepub.sk>, 
relay=zipiju.bepoint.io[private/dovecot-lmtp], delay=0.02, 
delays=0.01/0.01/0/0, dsn=2.1.5, status=deliverable (250 2.1.5 OK)

Rspamd log:
2020-03-26 14:07:30 #3329(rspamd_proxy) <99c2ac>; proxy; 
rspamd_task_write_log: id: 
<75a2aa243ae14151b6037949e3350e31 at S1000547.vub.sk>, qid: <3D01240383>, 
ip: 212.5.214.167, from: <nonstopbanking at vub.sk>, (default: F (no 
action): [1.50/nan] [DCC_REJECT(2.00){bulk Body=1 Fuz1=5542 Fuz2=many 
;},R_MIXED_CHARSET(1.11){},DMARC_POLICY_ALLOW(-0.50){vub.sk;reject;},RCVD_DKIM_ARC_DNSWL_MED(-0.50){},RCVD_IN_DNSWL_MED(-0.20){212.5.214.167:from;},R_DKIM_ALLOW(-0.20){vub.sk:s=smail1;},R_SPF_ALLOW(-0.20){+ip4:212.5.214.167;},MIME_BASE64_TEXT(0.10){},MIME_GOOD(-0.10){text/plain;},MX_GOOD(-0.01){},ARC_NA(0.00){},ASN(0.00){asn:6855, 
ipnet:212.5.192.0/19, 
country:SK;},DKIM_TRACE(0.00){vub.sk:+;},FROM_EQ_ENVFROM(0.00){},FROM_NO_DN(0.00){},MIME_TRACE(0.00){0:+;},RCPT_COUNT_ONE(0.00){1;},RCVD_COUNT_ZERO(0.00){0;},RWL_MAILSPIKE_GOOD(0.00){212.5.214.167:from;},TO_DN_NONE(0.00){},TO_MATCH_ENVRCPT_ALL(0.00){}]), 
len: 3616, time: 5224.864ms, dns req: 21, digest: 
<596cf435532fd8647f00e2ebebdd69e3>, rcpts: <vub at gamepub.sk>, mime_rcpts: 
<vub at gamepub.sk>

Postfix milter config (12301 is opendkim):
smtpd_milters = inet:localhost:11332,inet:localhost:12301
non_smtpd_milters = inet:localhost:11332,inet:localhost:12301


More information about the Users mailing list