1

Topic: How do I know spam filtering is active

==== Provide required information ====
iRedAdmin-Pro    v1.3.1 (MySQL)
====

HI. I'm getting a lot of spam still and I'm trying to find out if spam filtering is switched on.

I see no references to anything spam related in files in /var/log and I see no spam headers in messages, either valid messages or ones that mac mail has decided are junk.

Should I not see x-spam type headers with a score and a pass/fail?

Thanks.

Chris.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: How do I know spam filtering is active

You can verify whether it's working as expected with below steps:

- Decrease sa_tag_level_deflt in /etc/amavisd.conf (or /etc/amavid/amavisd.conf), so that amavisd will always insert mail headers in incoming mails:

$sa_tag_level_deflt  = -100;  # add spam info headers if at, or above that level

- Restart amavis/amavisd service and send mail to test it. You will find the headers like this:

X-Virus-Scanned: amavisd-new at r6.iredmail.org
X-Spam-Flag: NO
X-Spam-Score: -1.795
X-Spam-Level:
X-Spam-Status: No, score=-1.795 tagged_above=-100 required=6.2
    tests=[ALL_TRUSTED=-10, DATE_IN_FUTURE_96_XX=3.899,
    NO_DNS_FOR_FROM=1.407, TVD_SPACE_RATIO=2.899] autolearn=no

3

Re: How do I know spam filtering is active

I can't find amavisd.conf anywhere!!

root@mailhost:/etc# vim amavis/
conf.d/      en_US/       README.l10n 
root@mailhost:/etc# vim amavis/conf.d/
01-debian                    15-content_filter_mode       50-user
05-domain_id                 20-debian_defaults           50-user.2012.03.16.12.13.19
05-node_id                   25-amavis_helpers           
15-av_scanners               30-template_localization     
root@mailhost:/etc# cd amavis/
root@mailhost:/etc/amavis# ls -l
total 12
drwxr-xr-x 2 root root 4096 Apr 12 15:42 conf.d
drwxr-xr-x 2 root root 4096 Mar 16 12:16 en_US
-rw-r--r-- 1 root root  978 Dec 16  2010 README.l10n
root@mailhost:/etc/amavis# find / | grep amavisd.conf
/usr/share/doc/amavisd-new/examples/amavisd.conf-default.gz
/usr/share/doc/amavisd-new/examples/amavisd.conf-sample.gz

I can see a cascade of amavis configuration files, perhaps it should be in one of these?

/etc/amavis/conf.d
/etc/amavis/conf.d/01-debian
/etc/amavis/conf.d/30-template_localization
/etc/amavis/conf.d/15-content_filter_mode
/etc/amavis/conf.d/05-node_id
/etc/amavis/conf.d/20-debian_defaults
/etc/amavis/conf.d/15-av_scanners
/etc/amavis/conf.d/05-domain_id
/etc/amavis/conf.d/25-amavis_helpers
/etc/amavis/conf.d/50-user
/etc/amavis/conf.d/50-user.2012.03.16.12.13.19

4

Re: How do I know spam filtering is active

I found it in:

20-debian_defaults

Thanks!

5

Re: How do I know spam filtering is active

chrispyfur wrote:

I can't find amavisd.conf anywhere!!

That's why we asked you to provide basic info when creating new forum topic:

==== Provide required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Any related log? Log is helpful for troubleshooting.
====

With these basic info, we can know the exact file location on your Linux/BSD distribution.

6

Re: How do I know spam filtering is active

I've got this now

$sa_tag_level_deflt  = -100;  # add spam info headers if at, or above that level

and restarted amavisd but still see no spam headers in incoming mail, any ideas?

7

Re: How do I know spam filtering is active

- What's the scanning log in /var/log/mail.log? Try to filter it with command "grep 'amavis' /var/log/mail.log".
- Does it work if you set "$sa_tag_level_deflt" in /etc/amavs/conf.d/50-user? Also, decrease it to -1000 for testing.

8

Re: How do I know spam filtering is active

I can see it passing messages as clean but messages still do not have a spam header, despite $sa_tag2_level_deflt being -100 and amavis being restarted.

Chris.

9

Re: How do I know spam filtering is active

$sa_tag_level_deflt  = -100;

Could you please add this in /etc/amavis/conf.d/50-user (before the last line) and test again?

10 (edited by Jochen 2014-07-17 18:29:46)

Re: How do I know spam filtering is active

Hi,

same here! Debian 7, MySQL and iredMail 0.8.7

$sa_tag_level_deflt  = -9999

in 50-users set but still no SPAM-Headers.

It seems those settings only relate to messages considered "local".
@local_domains_maps ist set in 50-user but not updated after install.

Adding domains to this config and restarting amavisd solves this problem for me. In /var/log/mail.log mails to those domains now carry
Passed Clean/Spammy {RelayedInternal}
wherease they were considered {ReleyedOutbound} before that change.

Is there a way to use the configured domains from the db automatically?

11

Re: How do I know spam filtering is active

Jochen wrote:

Is there a way to use the configured domains from the db automatically?

You can try this instead:

@local_domains_maps = 1;

12

Re: How do I know spam filtering is active

ZhangHuangbin wrote:

You can try this instead:

@local_domains_maps = 1;

This way any mail/domain is considered internal. That is not the effect wanted.

Like the op, I want incoming mail to carry the X-Spam-* Headers. But only incoming.

As to your tipp, this is done with

$sa_tag_level_deflt  = -100;  # add spam info headers if at, or above that level

but that also needs a correct @local_domains_maps

13 (edited by Jochen 2014-07-18 01:27:32)

Re: How do I know spam filtering is active

This is basically the problem from here:
http://www.iredmail.org/forum/topic3800 … sdnew.html

@local_domains_maps = 1 # every Mail is considered inbound

@local_domains_maps = (); # every Mail is considered inbound

Both are not a solution to my problem. Fetching the local domains from db would be ;-)

Although your reply in that old thread seems to hint differently, this works as intended:


#@local_domains_maps = ( [".$mydomain","mail.mydomain.de"] );  # list of all local domains
$sql_select_policy = 'SELECT "Y" AS local FROM domain WHERE CONCAT("@", domain) IN (%k)';

@lookup_sql_dsn = ( ['DBI:mysql:database=vmail;host=127.0.0.1;port=3306', 'vmail', 'your password comes here'] );