procmail
[Top] [All Lists]

Re: procmail and .forward

2001-03-29 14:15:31

Currently there are .forward files for all our employees who have RIM
devices.  Can I effectively et up procmail to filter out spam and not
hamper the forwarding of e-mail to the users RIM devices
(Blackberry Pagers)?

See:

http://www.ling.helsinki.fi/users/reriksso/procmail/mini-faq.html#spam

My best suggestion is to use something like this:


:0
* ^TO_patti(_at_)thunk\(_dot_)crazylogic\(_dot_)net
! RIMADDRESSHERE

That way you will only get spam that is addressed to you (i.e. not 
anything sent to 'friend(_at_)public(_dot_)com'

This will also NOT forward listmail to the RIM either which may or may 
not be desired.

Personally, I find a "white list" to be the best solution for 
forwarding to a RIM, and I only forward messages that are "To:" me, not 
^TO (which means that a 'cc' isn't good enough to send it to my cell 
either)


#  Something like this

# a list of all my various email addresses... 
ME=(me(_at_)onedomain\(_dot_)com|another(_at_)elsewhere\(_dot_)com|third(_at_)wherever\(_dot_)com)

CELL_FORWARD=$HOME/.cellforward

# This is a list of email addresses, one per line, of people
# whose email messages are important enough to be forwarded
CELLWHITELIST=$HOME/.cellwhitelist

CELL=mycellphoneemailaddress

REPLYTO=`formail -rtzxTo:`

# Remove the comments and blank lines below before trying to use this

:0
* ?    test -f $CELL_FORWARD
# Test to make sure that file is there.  I have another 
# recipe that lets me turn forwarding on/off by sending
# a message from my cell

* $   ^To:.*$ME
# the message must be To: one of my email addresses
# directly... not cc/bcc/resent-to/etc


* $ ! ^From:.*$ME
# I don't want to forward my own messages to my cell

* ?    fgrep -is "$REPLYTO" $CELLWHITELIST
# The sender's email address must be found in the "white list"

! $CELL
# forward the message to the cell


(BTW: I've found a need to make sure that I do additional steps to make 
sure that bounces to the cell phone do NOT bounce back to the original 
sender.  But my kludge solutions might not be what you want to do.)

TjL



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>