procmail
[Top] [All Lists]

Re: PM Trouble

1998-01-18 19:08:23
        Author:        Webmarquee Administrator 
<wmadmin(_at_)webmarquee(_dot_)com>
        Original-Date: Sun, 18 Jan 1998 09:59:43 -0600 (CST)
        Message-ID:     
<Pine(_dot_)SOL(_dot_)3(_dot_)96(_dot_)980118095711(_dot_)995A-100000(_at_)shire(_dot_)middleearth(_dot_)net>

I am using the following procmail setup, in hopes it would send
email straight to a newly created PINE directory. But it does not. Does
this look right?

Close.  I don't think you need the \< and \>

I would escape the . marks in the names with a \ such as

procmail(_at_)informatik\(_dot_)rwth-aachen\(_dot_)de

Also, if you have MAILDIR defined you can use paths relative to it, so instead 
of  

        $HOME/newslist/mail/procmail-l

use

        MAILDIR=$HOME/newslist/mail     # near the top
        
and then just use

        procmail-l

in the recipe.


Also, how hard would it be to make a unix shell script that upon
entering a shell account it automatically opens pine if there is new mail?

Not very.

Assuming all your mail gets delivered to /usr/spool/mail/username or ~/mail

Add this to your .logout file (or equiv):

touch .loggedoff

You'll need a little shell script:

#!/bin/sh

echo "Checking for new mail since last login..."

NEW=`find /usr/spool/mail/username $HOME/mail \
        -newer $HOME/.loggedoff -print| tr -s '/' ' ' |\
        awk '{print $NF}'`

if [ "$NEW" != "" ]; then
        echo "The following mailboxes have new mail since last login:"
        echo "$NEW"
        sleep 5
        pine
else
        echo "No new mail since last login"
fi

exit 0

Save the script as something like 'loginmailcheck' or 'lgnmlck' if you are a  
real UNIX user ;-)

chmod 755 /path/to/script

then add this to your .login: (or equiv)

/path/to/script


TjL


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