coordinating 2 amavisd/spamassassin scans -- 1 PRE-queue, 1 POST-queue ?

PGNd dev at pgnd.us
Sat Jun 13 23:04:04 CEST 2015


I run

	postfix 3.0.1
	amavisd-new-2.10.1

I've setup a postfix to use both pre- and post-queue filters.

I' configured amavisd to provide two spamassassin scans, one in each of two policybanks.

The 1st to do 'lighter' pre-queue SA (headers, no bayes) (and other) scans, the 2nd to do 'heavier' SA-only (body + bayes) post-queue work.

The two policy banks use different SA configs

	$sa_configpath = '/var/lib/spamassassin';
	$interface_policy{'10001'} = 'PREQ';
	$policy_bank{'PREQ'} = {
	  protocol => 'SMTP',
	  originating => 0,
	  enable_dkim_verification  => 1,
	  enable_dkim_signing       => 0,
	  bypass_decode_parts       => 0,
	  bypass_spam_checks_maps   => [0],
	  bypass_banned_checks_maps => [0],
	  bypass_header_checks_maps => [0],
	  bypass_virus_checks_maps  => [0],
	  ...
	  sa_siteconfigpath         => '/etc/spamassassin/local/prequeue
	  sa_spam_subject_tag       => ...,
	  sa_tag_level_deflt        => ...,
	  sa_tag2_level_deflt       => ...,
	  ...
	}

	$interface_policy{'10002'} = 'POSTQ';
	$policy_bank{'POSTQUEUE'} = {
	  protocol => 'SMTP',
	  originating => 0,
	  enable_dkim_verification  => 0,
	  enable_dkim_signing       => 0,
	  bypass_decode_parts       => 0,
	  bypass_spam_checks_maps   => [0],
	  bypass_banned_checks_maps => [1],
	  bypass_header_checks_maps => [1],
	  bypass_virus_checks_maps  => [1],
		...
	  ...
	  sa_siteconfigpath         => '/etc/spamassassin/local/postqueue
	  sa_spam_subject_tag       => ...,
	  sa_tag_level_deflt        => ...,
	  sa_tag2_level_deflt       => ...,
	  ...
	}



Question:

With those two policybanks, is

	$sa_num_instances = 1;
	@spam_scanners = (['SpamAssassin','Amavis::SpamControl::SpamAssassin'],);

still sufficient config?

Or must I increase/modify, e.g., eith either/or

	$sa_num_instances = 2;
	@spam_scanners = (['SpamAssassin1','Amavis::SpamControl::SpamAssassin'],
                      ['SpamAssassin2','Amavis::SpamControl::SpamAssassin'],);

?



Question:

Also each SA scan -- prequeue & postqueue -- can add SA headers.

Should both do so, using different header names?  If 2 sets of headers, is there any 'header cooperation' (making the 2nd scan aware of the 1st scans headers) that needs to be orchestrated between then 2 scans, for either functional or performance reasons?


More information about the amavis-users mailing list