7

This was my final solution after research and help from @tarleb My mail delivery was happening over sendmail program, which was adding some additional headers to my email. I could use a mitter (mail filter) to filter incoming email and drop the sendmail usage, however I decided to change to Dovecot LDA for the delivery. My original filter was, at the ...


5

The problem is that you are setting the HTML_MESSAGE score inside the Shortcircuit plugin. But that plugin comes disabled by default. Try to set the score in the last line of the file, after the Shortcircuit endif instruction: # Some shortcircuiting, if the plugin is enabled # ifplugin Mail::SpamAssassin::Plugin::Shortcircuit # [...] endif # Mail::...


4

That is the direct result of how mails should handled by SMTP servers: each server handling the mail will add a new Received header when processing the mail (as required by RFC 2821). This is what you are seeing. The SpamAssassin service acts as a filter, getting the mail from postfix and sending the result back to postfix. Postfix is hence receiving the ...


3

You can feed an arbitrary message to spamassassin by piping it to spamc -R. You'll get a spamassassin report on your message that looks like 1.5/5.0 1.5 : -0.0 NO_RELAYS Informational: message was not relayed via SMTP 0.1 MISSING_MID Missing Message-Id: header -0.0 NO_RECEIVED Informational: message has no Received ...


3

You can not create a directory with touch, use mkdir for this: mkdir -p "$HOME"/mail/.sa-learn/{cur,new,tmp} The -p flag tells mkdir to create all intermediate folders if they do not exist, and makes it not an error to try to create a folder that already exist. That is assuming a shell that does brace expansion. If it doesn't, break it up inte three ...


2

trusted_networks is not the correct way of doing this within SpamAssasin. However, this can be done by setting a blacklist_from filter. The docs explain this well. If the IP you are trying to block is spam, it may also be worth using iptables or ufw to block it as well, for added security. iptables -A INPUT -s x.x.x.x -p tcp --dport 25 -j DROP iptables -...


2

The README for SpamAssassin talks about the convoluted way that SpamAssassin reads its own data files. Start reading at line 95: http://svn.apache.org/viewvc/spamassassin/branches/3.4/README?view=markup#l95 From reading that, it seems that SpamAssassin, at least in the original, official source, does not read from /etc/spamassassin/ at all, but rather ...


1

If the rule uses regular expressions (it looks like it does), then change /^To:.targetuser@ourcompanyshostname.org/ REJECT to /^To:.*targetuser@ourcompanyshostname.org/ REJECT The .* allows for any string to occur between To: and targetuser@. Note that this will also reject emails sent to someothertargetuser since that would also match the expression.


1

Looks like v2.1 of Dovecot is where this got enabled, so the amazon repo has an older version.


Only top voted, non community-wiki answers of a minimum length are eligible