Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hints and tips on updating Sendmail

Status
Not open for further replies.

Paul1910

ISP
May 24, 2002
1
GB
Please could anyone help me. I am an ISP with a co-located Slackware 7 based Linux server and I know how to administer it on a daily basis but am fairly inexperienced in installing and updating software. I have been experiencing real problems with spam lately and I want to update my copy of sendmail to the latest freeware version to allow me to take advantage of certain free and helpful anti-spam servers out there.

As I have little experience in updating software on Linux I would really appreciate it if someone treated me like a real thicko and gave me a line by line description of how to do this. EG:

First find the path to this file on your server and type bla de bla... etc

Leaving nothing to the assumption that I am sure what to do next.

I am a reasonable logical person and am careful before I do anything daft but this would really be helpful.

Pleeeese someone help me.

Also it would be great if anyone knew how I could scan the subject line of emails when they enter my mailserver and delete the ones with a certain words in them. I.E a wildcard based scan.


Kind Regards

Paul Randall
 
Hey Paul. I don't know what version of sendmail you're running, but I have 8.11 and am pretty sure earlier versions will allow you to run an add-in called procmail. I can't give you a step-by-step, but this is what you want for filtering incoming email. Check out this site: and others (search for procmail and look at the recipies).
A MAJOR NOTE - took me awhile to figure out! Most all the howto's talk about the .procmailrc file (notice the period) being in the user's home directory. I however wanted to filter ALL incoming mail, so the key is to create a procmailrc file in your /etc folder (no period ie /etc/procmailrc)
Here is some of mine... note all # equal comments

LOGFILE=/var/log/pm.log
LOG="
"
VERBOSE=yes

# Remove ## when debugging; set to no if you want minimal logging
LOGABSTRACT=no

#MAILDIR=$HOME/mail

#Recipe 1 Emails addressed to thisguy get cc'd to thatguy &
# thatguytoo if they come from somedomain.com
:0
* ^From:.*somedomain\.com
* ^To.*thisguy
{
:0c: #Preserve a copy of the email to original recipiant
${DEFAULT}
# Forward the email
:0c
/var/spool/mail/thatguy
:0
/var/spool/mail/thatguytoo
}


#Recipe 2 Stop the sircam worm - /dev/null is oblivion
:0 B
* > 100000
* mDmcOaA5pDmoOaw5sDnAOeA56DnsOfA59Dn4Ofw5ADoEOgg6HDo8OkQ6SD
{
LOG="SirCam "
:0
/dev/null
}


#Recipe 3
# There is a spammer program called Mailgod that tries to hide the
# source of spam by overflowing the buffers in normal mail software.
# Nasty, antisocial, and borderline illegal -- but also something we
# can use as an unmistakable sign that it's a message we don't want.
# It doesn't matter what random garbage he uses to overflow the buffer;
# just count the characters and blow away the message if there are
# too many of them on this line:
:0
* ^Received:.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................{
LOG="Mgod "
:0
/dev/null
}


Hope this helps you get started.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top