Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tighten rspamd's attachment policy #4656

Merged
merged 6 commits into from Oct 25, 2023
Merged
31 changes: 25 additions & 6 deletions src/plugins/lua/mime_types.lua
Expand Up @@ -52,16 +52,10 @@ local settings = {
},

bad_extensions = {
bat = 2,
chm = 4,
com = 2,
cue = 2,
exe = 1,
hta = 2,
iso = 4,
jar = 2,
lnk = 4,
scr = 4,
-- In contrast to HTML MIME parts, dedicated HTML attachments are considered harmful
htm = 1,
html = 1,
Expand All @@ -70,11 +64,21 @@ local settings = {
-- Have you ever seen that in legit email?
ace = 4,
arj = 2,
aspx = 1,
asx = 2,
cab = 3,
dll = 4,
dqy = 2,
iqy = 2,
mht = 2,
mhtml = 2,
oqy = 2,
rqy = 2,
sfx = 2,
slk = 2,
vst = 2,
vss = 2,
wim = 2,
-- Additional bad extensions from Gmail
ade = 4,
adp = 4,
Expand Down Expand Up @@ -105,17 +109,23 @@ local settings = {
app = 4,
asp = 4,
bas = 4,
bat = 4,
chm = 4,
cnt = 4,
com = 4,
csh = 4,
diagcab = 4,
fxp = 4,
gadget = 4,
grp = 4,
hlp = 4,
hpj = 4,
hta = 4,
htc = 4,
inf = 4,
its = 4,
jnlp = 4,
lnk = 4,
ksh = 4,
mad = 4,
maf = 4,
Expand Down Expand Up @@ -158,17 +168,26 @@ local settings = {
psd1 = 4,
psdm1 = 4,
pst = 4,
pyc = 4,
pyo = 4,
pyw = 4,
pyz = 4,
pyzw = 4,
reg = 4,
scf = 4,
scr = 4,
shs = 4,
theme = 4,
url = 4,
vbp = 4,
vhd = 4,
vhdx = 4,
vsmacros = 4,
vsw = 4,
webpnp = 4,
website = 4,
ws = 4,
wsf = 4,
xbap = 4,
xll = 4,
xnk = 4,
Expand Down