Operating System - HP-UX
1833758 Members
2507 Online
110063 Solutions
New Discussion

filter by subject in sendmail 8.12.9

 
someone_4
Honored Contributor

filter by subject in sendmail 8.12.9

Hello

I am working on trying to get a filter by subject database to work. But I am having some issues with it.

I know that Christopher Caldwell posted an alternative way to filter by subject but that would mean having to modify the sendmail.cf.

According the the new Batbook you can do an access.db type database to reject the specified emails like so:

create /etc/mail/spamsubjects
with the following format.

I Love You REJECT
Vist Home Now REJECT

cd /etc/mail
makemake -t\tab has spamsubjects < spamsubjects

and the mc configuration as follows:

LOCAL_CONFIG
Kspamsubjdb hash /etc/mail/spamsubjects
HSubject: $>ScreenSubject

LOCAL_RULESETS
SScreenSubject
R $* $: $(spamsubjdb $&{curHeader} $: OK $) $1
R REJECT $* $#error $: "553 Subject:" $2 ": Bad Subject, rejected"


Here are the two issues I have. When I try to do the makemap to creat the spamsubjects database I get this error.

makemap error opening type hash map Permission denied

if i touch spamsubjects database .. and then do the makemap that works for me. I am not sure if the database is good or not but it creates it.

But sendmail does not like the new rulesets that were added. It spits out errors it could be due to the way that I created the database but i am not sure.

And one thing I noticed was that in the LOCAL_RULESETS for SScreenSubject there is a field called spamsubjdb. But that is not the database that was created.

So as of right now I am at a loss. Any hint or help would be most helpfull thanks.

Richard






3 REPLIES 3
Geoff Wild
Honored Contributor

Re: filter by subject in sendmail 8.12.9

 
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
someone_4
Honored Contributor

Re: filter by subject in sendmail 8.12.9

Hi Geoff,
That is kind of what i was looking for but I would like to be able to get the spamsubjects database to work.

Thanks
Richard
Steven E. Protter
Exalted Contributor

Re: filter by subject in sendmail 8.12.9

If you link in the documentation on the spamsubjects database, I will try it on a backup mail server.

One note with subject based filters, is the spammers will simply change the subjects.

I don't think its very effective.

The spammers get once chance with me, then they get reject statements in the access db.

I'm working on a way to forward this stuff to a special mailbox on my Linux mailserver.

Then A script reads the file and adds the sender and the last relay IP address to the same file. The trick is I can't just disable yahoo aol and hotmail's smtp servers because many of their users are valid.

Even with the manual process I have now I've cut my spam volume from 100 per day to less than 5.

For the 10 domains I host, I authorize mail users manually in the /etc/aliases file. If a particular emal address I control is getting two much spam, I disable it for a few days.

http://www.sendmail.org and http://www.tldp.org have docs on how to integrate a list from a spam stopping organization into sendmail.

Its worth a look.

Regards,

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com