Hi
I have looked through the archives and can not get this stuff to work.
My internet provider at home only provides e-mail and to be able to get
some information from some webpages I have tried to make a small script
that gets a page, translates it into a mail and sends it back to me.
I look for a keyword in the subject line, and then look for lines with http
in them, sends them to lynx and returns the result to the sender. It does
though not work.
#Directory for storing procmail log and rc files
PMDIR=$HOME/.procmail
LOGFILE =$PMDIR/log
#Set on when debugging
VERBOSE=on
LOGABSTRACT=all
:0 Hi
* ^Subject: my_secret_header
* !^X-Loop:(_dot_)*93ph(_at_)mail(_dot_)ryp(_dot_)umu(_dot_)se
{
:0 f
| formail -brt -A "X-Loop: 93ph(_at_)mail(_dot_)ryp(_dot_)umu(_dot_)se"
-I"Subject: Your
HTML request"#
:0 iW
| (grep html | xargs --replace=ADDR lynx -dump ADDR ) | $SENDMAIL
-oi -t
}
The log becomes:
ryp76:~/.procmail$ more log
procmail: [25968] Mon Jan 19 17:08:28 1998
procmail: Assigning "LOGABSTRACT=all"
procmail: Match on "^Subject: my_secret_header"
procmail: Match on !
"^X-Loop:(_dot_)*93ph(_at_)mail(_dot_)ryp(_dot_)umu(_dot_)se"
procmail: Executing "formail,-brt,-A,X-Loop:
93ph(_at_)mail(_dot_)ryp(_dot_)umu(_dot_)se,-ISubject: Your HTML request#"
procmail: Executing " (grep html | xargs --replace=ADDR lynx -dump ADDR ) |
$SENDMAIL -oi -t"
procmail: [25968] Mon Jan 19 17:08:30 1998
procmail: Assigning "LASTFOLDER= (grep html | xargs --replace=ADDR lynx
-dump ADDR ) | $SENDMAIL -oi -t"
Subject: Your HTML request#
Folder: (grep html | xargs --replace=ADDR lynx -dump ADDR ) | $SENDM
213
procmail: Notified comsat: "93ph@: (grep html | xargs --replace=ADDR lynx
-dump ADDR ) | $SENDMAIL -oi -t"
Nothing happens though, something with the last lines looks abit strange to
me.
Anyone who have any advice on this??
Thankful for all comments.
Regards Petrus