Closed mmatous closed 1 year ago
Persuaded rspamd to mark my test mails for quarantine with multimap and forced_action. Everything proceeded as expected and message got moved to Junk. Log:
smtp: incoming message {"msg_id":"c90245b5","sender":"<sender>","src_host":"mail-4318.protonmail.ch","src_ip":"185.70.43.18:61643"}
smtp: RCPT ok {"msg_id":"c90245b5","rcpt":"<rcpt>"}
smtp/pipeline: quarantined {"check":"milter","milter":"unix:///run/rspamd/milter.sock","msg_id":"c90245b5","reason":"Spam message quarantined"}
smtp: accepted {"msg_id":"c90245b5"}
The main difference is that the correctly handled message failed only milter check but not maddy's internal spf/dkim/dmarc checks.
yahoo.com domain has a strict DMARC policy that tells MTAs to reject messages that fail DMARC check.
Here is the policy: "v=DMARC1; p=reject; pct=100; rua=mailto:d@rua.agari.com; ruf=mailto:d@ruf.agari.com;"
.
Note the "p=reject" part.
This is exactly what happens here:
smtp: DATA error {"check":"dmarc","dkim_domain":"","dkim_res":"none","msg_id":"95ae9d1f","reason":"No aligned identifiers","smtp_code":550,"smtp_enchcode":"5.7.1","smtp_msg":"DMARC check failed","spf_from":"yahoo.com","spf_res":"neutral"}
check: dmarc DMARC check failed
DMARC fails for the message because it fails both SPF and DKIM checks. Probably because it is a message with spoofed sender address - something DMARC/SPF/DKIM are built to protect against.
I see. The line
smtp/pipeline: quarantined {"check":"milter","milter":"unix:///run/rspamd/milter.sock","msg_id":"95ae9d1f","reason":"Spam message quarantined"}
misled me. Apologies.
Describe the bug
Logs claim that a message was quarantined but it seems to have been discarded.
Junk folder in MUA is empty.
sudo maddy imap-msgs list <mail> Junk
is empty.grep
ing for "yahoo"—part of spammer address—in/var/lib/maddy
yields nothing.Using
sudo -u maddy
for listing Junk results inERROR 2023/08/25 00:23:02 could not discover absolute path: stat .: permission denied
, but the same goes for listing INBOX and that gets listed and accepts mail just fine. Everything in/var/lib/maddy
is owned by maddy ~so no idea what that's about~. Figured that out. Kinda. Maddy tries to mess with$CWD
for some reason and gets denied when in my user's home dir. strace:getcwd("/home/user", 4096)
Steps to reproduce
Unknown.
Log files
Configuration file
Environment information