-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathEsp.cf
242 lines (182 loc) · 8.07 KB
/
Esp.cf
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
ifplugin Mail::SpamAssassin::Plugin::Esp
# Score some well known Email Service Providers:
# Sendgrid, Sendinblue, Mailup, Maildome, Mailchimp
#
# To use this plugin, you need to provide a one or more lists of IDs
# or in the case of sendgrid you can also specify sendgrid domains.
# When a message is passed to the plugin, it will return whether the
# message is from one of the IDs (or domains) in one of the respective
# lists.
#
# For sendgrid:
#
# EITHER you can download the files by adding a cronjob
# like this:
# 17 * * * * (cd /etc/mail/spamassassin; wget -q -N http://www.invaluement.com/spdata/sendgrid-id-dnsbl.txt http://www.invaluement.com/spdata/sendgrid-envelopefromdomain-dnsbl.txt)
# or use the script located on contrib directory.
#
# If you want to use an rbl instead, you can set one or both of the variables sendgrid_id_rbl and
# sendgrid_dom_rbl to valid rbl domains to query this database via DNS.
#
# Use either __SPBL_SENDGRID or __RBL_SENDGRID.
# Typically either the files or the rbl method is used but you may use both.
# In that case though, the scores become additive so you may need to adjust them accordingly.
# If scoring via an RBL, you don't need this plugin, only the AsdkDNS
# plugin and those config lines below in the OR THIS section.
#
# For the other ESPs, you will need to create those txt files on your
# own or find a source for this information, this plugin does not
# currently provide advice on where to get that data. If you know of
# any, let us know.
# -------- 4DEM --------
4dem_feed /etc/mail/spamassassin/4dem_id.txt
header FORDEM eval:esp_4dem_check()
describe FORDEM Message from 4Dem abused account
score FORDEM 5.0
# -------- ACELLE --------
acelle_feed /etc/mail/spamassassin/acelle_id.txt
header ACELLE eval:esp_acelle_check()
describe ACELLE Message from Acelle abused account
score ACELLE 5.0
# -------- AMAZON SES --------
amazon_feed /etc/mail/spamassassin/amazonses_id.txt
header AMAZON eval:esp_amazonses_check()
describe AMAZON Message from Amazon SES abused account
score AMAZON 5.0
# -------- BEMAIL --------
4dem_feed /etc/mail/spamassassin/be-mail_id.txt
header BEMAIL eval:esp_be_mail_check()
describe BEMAIL Message from Be-Mail abused account
score BEMAIL 5.0
# -------- CONSTANTCONTACT --------
constantcontact_feed /etc/mail/spamassassin/constantcontact_id.txt
header CONSTANTCONTACT eval:esp_constantcontact_check()
describe CONSTANTCONTACT Message from Constant Contact abused account
score CONSTANTCONTACT 5.0
# -------- ECMESSENGER --------
ecmessenger_feed /etc/mail/spamassassin/ecmessenger_id.txt
header ECMESSENGER eval:esp_ecmessenger_check()
describe ECMESSENGER Message from Ec Messanger abused account
score ECMESSENGER 5.0
# -------- EMARSYS --------
emarsys_feed /etc/mail/spamassassin/emarsys_id.txt
header EMARSYS eval:esp_emarsys_check()
describe EMARSYS Message from EMarSys abused account
score EMARSYS 5.0
# -------- EMLBEST --------
emarsys_feed /etc/mail/spamassassin/emlbest_id.txt
header EMLBEST eval:esp_emlbest_check()
describe EMLBEST Message from Emlbest abused account
score EMLBEST 5.0
# -------- EXACTTARGET --------
exacttarget_feed /etc/mail/spamassassin/exacttarget_id.txt
header EXACTTARGET eval:esp_exacttarget_check()
describe EXACTTARGET Message from ExactTarget abused account
score EXACTTARGET 5.0
# -------- FXYN --------
fxyn_feed /etc/mail/spamassassin/fxyn_id.txt
header FXYN eval:esp_fxyn_check()
describe FXYN Message from Fxyn abused account
score FXYN 5.0
# -------- KEYSENDER --------
keysender_feed /etc/mail/spamassassin/keysender_id.txt
header KEYSENDER eval:esp_keysender_check()
describe KEYSENDER Message from Keysender abused account
score KEYSENDER 5.0
# -------- KLAVIYO --------
klaviyo_feed /etc/mail/spamassassin/klaviyo_id.txt
header KLAVIYO eval:esp_klaviyo_check()
describe KLAVIYO Message from Klaviyo abused account
score KLAVIYO 5.0
# -------- MAILCHIMP --------
mailchimp_feed /etc/mail/spamassassin/mailchimp_id.txt
header MAILCHIMP eval:esp_mailchimp_check()
describe MAILCHIMP Message from Mailchimp abused account
score MAILCHIMP 5.0
# -------- MAILDOME --------
maildome_feed /etc/mail/spamassassin/maildome_id.txt
header MAILDOME eval:esp_maildome_check()
describe MAILDOME Message from Maildome abused account
score MAILDOME 5.0
# -------- MAILGUN --------
mailgun_feed /etc/mail/spamassassin/mailgun_id.txt
header MAILGUN eval:esp_mailgun_check()
describe MAILGUN Message from Mailgun abused account
score MAILGUN 5.0
# -------- MAILUP --------
mailup_feed /etc/mail/spamassassin/mailup_id.txt
header MAILUP eval:esp_mailup_check()
describe MAILUP Message from Mailup abused account
score MAILUP 5.0
# -------- MCONTACT --------
mdengine_feed /etc/mail/spamassassin/mcontact_id.txt
header MCONTACT eval:esp_mcontact_check()
describe MCONTACT Message from MContact abused account
score MCONTACT 5.0
# -------- MDENGINE --------
mdengine_feed /etc/mail/spamassassin/mdengine_id.txt
header MDENGINE eval:esp_mdengine_check()
describe MDENGINE Message from MDEngine abused account
score MDENGINE 5.0
# -------- MDRCTR --------
mdrctr_feed /etc/mail/spamassassin/mdrctr_id.txt
header MDRCTR eval:esp_mdrctr_check()
describe MDRCTR Message from Mdrctr abused account
score MDRCTR 5.0
# -------- MSND --------
msnd_feed /etc/mail/spamassassin/msnd_id.txt
header MSND eval:esp_msnd_check()
describe MSND Message from Msnd abused account
score MSND 5.0
# -------- SALESFORCE --------
salesforce_feed /etc/mail/spamassassin/salesforce_id.txt
header SALESFORCE eval:esp_salesforce_check()
describe SALESFORCE Message from Salesforce abused account
score SALESFORCE 5.0
# -------- SENDGRID - EITHER THIS --------
sendgrid_feed /etc/mail/spamassassin/sendgrid-id-dnsbl.txt
sendgrid_domains_feed /etc/mail/spamassassin/sendgrid-envelopefromdomain-dnsbl.txt
header __SPBL_SENDGRID eval:esp_sendgrid_check()
describe __SPBL_SENDGRID Message from Sendgrid abused account
# -------- SENDGRID - OR THIS --------
# Substitute <LICENSEKEY> with your Invaluement SPBL license key
ifplugin Mail::SpamAssassin::Plugin::AskDNS
askdns __RBL_SENDGRID_ID _SENDGRIDID_.sendgrid-id.<LICENSEKEY>.invaluement.com A 127.0.0.2
describe __RBL_SENDGRID_ID Sendgrid Id blacklist
if can(Mail::SpamAssassin::Conf::has_tflags_nolog)
tflags __RBL_SENDGRID_ID net nolog
else
tflags __RBL_SENDGRID_ID net
endif
askdns __RBL_SENDGRID_DOM _SENDGRIDDOM_.sendgrid-efd.<LICENSEKEY>.invaluement.com A 127.0.0.2
describe __RBL_SENDGRID_DOM Sendgrid domain blacklist
if can(Mail::SpamAssassin::Conf::has_tflags_nolog)
tflags __RBL_SENDGRID_DOM net nolog
else
tflags __RBL_SENDGRID_DOM net
endif
endif # Mail::SpamAssassin::Plugin::AskDNS
meta RBL_SENDGRID (__RBL_SENDGRID_ID || __RBL_SENDGRID_DOM || __SPBL_SENDGRID)
describe RBL_SENDGRID Sendgrid blacklist
score RBL_SENDGRID 5.0
# -------- SENDINBLUE --------
sendinblue_feed /etc/mail/spamassassin/sendinblue_id.txt
header SENDINBLUE eval:esp_sendinblue_check()
describe SENDINBLUE Message from Sendinblue abused account
score SENDINBLUE 5.0
# -------- SMTPCOM --------
smtpcom_feed /etc/mail/spamassassin/smtpcom_id.txt
header SMTPCOM eval:esp_smtpcom_check()
describe SMTPCOM Message from SmtpCom abused account
score SMTPCOM 5.0
# -------- SPARKPOST --------
sparkpost_feed /etc/mail/spamassassin/sparkpost_id.txt
header SPARKPOST eval:esp_sparkpost_check()
describe SPARKPOST Message from Sparkpost abused account
score SPARKPOST 5.0
# -------- TURBOSMTP --------
turbosmtp_feed /etc/mail/spamassassin/turbosmtp_id.txt
header TURBOSMTP eval:esp_turbosmtp_check()
describe TURBOSMTP Message from TurboSmtp abused account
score TURBOSMTP 5.0
endif # Mail::SpamAssassin::Plugin::Esp