23 votes
Accepted

Spamassassin flagged something as spam that is not spam. How do I tell it so?

There is both specific and general advice that may be useful in this case. Specific The underlying problem here is that Garuda Airlines, bless their little cotton socks, are sending confirmation ...
MadHatter's user avatar
  • 80.4k
14 votes
Accepted

How do I prevent the SPF_HELO_NONE warning when sending from Postfix?

Publish SPF records for HELO/EHLO hostnames The Sender Policy Framework does not only protect MAIL FROM, but also HELO. Whereas the MAIL FROM identity MUST be verified (RFC 7208, 2.4), the ...
Esa Jokinen's user avatar
  • 49.5k
12 votes
Accepted

Mail with DKIM Signature gets T_DKIM_INVALID flag by SpamAssassin

You could give this package a try instead: libmail-dkim-perl One of the walk-throughs linked in the Spamassassin documentation points out a hint that I would recommend to follow: "You should NEVER ...
desasteralex's user avatar
10 votes
Accepted

Is SRS rewriting absolutely necessary for a forwarding mailserver?

It seems to me that what your question boils down to is "how many mail servers out there check SPF records on incoming email?". If it's most of them, SRS is an absolute requirement for a forwarding ...
MadHatter's user avatar
  • 80.4k
10 votes

Is SRS rewriting absolutely necessary for a forwarding mailserver?

SRS seems to be a nice idea on the paper, but doesn't work very well in practice according to the folks of Heinlein Support (they are running a medium sized mail service with over 100000 accounts.) ...
Marc Stürmer's user avatar
8 votes
Accepted

Why would Spamhaus continue to add an IP to the CSS when that IP hasn't sent email recently?

Warning ahead for people experiencing similar issues: NEVER just request unblocking at any spam block list before you figure out what's going on. Those spam blocklist are almost always clever enough ...
anx's user avatar
  • 9,649
7 votes

Amavis / spamassassin setup, how to disable quarantine and get default spamassassin behavior back?

The best solution I found was simply to put this in /etc/amavis/conf.d/50-user: $final_spam_destiny=D_PASS; $final_virus_destiny=D_PASS; This way bad e-mails are either marked SPAM or INFECTED, but ...
user1604240's user avatar
7 votes

Spamassassin flagged something as spam that is not spam. How do I tell it so?

You seem to be using dovecot. I have spent a few weeks trying to figure out a smooth integration, which allows users to easily train the server-side spam filters without having to copy mails. The key ...
Jonas Schäfer's user avatar
7 votes
Accepted

What to do with SpamAssassin after installing Amavis?

According to Ubuntu 14.04 Server Guide Mail Filtering: Amavisd-new is a wrapper program that can call any number of content filtering programs for spam detection, antivirus, etc. You still need ...
Esa Jokinen's user avatar
  • 49.5k
5 votes

Spamassassin: Bypass /etc/resolv.conf DNS for querying DNSBL?

Spamassassin (Mail::SpamAssassin::DnsResolver) uses Net::DNS::Resolver perl module. It should allow you to change nameservers spamassassin uses via RES_NAMESERVERS environment variable.
AnFi's user avatar
  • 6,278
5 votes

Spamassassin, Dovecot and Postfix: Move spam to folder

In my case I was missing include conf.d/*.conf line in dovecot.conf and dovecot did not read configuration from these files including 90-plugins.conf. But I did not include that line because all my ...
mixel's user avatar
  • 426
5 votes

Spamassassin, Dovecot and Postfix: Move spam to folder

To manage filter rule you can use sieve on dovecot. You can put it as global sieve or per user sieve. For global sieve use configuration in /etc/dovecot/dovecot.conf : sieve_global_path = /home/...
dek.tiram's user avatar
  • 111
5 votes

SpamAssassin: avoid FREEMAIL_REPLYTO on Contact Form

I do not think you can do anything about it, as these rules are exactly matching what you're doing. I would say the rules get way too much spam points and discriminates against freemail, as your use ...
allo's user avatar
  • 1,703
5 votes
Accepted

Blocking empty subject line emails from being sent or received?

If you want to REJECT the mail, which would be a good idea as it also informs the sender that you don't want to receive mail with empty subject, you should use Postfix header_checks. Add ...
Esa Jokinen's user avatar
  • 49.5k
5 votes
Accepted

OpenDMARC RFC5322 requirement error: not exactly one Date field

I have resolved this issue thanks to Michael Hampton's comment: It was not to do with Spam Assassin as I initially thought it was. I forgot that OpenDMARC is a milter itself, and assumed the milter ...
Zalerinian's user avatar
5 votes
Accepted

How to match Japanese in spamassassin?

Have you tried to use Mail::SpamAssassin::Plugin::TextCat (language detector)? IMHO You should consider/evaluate it first. header LANGUAGE_ZH X-Languages =~ /\b(?:zh)\b/ describe LANGUAGE_ZH Chinese ...
AnFi's user avatar
  • 6,278
4 votes
Accepted

Debugging spamassassin with postfix

If I understand things correctly then spamassassin (or spamd, as you are using here) can not directly be used as a milter. You need spamass-milter in addition to spamassassin. See here: http://www....
remote mind's user avatar
4 votes

Mail with DKIM Signature gets T_DKIM_INVALID flag by SpamAssassin

This happend because of the missing perl module Mail::DKIM. Without that, every mail with dkim signature will fail the verification. Even those with correct signature. You can find futher information ...
High Ball's user avatar
  • 488
4 votes

Postfix block double extensions in archive attachment

Postfix Header Checks Blocking double extensions can be done with regex. Here is an example of how to block any extension. Create /etc/postfix/header_checks and maybe block some of these ...
Aaron's user avatar
  • 2,859
4 votes

How to get spamassassin working with postfix as a milter

TLDR: Your postfix is connecting to socket of spamd, but should connect to socket of spamass-milter, which stands in between. Look for definition of second socket in your spamass-milter configuration/...
Aleksejs Spiridonovs's user avatar
4 votes

How to configure an email server so that outgoing emails are not classified as spam

That should be the ratio of spaces to non-spaces in a paragraph... try trimming out some whitespace (or add a bunch more text), and that should reduce that factor in that particular SpamAssassin setup....
RVT's user avatar
  • 397
4 votes

Postifx - Dovecot unable to send emails "status=bounced (user unknown)"

Solution 1 (not the best way) Open your master.cf, and search for these rules: smtp inet n - y - - smtpd smtps inet n - y - - ...
Blaatpraat's user avatar
4 votes
Accepted

Does sending out spam rejections contribute to being labeled a spammer?

What you are dealing with is "backscatter", and your mail server's IP address will certainly end up on several major blacklists if it is configured to indiscriminately send bounce messages (non-...
newguise's user avatar
4 votes
Accepted

Spamassasin regex body and header check not working

Your original rules: header __FRAUD_HEADER From =~ /.*@(?!example\.org)/i body __FRAUD_BODY /".*\@example\.org.*"(?!.*\@example\.org.*$)/i meta COMPANY_FRAUD (__FRAUD_HEADER && ...
Adam Katz's user avatar
  • 981
4 votes

Postfix with Spamassassin, discards the spam instead of delivering to spam folder

In order to understand the possibilities it is good to have some conception of the Postfix Architecture. This first picture visualizes your current situation. Postfix processes every message two ...
Esa Jokinen's user avatar
  • 49.5k
4 votes
Accepted

Amavis / Spamassassin - FORGED_SPF_HELO and SPF_HELO_PASS

The rule FORGED_SPF_HELO came from Spamassassin updates. By grepping your configuration folder (/var/lib/spamassassin at least on Debianoids) you'll see the definition: meta FORGED_SPF_HELO ...
Piotr P. Karwasz's user avatar
4 votes

How do I prevent the SPF_HELO_NONE warning when sending from Postfix?

It was as simple as adding the below setting in /etc/postfix/main.cf: smtp_helo_name = $mydomain The message changes to this: -0.0 SPF_HELO_PASS SPF: HELO matches SPF record
Walf's user avatar
  • 430
4 votes
Accepted

Wouldn't setting the DNS server to 127.0.0.1 prevent my system from actually resolving remote hosts? I found this answer

The implied suggestion is to run your own resolver (caching name server) and then configure your system to use that. Just setting /etc/resolv.conf to localhost without running your own name server ...
Bob's user avatar
  • 5,963
4 votes

Wouldn't setting the DNS server to 127.0.0.1 prevent my system from actually resolving remote hosts? I found this answer

Both solutions that you link to suggest that for a mail server (a service that will generally be doing lots of DNS lookups), it's probably better to run your own local resolver server rather than rely ...
Håkan Lindqvist's user avatar
4 votes

SpamAssassin: custom rules and score

You can do that like this: ifplugin Mail::SpamAssassin::Plugin::DKIM score DKIM_SIGNED -0.01 meta DKIM_UNSIGNED !DKIM_SIGNED score DKIM_UNSIGNED 1 endif (Assigning a zero score to a rule ...
Adam Katz's user avatar
  • 981

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