# Amavis not referencing correct tag, tag2 and kill values

## hanj

Hello all

I tried to upgrade Amavisd-new to 2.11.0-r3. After doing so, I noticed *good* emails were quarantined. Good - meaning low score. I didn't know what was up, so I quickly rolled it back to 2.8.1-r1 and restored the config and restarted. The problem continued!

The problem is intermittent, and not all mail accounts seem to be affected - but good emails are being quarantined.

I've isolated the problem further. It appears that the amavis is not handling the proper values for tag, tag2 and kill options. It shows 0 for those.. here is a snippet.

```
Feb  1 18:48:09 comp amavis[2370]: (02370-05) header: X-Spam-Flag: YES\n

Feb  1 18:48:09 comp amavis[2370]: (02370-05) header: X-Spam-Score: 1.247\n

Feb  1 18:48:09 comp amavis[2370]: (02370-05) header: X-Spam-Level: *\n

Feb  1 18:48:09 comp amavis[2370]: (02370-05) header: X-Spam-Status: Yes, score=1.247 tag=0 tag2=0 kill=0 tests=[AWL=0.873,\n\tBAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\n\tHEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_IMAGE_RATIO_08=0.001,\n\tHTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,\n\tRP_MATCHES_RCVD=-0.001, SARE_UNI=0.591, SUBJ_DOLLARS=1.8,\n\tURIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no\n
```

This person is using the 'Trigger Happy' policy which has tag=-999, tag2=5 and kill=5, but as you can see amavis is pulling in 0 for all of those.. and the score of 1.247 exceeds that, and is quarantined, and it shouldn't be.

Now, I did additional tests. If I create a custom policy for a test user, the behavior is the same as above, but let's say I set spam_lover to Y instead of N, then the mail is tagged. So amavis is definitely able to read the table, but the values from tag*/kill are not handled after receiving the values.

For now, to stop further good emails being quarantined, I turned off the database integration. Now, amavis falls back to the values in the config.. and it's working, but obviously not with custom policies.

Any help is greatly appreciated.

Here are relevant packages I'm using..

amavisd-new-2.8.1-r1

perl-5.22.3

spamassassin-3.4.1-r8

I'm using bayes, razor and dcc (I've disabled all of these for testing with the same result - I don't feel like this is a spamassassin problem, but could be wrong).

Thanks!

hanji

----------

## hanj

Looks like the issue might be related to DBD-mysql...

https://bugs.gentoo.org/show_bug.cgi?id=591998

hanji

----------

