This is a spam REJECT
Another line REJECT
So this should work:
This is a spam REJECT
(space.........tab)
`` This is a spam''
that is, it has a _leading_ space.
This is a spam REJECT
(space.........tab)
Let me see if I understood you correctly. Are you saying I should reformat my spamsubjects file? Not to use spaces within?
This is a spam REJECT
makemap -t\tab hash spamsubjects < spamsubjects
Kspamsubdb hash /etc/mail/spamsubjects
HSubject: $>ScreenSubject
SScreenSubject
R $* $: $(spamsubdb $&{currHeader} $: OK $) $1
R REJECT $* $#error $: "553 Subject:" $1 ": Not allowed"
But it does not work. Nothing gets blocked. Any ideas what I am doing wrong?
In general it is better to use a regex map to match the values
of "unstructured" headers (non-address fields).
how could I change and improve the rulesets to use a regex map to match the values from my spam subject file?
You would have to put all of the data into the regex. If you have
many entries or if you change the content often, then it might be
better to use milter-regex so you don't have to restart sendmail
after each change.
Otherwise it's fairly simple: just replace the map definition,
e.g., something like this:
Kspamsubdb regex (This is spam|Another line)
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 51:59:08 |
Calls: | 6,712 |
Calls today: | 5 |
Files: | 12,243 |
Messages: | 5,355,173 |
Posted today: | 1 |