Hot answers tagged

7 votes
Accepted

amavis cronjob throwing an error out of nowhere

It appears that some checks that weren't supposed to be released into all update streams have been. See eg https://unix.stackexchange.com/questions/183763/spamassassin-object-method-location-problems-...
  • 79.2k
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 ...
6 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 ...
  • 44.8k
4 votes
Accepted

Enabling Bayesian filter with amavisd-new + Spamassassin

I have recently upgraded the mail server to a new CentOS 7 server (from CentOS 6) that is doing nothing but email and DNS. The previous CentOS 6 server was also running several websites on Apache. I'...
  • 3,453
4 votes
Accepted

How can I fire off a script every time a particular user receives an email?

I found another option that may prove to be a good enough solution: hijacking the message as it's passed from postfix to dovecot. For postfix, I change the following lines in master.cf: dovecot ...
  • 273
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 ...
  • 2,849
4 votes

clamav error: mpool_malloc(): Attempt to allocate 8388608 bytes

Yeah, it hit me too, here is the bug report: https://bugzilla.clamav.net/show_bug.cgi?id=11647 Upgrade to a new version. I guess you have 0.97 version.
  • 41
4 votes

Postfix - Rspamd + amavis

Been in similar situation a few years ago. You can actually remove unnecessary Received: header by adding via master.cf -o header_checks=pcre:/etc/postfix/remove_received.pcre to your smtpd that is ...
  • 2,350
4 votes

Postfix - Rspamd + amavis

You should not use smtpd_proxy_filter and smtpd_milter together. To run Amavis and Rspamd side-by-side consider integrating Amavis with amavisd-milter. smtpd_milter can call different milters, one ...
  • 41
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 ...
4 votes
Accepted

OpenDKIM won't start: "opendkim: milter socket must be specified"

As the error says, you should specify the socket. The mandatory configuration parameter can be found on opendkim.conf documentation: Socket (string) Specifies the socket that should be established by ...
  • 44.8k
3 votes
Accepted

check header for Authenticated sender in postfix

Looks like your case was similar to this example case on Amavisd documentation If for some reason SASL users connect to port 25, as an alternate method you could have all clients in Postfix' $...
  • 18.1k
3 votes
Accepted

Amavis spamassassin per-user configuration without using a database

You can't do that in Amavisd and SpamAssassin combo. You need additional method (ex procmail) for delivering email to SpamAssassin. Excerpt from old archive of SpamAssassin-users mailing list, "...
  • 479
3 votes

Spam and Virus filtering not working with amavis, Spamassasin and ClamAV using Postfix on Ubuntu

In /etc/postfix/main.cf you should have at least this line: content_filter=amavisfeed:[127.0.0.1]:10024 In /etc/postfix/master.cf you should have something like this: amavisfeed unix - - ...
3 votes

How to tell if razor is running?

Use spamassassin binary in debug mode. Taken from this SpamAssassin Wiki: Using Pyzor echo "test" | spamassassin -D pyzor 2>&1 | less or spamassassin -t -D 2>&1 < /tmp/myspam| ...
  • 18.1k
3 votes

Amavis to Postfix forwarding

Thia maillog line Jan 19 13:45:13 mydomain postfix/smtpd[2361]: fatal: unexpected command-line argument: ### was clear indicator that something wrong on master.cf syntax. You already confirmed this ...
  • 18.1k
3 votes
Accepted

Amavis to Postfix forwarding

Oh I feel just so stupid... found the mistake. masegaloeh thx for your hint and sorry for everyone who wasted time cause of my stupidness... I just had a wrong placed comment in my master.cf which I ...
  • 97
3 votes
Accepted

amavis log email hash

In amavisd.conf there is a line up at the top of the file $log_templ= you will want to add %b to that, it will include the MD5 hash of the email in the log. You will probably want to read the README....
  • 10.2k
3 votes

Problems whitelisting senders in Amavis-new

It seems it is not possible to do this in amavis alone. An alternative would be to use a separate policy bank where checking for banned file names is disabled, and let Postfix direct emails from ...
  • 1,754
3 votes

Error with clamd amavisd CentOS 7

tl;dr: setsebool -P antivirus_can_scan_system 1 setsebool -P clamd_use_jit on yum install clamav-scanner-systemd cd /usr/lib/systemd/system cp clamd\@scan.service clamd\@amavisd.service systemctl ...
2 votes

Monit and amavis

I think the correct pidfile path is /var/run/amavisd/amavisd.pid so you are missing a 'd' in 'amavisd' directory name. Start and Stop would work since start/stop paths are ok but pid file won't be ...
  • 21
2 votes

How to Remove UNCHECKED Term Attached in Email Subject Area When Received

The problem of receiving emails having UNCHECKED in the subject can be resolved in two fashions. The first solution is a temporary and quick fix which can lead to other unwanted problems since mails ...
2 votes
Accepted

Postfix very slow delivery

Problem solved - wrong socket file used in amavis configuration, thus causing messages to be deffered. Thank you for your time.
  • 39
2 votes
Accepted

Spamassassin filter based on destination domain

If you use Spam Assassin with Amavisd, then amavisd don't use parameter required_score to determine spam score limit. Instead of this, amavis has three level of score here $sa_tag_level_deflt = 1; # ...
  • 18.1k
2 votes
Accepted

Why does adding /etc/mailname prevent amavis from adding X-spam flags?

As per comment in this serverfault post and here: local_domains_acl is not correctly set. These headers are only inserted for recipients matching local_domains_acl lookup (or %local_domains or $...
  • 155
2 votes

Amavis not found by Postfix

According to the Postfix documentation for the content_filter parameter: After the message is queued, send the entire message to the specified transport:destination. The transport name specifies ...
  • 9,475
2 votes
Accepted

Scan outgoing Postfix email for spam with Spamassassin

If you combine the smtpd_sender_restrictions = check_client_access cidr:/etc/postfix/internal_clients_filter from the answer you found with these instructions for clamsmtp incoming filtering (...
  • 1,222
2 votes

amavisd-new rescans quarantined mails

I guess i found it out: Whitelisting Virus and Spam Recipients works with the following configuration for amavisd-new: @bypass_spam_checks_acl = qw( quarantine@123.de quarantine@456.com ); @...
  • 51
2 votes

Connection refused by AMAVISD-NEW

Looks like you have a typo here. Looks at the error message warning: connect to transport private/amavis: Connection refused You instruct postfix to send email via transport amavis, but in your ...
  • 18.1k

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