Discussion:
[AMaViS-user] Add virus tag to Subject
(too old to reply)
pbr pbr
2007-10-02 18:45:13 UTC
Permalink
Is there any way to add a [virus] tag to the subject line of defanged mail?

Right now I'm doing that with procmail and it seems like an extra step.

I've found a few posts about this in 2004 that indicated a patch that I don't think would work now and that the tag might be included in future versions.

Thanks.

-pbr


---------------------------------
Building a website is a piece of cake.
Yahoo! Small Business gives you all the tools to get online.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
AMaViS-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
Mark.Martinec+ (Mark Martinec)
2007-10-02 22:14:44 UTC
Permalink
pbr,
Post by pbr pbr
Is there any way to add a [virus] tag to the subject line of defanged mail?
Right now I'm doing that with procmail and it seems like an extra step.
I've found a few posts about this in 2004 that indicated a patch that I
don't think would work now and that the tag might be included in future
versions.
$subject_tag_maps_by_ccat{+CC_VIRUS} = [ '***INFECTED*** ' ];

Mark

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
AMaViS-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
pbr pbr
2007-10-02 22:39:02 UTC
Permalink
This post might be inappropriate. Click to display it.
pbr pbr
2007-10-03 03:30:41 UTC
Permalink
Post by Mark.Martinec+ (Mark Martinec)
$subject_tag_maps_by_ccat{+CC_VIRUS} = [ '***INFECTED*** ' ];
I added the above line to the amavisd.conf file and restarted amavisd. Didn't change the Subject line. I'm using amavisd v.2.3.3-2

The mail is getting scanned and has the header:
X-Amavis-Alert: INFECTED, message contains virus: Eicar-Test-Signature





---------------------------------
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
AMaViS-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
Mark.Martinec+ (Mark Martinec)
2007-10-03 12:24:45 UTC
Permalink
This post might be inappropriate. Click to display it.
p***@gmail.com
2019-03-02 21:02:42 UTC
Permalink
This will do the trick. Amavisd On CentOS 7:

nano /etc/amavisd/amavisd.conf

%subject_tag_maps_by_ccat = (
CC_VIRUS, [ '***INFECTED*** ' ],
CC_BANNED, undef,
CC_UNCHECKED, sub { [ c('undecipherable_subject_tag') ] },
CC_SPAM, undef,
CC_SPAMMY.',1', sub { ca('spam_subject_tag3_maps') },
CC_SPAMMY, sub { ca('spam_subject_tag2_maps') },
CC_CLEAN.',1', sub { ca('spam_subject_tag_maps') },
);

$subject_tag_maps_by_ccat{+CC_VIRUS} = [ '[*VIRUS-INFECTED*] ' ];


Restart amavisd & postfix service

service amavisd restart


If you send this email as message body. Amavisd Should Modify Subject [INFECTED]

X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

If you send this email as message body. Amavisd Should Modify Subject [SPAM]

XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X

Prabhpal S. Mavi

Loading...