[Rspamd-Users] Rspamd, Postfix Milter, Alias Rewriting

Florian D rspamd at fd.mytrap.de
Thu May 27 11:59:29 UTC 2021


I've got a question about using rspamd right with virtual aliases.

I have a postfix+rspamd setup where rspamd is set as the milter of postfix.

I activated bayes per user in rspamd.

I now discovered, that it seems to either ignore "Delivered-To"-header 
or does not get the information by postfix about it, since it only uses 
the bayes data of the alias entries, not of the "final" mailbox entries.

My postfix email/alias setup:
# first user:
aliasB1 at domainB.com -> mailbox at domainA.com
aliasB2 at domainB.com
... etc

# other user:
aliasC1 at domainC.com -> mailbox at domainD.com
... etc

rspamd now looks for user bayes only for the aliases alias*@... , and 
not the "final destination" mailbox at ...

my postfix milter config:
smtpd_milters = inet:localhost:11332
non_smtpd_milters = inet:localhost:11332
milter_protocol = 6
milter_mail_macros =  i {mail_addr} {client_addr} {client_name} 
milter_default_action = accept

# content: aliasB1 at domainB.com mailbox at domainA.com, ...
virtual_alias_maps = hash:/etc/postfix/virtual-aliases.hash
# content: domainA.com, domainB.com, ...
virtual_mailbox_domains = hash:/etc/postfix/virtual-domains.hash
# content: mailbox at domainB.com domainB.com/mailbox/, ...
virtual_mailbox_maps = hash:/etc/postfix/virtual-mailbox.hash

my rspamd bayes config (override.d/classifier-bayes.conf):
users_enabled = true;

I thought the milter runs after rewriting the addresses? Is there a way 
to see it in the log files?

postfix/smtpd[2180804]: connect from ***
postfix/smtpd[2180804]: 928662221263: client=***
postfix/cleanup[2180816]: 928662221263: message-id=<***>
postfix/qmgr[1993116]: 928662221263: from=<***>, size=11592, nrcpt=1 
(queue active)
postfix/smtpd[2180804]: disconnect from *** ehlo=2 starttls=1 mail=1 
rcpt=1 data=1 quit=1 commands=7
dovecot: lmtp(2180831): Connect from local
dovecot: lmtp(mailbox at domainA.com)<2180831><***>: sieve: msgid=<***>: 
stored mail into mailbox 'INBOX'
dovecot: lmtp(2180831): Disconnect from local: Client has quit the 
connection (state=READY)
postfix/lmtp[2180830]: 928662221263: to=<mailbox at domainA.com>, 
orig_to=<aliasB1 at domainB.com>, relay=***[private/dovecot-lmtp], 
delay=1.2, delays=1.1/0.01/0.01/0.02, dsn=2.0.0, status=sent (250 2.0.0 
<mailbox at domainA.com> *** Saved)

[2495621]: #402(normal) <d27aea>; task; rspamd_message_parse: loaded 
message; id: <***>; queue-id: <928662221263>; size: 11249; checksum: <*>
[2495621]: #402(normal) <d27aea>; task; rspamd_task_write_log: id: <***>,
  qid: <928662221263>,
  ip: ***,
  from: <***>,
  (default: F (no action): [-1.51/15.00] 
FROM_NEQ_ENVFROM(0.00){***;users-bounces at lists.rspamd.com;},
HAS_REPLYTO(0.00){users at lists.rspamd.com;},
  len: 11249,
  time: 1051.175ms,
  dns req: 39,
  digest: <*>,
  rcpts: <aliasB1 at domainB.com>,
  mime_rcpts: <users at lists.rspamd.com>
(I removed some "results" from the log)

What do I need to change or enable (either postfix or rspamd?) to see 
better whats wrong or fix this?

Thank you


More information about the Users mailing list