Home

Search this site:
 

Horshack’s
very
own site

 

This is Bavaria, Germany!
You will find links to Perl,
bootdisks for system administration,
a lot of Linux,
Windows administration
and some personal belongings.
Installing a new Debian system

Installing procmail

Installing procmail

Procmail delivers spammail directly to a spamfolder in my mailbox.

# apt-get install procmail

Configure sendmail

Put this line into /etc/mail/sendmail.mc:

FEATURE(`local_procmail')dnl

And activate the new sendmail configuration:

# cd /etc/mail
# make
# /etc/init.d/sendmail restart

Your local ~/.procmailrc

# ~horshack/.procmailrc
# Version 0.02
#
# Log all actions to this file, this directory must exist
# and be writable by the user himself:
# LOGFILE=$HOME/syslog/procrc.log
VERBOSE=on
LOGABSTRACT=off
EXITCODE=

# Mail _to_ (or cc, resent whatever) _OR_ ( * 1^0 )
# -> deliver to mail/perl_win32
:0:
* 1^0 ^TO_activeperl@listserv\.activestate\.com
* 1^0 ^TO_perl-win32-admin@listserv\.activestate\.com
* 1^0 ^TO_perl-win32-admin@listserv1\.activestate\.com
|/usr/bin/dmail +mail/perl_win32
###

# an autoanswer to a mail with a special subject
# the whole mail including headers is sent via STDIN to this program
:0:
* 1^0 ^Subject: please give me password for msdos-bootdisk
| /home/horshack/bin/bootdisk_autoanswer.pl | /usr/bin/dmail

# spams are signed with a special header
# move these mails directly to a subfolder of my mailfolder
:0:
* ^X-Spam-Flag: YES
|/usr/bin/dmail +mail/spam

# move mails with special subjects directly to a subfolder
# of my mailfolder
:0:
* 1^0 ^Subject: feedfindus oberasbach, Status vom
* 1^0 ^Subject: feedfindus pfarrkirchen, Status vom
* 1^0 ^Subject: feedfindus erding, Status vom
* 1^0 ^Subject: feedfindus marktredwitz, Status vom
* 1^0 ^Subject: feedfindus selb, Status vom
* 1^0 ^Subject: feedfindus wunsiedel, Status vom
* 1^0 ^Subject: feedfindus ansbach, Status vom
* 1^0 ^Subject: feedfindus kalchreuth, Status vom
|/usr/bin/dmail +mail/findus_automail

# The rest simply to my mailfolder's inbox
:0:
| /usr/bin/dmail


Impressum