-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEL_Check_Header_XAmavisAlert.m4
47 lines (36 loc) · 1.58 KB
/
EL_Check_Header_XAmavisAlert.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
divert(-1)dnl
#
# Copyright (c) 2007-2011 hesketh.com/inc. All rights reserved.
# See the file LICENSE in the distribution for details.
#
# questions? <support@enemieslist.com>
#
divert(0)dnl
VERSIONID(`$Id: EL_Check_Header_XAmavisAlert.m4,v 1.5 2011/05/17 18:16:47 schampeo Exp $')
divert(-1)dnl
LOCAL_CONFIG
#------------------------------------------------------------------------
# enemieslist.com X-Amavis-Alert: header ruleset call
#------------------------------------------------------------------------
KEL_Amavis_Alert regex -a<AMAVIS> (BAD\ HEADER|BANNED\ FILENAME|INFECTED)
HX-Amavis-Alert: $>EL_Check_Header_XAmavisAlert
LOCAL_RULESETS
#------------------------------------------------------------------------
# enemieslist.com X-Amavis-Alert: header checks
#------------------------------------------------------------------------
SEL_Check_Header_XAmavisAlert
ifdef(`_EL_TRACE', `dnl
R$* $: $1 $(EL_Log "XAmavisAlert w/ " $1 "; score: " $&{ELSuspiciousCount} "." $)
')dnl
ifdef(`_EL_SKIPLOCAL', `dnl
R$* $: $1 $| $&{client_addr}
R$* $| 127.0.0.1 $@
')dnl
# skip whitelisted hosts
R$* $: $&{ELWhitelisted}
R$+:$+ $@
R$* $: $(EL_Amavis_Alert $&{currHeader} $)
??? need to add in policy token checks, callbacks
R<AMAVIS> $#error $@ 5.7.1 $: ifdef(`confEL_ErrAmavisAlert', `confEL_ErrAmavisAlert', `"554 AMAVIS Contact "$&{ELContactEmail}" if this is in error, but your message was rejected because it failed an Amavis check on the sending host."')
R<AMAVIS> $>EL_TagSuspicious <ifdef(`confEL_TagErrMsgAmavis', `confEL_TagErrMsgAmavis', `"tagged by amavis"')> $| 4
')dnl