1 (edited by Thierry 2016-04-06 13:29:46)

Topic: Is iRedmail rewriting emails's header by defaut ?

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.3
- Linux/BSD distribution name and version: Debian 8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Mysql
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

Hi,

I am using EFA in front of my iRedmail.
Things are working well ... Execept that I do not see any "X-Spam-Flag:Yes" on my emails 's source ...
I have configured EFA to add "X-Spam-Flag:Yes" on my headers's emails when it is a spam, I see it on my EFA management interface:

Action(s): deliver, header, "X-Spam-Flag:Yes"

But when I check the same email 's source, there is no header: X-Spam-Flag:Yes .... And if this header is not here, sieve cannot work ....
So I would like to know if iRedmail is re-writing the header of emails or not ?

Thx

----

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

2

Re: Is iRedmail rewriting emails's header by defaut ?

Does that mean you do the spam scanning on EFA instead of iRedMail? if so, you may want to disable spam scanning on iRedMail (Amavisd) to avoid this issue:
http://www.iredmail.org/docs/completely … disclaimer

3 (edited by Thierry 2016-04-07 00:47:16)

Re: Is iRedmail rewriting emails's header by defaut ?

ZhangHuangbin wrote:

Does that mean you do the spam scanning on EFA instead of iRedMail? if so, you may want to disable spam scanning on iRedMail (Amavisd) to avoid this issue:
http://www.iredmail.org/docs/completely … disclaimer

I would like to do the scan on both systems, the anti-virus used on both systems are differents, and I would like to keep it as it is   .... But I would like iRedmail not to change the headers ...

Thx

4

Re: Is iRedmail rewriting emails's header by defaut ?

Something strange, those two lines where already "Uncommented" ....

# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code

Does that mean that I was using (I have rectified)  iRedmail without any virus/spam check ?

++

5

Re: Is iRedmail rewriting emails's header by defaut ?

Since Amavisd (+SpamAssassin) will insert X-Spam-Flag header, so i guess it was rewritten by Amavisd. But i didn't find a proper setting to disable this behave. I suggest ask in Amavisd mailing list instead:
https://www.ijs.si/software/amavisd/#support

6 (edited by Thierry 2016-04-07 21:14:25)

Re: Is iRedmail rewriting emails's header by defaut ?

From amavis web site:

First up, we can disable either virus or spam checking by uncommenting the following lines (by default, both virus and spam checking is enabled as the lines are commented out):


### /etc/amavisd.conf:
#
# To disable virus or spam checks, uncomment the following:
#
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
# $bypass_decode_parts = 1;         # controls running of decoders & dearchivers

I can un-comment "@bypass_spam_checks_maps" to ask amavis to stop checking the Spam and leave the "@bypass_virus_checks_maps" as it is ....

Right ?

7

Re: Is iRedmail rewriting emails's header by defaut ?

Yes, that's what i mean in my first reply in this thread.

8 (edited by Thierry 2016-04-07 21:15:03)

Re: Is iRedmail rewriting emails's header by defaut ?

And by the way is there any "@" at the beginny of each lines ? Because there is on Amavis doc but not on Iredmail ....

9

Re: Is iRedmail rewriting emails's header by defaut ?

Thierry wrote:

is there any "@" at the beginny of each lines ?

Yes.

10

Re: Is iRedmail rewriting emails's header by defaut ?

Spam filter on iRedmail seems to still work .... I do not want iRedmail to check for the Spam ....

File 50-user

# Enable virus check.
@bypass_virus_checks_maps = (
   \%bypass_virus_checks,
   \@bypass_virus_checks_acl,
   $bypass_virus_checks_re,
   );

# Enable spam check.
@bypass_spam_checks_maps = (
    \%bypass_spam_checks,
    \@bypass_spam_checks_acl,
    $bypass_spam_checks_re,
    );

****************

 # don't perform spam/virus/header check.
    @bypass_spam_checks_maps => [1],
    #bypass_virus_checks_maps => [1],
    #bypass_header_checks_maps => [1],

****************

File 20-debian_defaults:

$sa_spam_subject_tag = '*SPAM* ';
$sa_tag_level_deflt  = -999;  # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 5; # add 'spam detected' headers at that level
$sa_kill_level_deflt = 12; # triggers spam evasive actions
$sa_dsn_cutoff_level = 10;   # spam level beyond which a DSN is not sent

File 15-content_filter_mode:

#@bypass_virus_checks_maps = (
#   \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);


#
# Default SPAM checking mode
# Please note, that anti-spam checking is DISABLED by
# default.
# If You wish to enable it, please uncomment the following lines:


@bypass_spam_checks_maps = (
   \%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);

1;  # ensure a defined return

What's wrong ?

11

Re: Is iRedmail rewriting emails's header by defaut ?

Is this tutorial help a little?
http://www.iredmail.org/docs/completely … assin.html