Web hosting reviews - 195Chapter 6Securing LinuxTo enable Procmail for your user

195Chapter 6Securing LinuxTo enable Procmail for your user account, create a .procmailrcfile in your homedirectory. The file should be mode 0600(readable by you but nobody else). Typethe following, replacing evilmailerwith the actual e-mail address that is mail- bombing you. # Delete mail from evilmailer:0* ^From.*evilmailer/dev/nullThe Procmail recipe looks for the Fromline at the start of each e-mail to see if itincludes the string evilmailer. If it does, the message is sent to /dev/null(effectively throwing it away). Blocking Mail with SendmailThe Procmail e-mail tool works quite well when only one user is being mailbombed. If, however, the mailbombing affects many users, you should probably configureyour sendmaildaemon to block all e-mail from the mailbomber. Do this by addingthe mailbomber s e-mail address or system name to the accessfile located in the/etc/maildirectory. Each line of the accessfile contains an e-mail address, host name, domain, or IPaddress followed by a tab and then a keyword specifying what action to take whenthat entity sends you a message. Valid keywords are OK, RELAY, REJECT, DISCARD, and ERROR. The REJECTkeyword causes a sender s e-mail to be bounced back withan error message. The keyword DISCARDcauses the message to be silently droppedwithout sending an error back. You can even return a custom error message byusing the ERRORkeyword. Here s an example /etc/mail/accessfile: # Check the /usr/share/doc/sendmail/README.cf file for a description# of the format of this file. (search for access_db in that file) # The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc# package. # # by default we allow relaying from localhost… localhost.localdomain RELAYlocalhost RELAY127.0.0.1 RELAY# # Senders we want to Block# evilmailer@yahoo.com REJECTstimpy.glaci.com REJECTcyberpromo.com DISCARD199.170.176.99 ERROR: 550 Die Spammer Scum! 199.170.177 ERROR: 550 Email Refused

Leave a Reply