procmail
[Top] [All Lists]

Executing command after storing in mail folder

2003-06-23 07:40:57
Hi,

I have been trying to solve this for a quite a while now. I hope someone
can help out.

I am trying to execute a command to send the pdf attachments included in
an email via fax. This is what I have so far in my .procmailrc:


-----------------------------------------------------------------------
# if subject contains FAX, then send to the given number
:0
* ^Subject: FAX
{
    
        TEL=48723643262
        FILES=""

                # store email in the email_message file
        :0
        email_message

                # extract pdf attachments and store them in  
                # $HOME/sending
        $HOME/bin/extract_attachs.sh

                # obtain list of PDF files
        for file in `ls $HOME/sending`
        do
                FILES="$FILES $file"
        done

                # send the attachs via fax
        /usr/bin/sendfax -d $TEL -n FILES

                # clean up sending directory
        /bin/rm $HOME/sending/*
}

# Store everything else in my normal inbox
:0
$HOME/Maildir/new
-----------------------------------------------------------------------

The script is stopping at the "store email in the email_message file"
stage and not going beyond that... therefore the faxes are not being
sent.

Can anybody see anything wrong with it?
Thanks in advance.

--
Kristian


_______________________________________________
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>