MAILDIR=$HOME/Mail
SHELL=/bin/bash

# Expamples of using procmail for filtering incoming mail.
# Warning! If you want to use procmail, write to your .forward:
# "|IFS=' '&&exec /usr/bin/procmail -f-||exit 75 # account_name"
# (containing quotation marks)
# For more details read man procmail, man procmailex
#
#   Marek Obuchowicz <elephant@shadow.eu.org>


## Example 1: backup of all incoming mails
## to file $MAILDIR/backup
#:0 c
#backup			    

## Example 2: backup of all incoming mails
## to gzipped file $MAILDIR/backup.gz
#:0 c
#| gzip >> backup.gz

## Example 3: sorting mails coming from PLD-list
## to file $MAILDIR/PLD-list:
#:0:
#* ^TOpld-list@mailbox.tuniv.szczecin.pl
#PLD-list

## Example 4: keep and forward to pager@dione.ids.pl
## all mails containing 'DUTimer' in the subject field
#:0 c
#* ^Subject:.*DUTimer
#! pager@dione.ids.pl

## Example 5: automatic reply to all letters except letters coming
## from elephant (includes anti-loop filter)
## Reply contains file ~/.vacation
## Also writes all sender addresses to file vacation.cache
#:0 Whc: vacation.lock
#* !^From.*elephant
#* !^X-Loop: your@e-mail.address
#| formail -rD 8192 vacation.cache
#  :0 ehc         # if the name was not in the cache
#  | (formail -rA"Precedence: junk" \
#       -A"X-Loop: your@e-mail.address" ; \
#     cat $HOME/.vacation \
#    ) | $SENDMAIL -oi -t
												
## Example 6: deletes repeated mails (in the case of Message IDs).
## Writes MSGids in msgid.cache (file size limited to 4 kb) 
## Placing this filter in the beginning is recommended.
# :0 Wh: msgid.lock
# | formail -D 4096 msgid.cache

## Example 7: Auto replies for mails containg text 'get-info' in
## subject. Reply contains file ~/.info
#:0
#* !^FROM +YOUR_USERNAME
#* !^Subject:.*Re:
#* ^Subject:.*get info
#| (formail -r ; cat ~/.info) | $SENDMAIL -oi -t
