Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PPM

2 views
Skip to first unread message

joe freedom

unread,
Jul 18, 2003, 8:16:06 PM7/18/03
to

PPM Password-Protected-Mailboxes

The only SURE way to eliminate spam.

This is mostly Timo Salmi's system. The scripts at the bottom and a couple
of additions to the .procmailrc are my enhancements. They make the passwords
one-time only. Create a directory ~/procmail and in that directory a file
called passfile with a 'starter password' TSPW[0-9][0-9]*

[ When someone mails you for the first time, their mail will be dumped and
they will receive a note asking them to please re-send the mail putting a
one-time password on the Subject: line, and informed that the mail that uses
that password must come from the same address that was used to acquire it.

In-other-words, NOBODY will be able to contact you without using their real
email address. (Not without more expertise and hassle than any spammer or
punk harasser is able or willing to muster....) ]


If priv/temp correspondents are not mailing from the address(es) in your
.procamilrc, then they can mail you and Cc that address (making it the ONLY
entry on the Cc line).

Make sure you put any first-time contacts in the Temp list and
have a sig that tells them that they must either use the address that the
mail is addressed to, or Cc to it making it the only address on the Cc line.
The scripts priv.sh, sedd1 and sedd2 make adding these entries very simple.

This is designed for a Linux/UNIX system using fetchmail/procmail/formail
that are invoked automatically when you fetch mail from your POP server; and
an sh compatible shell.

Your ~/.fetcmailrc should look something like this:

poll pop.yourisp.whatever
tracepolls
proto pop3
user "y...@your.isp"
pass "yourpassword"
is yourusername here
and wants mda "/usr/bin/formail -ds /usr/bin/procmail"
fetchall


You can, and should, replace the string TSPW with one that is uniquely yours.
Be sure to do it in all the scripts. :-)

Any improvements on my crude scripts are more than welcome.

Please post them on comp.mail.misc.

Just enough of the .procmailrc to make this work. It needs to be personalized,
of course.
############################################################################


PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin
MAILDIR=$HOME/Mail #you'd better make sure it exists
DEFAULT=$MAILDIR/inbox #completely optional
LOGFILE=$MAILDIR/from #recommended
PASSWD=`cat ~/procmail/passfile`

### First Things

:0 h
* ^Subject.*TSPW[0-9][0-9]*
| cat > ~/procmail/newmail && procpass.sh

### Temp

# (temporary priveleged list)

:0 h
* ^From.*who...@whatever.isp
* ! ^X-Loop: y...@your.isp
${DEFAULT}

:0 h
* ^Cc: same_address_as_immediately_above
* ! ^Cc:.*@.*@
* ! ^X-Loop: y...@your.isp
${DEFAULT}

### Priveleged List

# similar entries to above

### Password

:0 hc
* $ ! ^Subject.*${PASSWD}
| net=${PASSWD} ; ten=`sed -n '/^From:/p'`; echo "$net $ten" >> ~/procmail/pr
ocpass

:0:passwd.lock
* $ ! ^Subject:.*${PASSWD}
* ! ^X-Loop: you@your\.isp
* ! ^From:.*you@([-a-z0-9_]+\.)your\.suffix
| (formail -r \
-i"Subject: Sorry, Access Denied." \
-A"Reply-To: y...@your.isp" ; \
echo "*************************************************" ; \
echo "* This is a computer-generated response *" ; \
echo "*************************************************" ; \
echo ; \
echo ; \
echo " Greetings. I am the Mighty Guardian of YOUR mailbox, and "
; \
echo " must temporarily bar your path." ; \
echo ; \
echo " Please include the one-time password ${PASSWD} anywhere on
the Subject line," ; \
echo ; \
echo " (you MUST use the password with the same address that you a
cquired it with)" ; \
echo ; \
echo " Then kindly re-send your email to yo...@your.isp" ; \
echo ; \
echo " If you wish to engage in regular correspondence, your " ; \
echo " address(es) will be added to the priveleged list " ; \
echo " and there will be no further muss or fuss." ; \
echo ; \
echo ; \
echo ; \
echo "************************************************" ; \
echo "* THANK YOU ------- SPAM SUCKS *" ; \
echo "************************************************" ; \
echo ; \
echo ; \
echo ; \
) | $SENDMAIL -t && echo TSPW"$RANDOM" > ~/procmail/passfile

### Endnotes

# If the mail beats the above, send it to the ozone.

:0:
/dev/null

##############################################################################
This goes in your $PATH
#############################################################################

#!/bin/bash
# put on your path as recognized by procmail (see top of .procmailrc)
#procpass.sh

DIR=$HOME/procmail

nnt=`sed -n '/^Subject/s/\(^Sub.*\)\(TSPW[0-9][0-9]*\)\(.*\)/\2/p' $DIR/newmail`
tnn=`sed -n '/^From:/p' $DIR/newmail`
echo "$nnt $tnn" > $DIR/procpass2

tnt=`cat $DIR/procpass2`

cat $DIR/procpass | while read line; do if [ "$line" = "$tnt" ]
then cat $DIR/newmail >> ~/Mail/inbox
sed "/$line/d" $DIR/procpass > $DIR/procpass3
mv $DIR/procpass3 $DIR/procpass
else continue
fi
done

#############################################################################
sedd1. personalize and make sure there are no spaces at the top or bottom
These two go in ~/procmail .These do not need to be executable
#############################################################################
/^### Priveleged/a\
\
\
:0 h\
* ^From.XXX\
* ! ^X-Loop: y...@your.isp\
${DEFAULT}\
\
\
:0 h\
* ^Cc: XXX\
* ! ^Cc:.*@.*@\
* ! ^X-Loop: y...@your.isp\
${DEFAULT}
##########################################################################
sedd2. same
#############################################################################
/^### Temp/a\
\
\
:0 h\
* ^From.XXX\
* ! ^X-Loop: y...@your.isp\
${DEFAULT}\
\
\
:0 h\
* ^Cc: XXX\
* ! ^Cc:.*@.*@\
* ! ^X-Loop: y...@your.isp\
${DEFAULT}
######################################################################
priv.sh goes in your $PATH
#####################################################################
#!/bin/bash
#priv.sh
clear
echo
echo
echo
echo
echo [1] Enter this to make an entry in the Priveleged List then
echo enter the new address at the prompt.
echo
echo [2] Enter this for the Temp Priveleged list.....
echo
echo
echo
echo

read num

case "$num" in

"1" ) mm=~/procmail/sedd1 ;;
"2" ) mm=~/procmail/sedd2 ;;


esac


read nn

sed "s/XXX/$nn/g" $mm > seddtemp ; mv seddtemp $mm

sed -f $mm ~/.procmailrc > seddtemp2 ; mv seddtemp2 ~/.procmailrc

sed "s/$nn/XXX/g" $mm > seddtemp3 ; mv seddtemp3 $mm


0 new messages