procmail
[Top] [All Lists]

RE: Help with recipts.

2008-09-24 03:02:59
Thank you very much Dallman,

Let's get things going then, I'm going to try out all the changes you've made, 
I'm a little new to procmail still, if you know anywhere I can get proper doc's 
I'll be glad to read them!

I'll let you know how everything went...

Sorry for the legal notice, I can't change the fact the its added to every 
email, so I'm going to unsubscribe this address and subscribe my personal one 
for further stuff.

Regards,

Joel Serrano.

-----Mensaje original-----
De: procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE 
[mailto:procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE] En nombre de 
Dallman Ross
Enviado el: martes 23 de septiembre de 2008 17:56
Para: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Asunto: Re: Help with recipts.

On Tue, Sep 23, 2008 at 05:18:24PM +0200, Joel Serrano De Castro wrote:

I am having problems with the following receipt:

Thanks at least for stating what your goal was.  It would be better
still to state that above rather than below.  (When I look at your
recipes, the first thing I think is, "WTF is this guy trying to
do with that mess?"  No offense intended.)

So I will cut-and-paste your goals above the code:

1-      Have a variable with the Message-ID header

2-      Create a dir inside /tmp with the name of the Message-ID
        (for further purposes).

3-      Extract the attached files from the email into the newly
        created dir inside /tmp ; script.sh renames the attached
        file to a special name ; delete the created dir inside
        /tmp.

4-      Send a copy of the email after all the processing to the
        domain admin.


:0
* ^Subject:.*DETAILED_SUBJECT
* ^To:(_dot_)*user1(_at_)domain(_dot_)com|user2(_at_)domain(_dot_)com

The second condition should be:

    * ^To:.*(user1(_at_)domain[(_dot_)]com|user2(_at_)domain[(_dot_)]com)
or
    * ^To:.*(user1|user2)@domain[.]com


        {
                :0
                * ^Message-ID:
                { MESSAGEID=`${FORMAIL} -cX "Message-ID:" |sed -e 's/[ 
\t]\{1,\}//g' | cut -d'<' -f2 | cut -d'@' -f1` }

You don't need all of that.  Just do this:

    :0
    * ^Message-ID:.*<\/[^(_at_)]+
    { MESSAGEID = $MATCH }



                :0E
                { MESSAGEID='none' }

                :0
                { CREATEDIR=`mkdir /tmp/$MESSAGEID` }

There are other ways to do this; for example, just:

   DUMMY = `mkdir /tmp/"$MESSAGEID"`

but OK.

                :0w
                | ripmime -i - -d /tmp/$MESSAGEID --syslog --no-nameless ; \
                /usr/bin/script.sh /tmp/$MESSAGEID $MESSAGEID 1 ; \
                rmdir /tmp/$MESSAGEID

                :0
                ! admin(_at_)domain(_dot_)com
        }


[Order of your email slightly rearranged again:]

It doesn't execute the last receipt, and that's not the only
problem, sometimes it stops earlier.

Your ripmime recipe is a "delivering" recipe.  So procmail delivers to
the pipe and exits.  That's what you told it you wanted.
I can't tell what you do want.  Maybe it's

     :0 cwi

or maybe it's

     :0 fwi

Also, don't send us your long two-language legal-mumbo-jumbo
disclaimer footer, please.  This list gets archived in perpetuity.
All we want to see is properly formed text.

Regards,
Dallman Ross
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

Antes de imprimir este e-mail piense bien si es necesario hacerlo.


--------------------------------------------------------------------------------

Este mensaje es privado y CONFIDENCIAL y se dirige exclusivamente a su 
destinatario. Si usted ha recibido este mensaje por error, no debe revelar, 
copiar, distribuir o usarlo en ning?n sentido. Le rogamos lo comunique al 
remitente y borre dicho mensaje y cualquier documento adjunto que pudiera 
contener. El correo electr?nico via Internet no permite asegurar la 
confidencialidad de los mensajes que se transmiten ni su integridad o correcta 
recepci?n. JAZZTEL no asume responsabilidad por estas circunstancias. Si el 
destinatario de este mensaje no consintiera la utilizaci?n del correo 
electr?nico via Internet y la grabaci?n de los mensajes, rogamos lo ponga en 
nuestro conocimiento de forma inmediata.Cualquier opini?n expresada en este 
mensaje pertenece ?nicamente al autor remitente, y no representa necesariamente 
la opini?n de JAZZTEL, a no ser que expresamente se diga y el remitente est? 
autorizado para hacerlo.


--------------------------------------------------------------------------------


This message is private and CONFIDENTIAL and it is intended exclusively for its 
addressee. If you receive this message in error, you should not disclose, copy, 
distribute this e-mail or use it in any other way. Please inform the sender and 
delete the message and attachments from your system.Internet e-mail neither 
guarantees the confidentiality nor the integrity or proper receipt of the 
messages sent. JAZZTEL does not assume any liability for those circumstances. 
If the addressee of this message does not consent to the use of Internet e-mail 
and message recording, please notify us immediately.Any views or opinions 
contained in this message are solely those of the author, and do not 
necessarily represent those of JAZZTEL, unless otherwise specifically stated 
and the sender is authorised to do so.


--------------------------------------------------------------------------------

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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