0

i'm using a mailserver setup with postfix, amavis and spamassassin.

Some parts of my current configuration (Ubuntu 12.04.2):

/etc/amavis/conf.d/20-debian_defaults

$sa_spam_subject_tag = '***SPAM*** ';
$sa_tag_level_deflt  = 2.0;
$sa_tag2_level_deflt = 6.31;
$sa_kill_level_deflt = 6.31;
$sa_dsn_cutoff_level = 10;
$final_spam_destiny  = D_PASS;

/etc/amavis/conf.d/15-content_filter_mode

use strict;
@bypass_virus_checks_maps = (
   \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);
@bypass_spam_checks_maps = (
   \%bypass_spam_checks, \$bypass_spam_checks_re);
1;

All incoming spam is dropped by postfix and isn't delivered with the "***SPAM***" subject tag:

/var/log/mail.log

Jun 19 07:20:07 host amavis[27625]: (27625-04) Blocked SPAM, [209.85.214.175] [209.85.214.175] <[email protected]> -> <[email protected]>, quarantine: l/spam-l+tLTgmVhQi7.gz, Message-ID: <CAPQPMVfXTAWzdV8mpSSfxBnZTRgL5TjEZZnRTz_h1Y65nuzWzQ@mail.sourcedomain.com>, mail_id: l+tLTgmVhQi7, Hits: 999.902, size: 2226, [email protected], 1406 ms
Jun 19 07:20:07 host postfix/smtp[28237]: E650348C126B: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.9, delays=0.46/0/0/1.4, dsn=2.7.0, status=sent (250 2.7.0 Ok, discarded, id=27625-04 - SPAM)
Jun 19 07:20:07 host postfix/qmgr[28163]: E650348C126B: removed

This behavior should be not the case (spam should be delivered with the spam tag). I dont know whats wrong here...

Any help would be very appreciated!

0

2 Answers 2

1

The OP indicated this solved the issue:

Because I'm using a Ubuntu system, the D_PASS settings must be configured in /etc/amavis/conf.d/21-ubuntu_defaults instead of the Debian file. Also the "@local_domains_maps" setting was not set in the /etc/amavis/conf.d/05-domain_id file.

3
  • May fix, but not advisable. Do not edit package files if avoidable. This is avoidable. Anything in 50-user or higher will override ANY previous commands. Try making a /etc/amavis/conf.d/99-my-overrides file and add your commands there. It will not be overwritten on upgrades and will override anything previously loaded.
    – B. Shea
    Jun 12, 2019 at 16:17
  • 50-user even says # # Place your configuration directives here. They will override those in earlier files. (INCLUDING 21-ubuntu-defaults) Why would you think 21-ubuntu is the file to edit? The name is meaningless other than why it was added for descriptive purposes for Ubuntu specific directives.
    – B. Shea
    Jun 12, 2019 at 16:21
  • Please review your answer. He may have indicated it fixed the problem, but this is NOT the way to fix it. ALL directives user may wish to add should be placed in a new custom file for override, or at the very least put in 50-user.
    – B. Shea
    Jun 12, 2019 at 16:35
0

For those finding this question, this is not the proper way to use conf.d fragmented config files. Guessing by the non-answer above that amavis-new was your issue? Probably because you are misusing the conf.d files.

You need to use a single override file. Guess what? One already exists called 50-user, or +preferably+ create your own (such as 99-overrides). You will put ALL amavis-new directives you wish to use in it. NOWHERE else.

Please note that depending on your distribution of amavisd-new, the file below may be within /etc/amavisd/ parent folder instead of /etc/amavis/.

Unless you are already using /etc/amavis/conf.d/50-user for overrides, create a new /etc/amavis/conf.d/99-overrides file. The number part of filename is important - the name part meaningless. "99-" will be read in last and consequently override anything previous. You may wish to MOVE any directives you may have already added in the 50-user (or elsewhere) to this new file. (50-user could get overwritten by amavisd-new package updates.)

You can PASS, REJECT, BOUNCE, DISCARD. Since you want spam delivered without quarantine you "D_PASS" on spam as you have in your OP.

The moral of this story: DO NOT edit repository installed files when you can avoid it.

Amavisd actions reference: https://www.ijs.si/software/amavisd/amavisd-new-docs.html#actions

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .