Eriberto | 2 Oct 2004 17:23
Picon

Footnote with attachment

Hello all,

I have a rule to add a footnote in ingoing mail messages. The rule is:

:0 Wfb
* ! To:.*mynet.com
|cat - ; echo -e `cat /etc/adm/footnote.txt`

However, if the message to contain a attach, the footnote is inserted
after the attach and we don't see this footnote. How to insert the
footnote before attach?

Thanks,

Eriberto
Eriberto | 2 Oct 2004 17:28
Picon

One rule of body only

Hello,

How to unify this rules?

----------------------------------------------------------------------
:0 B
*  .*acs rcb
{
    :0 fw
    |(formail -r -i "From:suporte <at> mynet.br" -A "X-Loop: suporte";\
    cat /adm/acs_rcb.msg)|sendmail -oi -t

    :0
    /dev/null
}

:0 B
*  .*acuso recebimento
{
    :0 fw
    |(formail -r -i "From:suporte <at> mynet.br" -A "X-Loop: suporte";\
    cat /adm/acs_rcb.msg)|sendmail -oi -t

    :0
    /dev/null
}

:0 B
*  .*acuso o recebimento
{
(Continue reading)

DZ-Jay | 2 Oct 2004 15:15

Re: One rule of body only

Some time around 10/02/2004 09:09:39, I think I heard DZ-Jay say:
> # *  .*acs rcb
> # *  .*acuso recebimento
> # *  .*acuso o recebimento

> # YOU CAN DO THIS...
> :0 B
> *  .*ac(s|uso) (o )?r(cb|recebimento)
> {
>     :0 fw
>     |(formail -r -i "From:suporte <at> mynet.br" -A "X-Loop: suporte";\
>     cat /adm/acs_rcb.msg)|sendmail -oi -t

>     :0
>     /dev/null
> }       

Sorry, the regexp pattern on this rule should be:

*  .*ac(s|uso) (o )?r(cb|ecebimento)

(no "r" in "ecebimento", since it is matched outside the alternative grouping.)

Note that this will also match things like ".* acs o rcb", and "*.acuso rcb" but that shouldn't be a problem, right?

	-dZ.

--

-- 
:[ DZ vs. THE WORLD]==- -- -  -

(Continue reading)

Dallman Ross | 2 Oct 2004 16:58

Re: One rule of body only

On Sat, Oct 02, 2004 at 09:15:14AM -0400, DZ-Jay wrote:
> 
> *  .*ac(s|uso) (o )?r(cb|ecebimento)

You do not need the leading .* here.

 * ac(s|uso) (o )?r(cb|ecebimento)

I didn't pay close attention to the rest of the regex, but am assuming
it's what you want.

--

-- 
dman
Dallman Ross | 2 Oct 2004 17:52

Re: Footnote with attachment

On Sat, Oct 02, 2004 at 12:23:01PM -0300, Eriberto wrote:
> 
> I have a rule to add a footnote in ingoing mail messages. The rule is:
> 
> :0 Wfb
> * ! To:.*mynet.com
> |cat - ; echo -e `cat /etc/adm/footnote.txt`
> 
> However, if the message to contain a attach, the footnote is inserted
> after the attach and we don't see this footnote. How to insert the
> footnote before attach?

This is a very difficult thing to do without some special tools or
a modular approach.

I tried the following, which could be a workable approach, except that
the sed barfs.

  DQ='"'
  OLDSHELLMETAS = $SHELLMETAS
  SHELLMETAS
  :0
  * $ ^Content-Type:.*multipart.*;[ 	]*boundary=$DQ?\/[^$DQ]+
  {
     BOUNDARY = $\MATCH

     :0 fw b
     * $ B ?? ()\/^--$BOUNDARY^Content-Type:.*a(ppli|ttach)
     | sed "s/^$MATCH/`cat mytext`&/"
  }
(Continue reading)

DZ-Jay | 2 Oct 2004 18:17

Re: One rule of body only

Some time around 10/02/2004 11:28:30, I think I heard Eriberto say:
> Hello,

> How to unify this rules?

# *  .*acs rcb
# *  .*acuso recebimento
# *  .*acuso o recebimento

# YOU CAN DO THIS...
:0 B
*  .*ac(s|uso) (o )?r(cb|recebimento)
{
    :0 fw
    |(formail -r -i "From:suporte <at> mynet.br" -A "X-Loop: suporte";\
    cat /adm/acs_rcb.msg)|sendmail -oi -t

    :0
    /dev/null
}	

# OR THIS...
:0 B
*  .*acs rcb \
   .*acuso (o )?recebimento
{
    :0 fw
    |(formail -r -i "From:suporte <at> mynet.br" -A "X-Loop: suporte";\
    cat /adm/acs_rcb.msg)|sendmail -oi -t

(Continue reading)

John D. Hardin | 2 Oct 2004 21:49
Gravatar

ANN: Email Sanitizer v.1.147 is released


The procmail sanitizer has been updated. The current version is 1.147
It is available via:

WORLD:  http://www.impsec.org.nyud.net:8090/email-tools/procmail-security.html
US/WA:  http://www.impsec.org/email-tools/procmail-security.html
US/WA:  http://eucleides.com/sanitizer/procmail-security.html
EU/NL:  http://kanon.net/~jhardin/email-tools/procmail-security.html
#EU/NO:  http://oftedal.no/~jhardin/email-tools/procmail-security.html
#AU:     http://grebopple.accessunited.com.au/email-tools/procmail-security.html
AU:     http://impsec.fuzzitech.net/email-tools/procmail-security.html

Direct links to the current tarball:

WORLD:  http://www.impsec.org.nyud.net:8090/email-tools/procmail-sanitizer.tar.gz
US/WA:  http://www.impsec.org/email-tools/procmail-sanitizer.tar.gz
US/WA:  http://eucleides.com/sanitizer/procmail-sanitizer.tar.gz
EU/NL:  http://kanon.net/~jhardin/email-tools/procmail-sanitizer.tar.gz
#EU/NO:  http://oftedal.no/~jhardin/email-tools/procmail-sanitizer.tar.gz
#AU:     http://grebopple.accessunited.com.au/email-tools/procmail-sanitizer.tar.gz
AU:     http://impsec.fuzzitech.net/email-tools/procmail-sanitizer.tar.gz

("commented out" mirrors are temporarily out-of-sync or unavailable)

55ad7a6cac6d74f50bc8975b15e31fd5  html-trap.procmail
3dca68750bb77bda314b51f7a9c0e73c  html-trap.procmail.nomacroscan
fd74201f6fcb445cc288c75ed3579cdd  procmail-sanitizer.tar.gz

From the changelog:

(Continue reading)

Ruud H.G. van Tol | 3 Oct 2004 12:02
Picon

Re: One rule of body only

Toen wij DZ-Jay kietelden, kwam er dit uit:

> *  .*acs rcb \
>    .*acuso (o )?recebimento

Huh?

--

-- 
Grtz, Ruud
DZ-Jay | 3 Oct 2004 20:04

Re: One rule of body only

Some time around 10/03/2004 06:02:15, I think I heard Ruud H.G. van Tol say:
> Toen wij DZ-Jay kietelden, kwam er dit uit:

>> *  .*acs rcb \
>>    .*acuso (o )?recebimento

Damn... I hate it when I type faster than my brain can think :(

That should have been

*  .*acs rcb|\
   .*acuso (o )?recebimento
	

	-dZ.

-- 
:[ DZ vs. THE WORLD]==- -- -  -

Hating anything, everything and everyone since 1996.
--

-- 
Ruud H.G. van Tol | 3 Oct 2004 20:32
Picon

Re: One rule of body only

Toen wij DZ-Jay kietelden, kwam er dit uit:
> Ruud H.G. van Tol:
>> DZ-Jay:

>>> *  .*acs rcb \
>>>    .*acuso (o )?recebimento

> Damn... I hate it when I type faster than my brain can think :(
> 
> That should have been
> 
> *  .*acs rcb|\
>    .*acuso (o )?recebimento

It still looks strange. The '.*' at the start of each part 
is totally unnecessary (and Dallman already said that some 
hours ago). 

  *  ac(s rcb|uso (o )?recebimento)

--

-- 
Grtz, Ruud

Gmane