josias gonçalves | 19 Aug 17:47

Procmail filter sometimes failed...

Hi for all,
In my procmailrc i have this lines in the file.

:0 H
*^Content-type: (multipart/mixed)
{

    :0 B
     *^Content-Disposition: (attachment|inline)
     *filename=".*\.(ocx|ade|adp|bas|bat|chm|cmd|com|cpl|crt|dll|exe|eml|hlp|hta|htt|inf|ins|isn|isp|js|jse|lnk|mdb|mde|msc|msi|msp|mst|pcd|pif|reg|sc|scr|sct|shb|shs|vb|vbe|vbs|pps|pptx|ppsx|ppt|wsc|wsf|wma|wmv|avi|mp3|mp4|mpeg|mpg|mov|qiv|asf|mpe|wsh)"
     {
        :0
        /var/mail/attach
     }

}

if something attach is found, the e-mail will to /var/mail/attach
so, some e-mails, like one today (one with pps extension), pass
trought this rule.
is something wrong ? with this rule... thanks.
Robert Holtzman | 17 Aug 08:49

recipe suddenly failing

Running procmail v3.22 2001/09/10 on ubuntu 8.04. The following recipe has 
been unchanged and working well since I ran RedHat 7.3 (yeah, *that* 
long) until yesterday.

               :0 c
               /home/holtzm/mail/backup

               :0 ic
               | cd /home/holtzm/mail && rm -f dummy `ls -t msg.* | sed -e

As of now it no longer delivers any copies to my backup file, even tho I 
have received 600+ emails in the last day or two. As an experiment I tried

               :0 c:
               /home/holtzm/mail/backup

which didn't work either. What completely snows me is why after working 
all these years, would it suddenly give up the ghost.

Any help, pointers, suggestions appreciated.

--

-- 
Bob Holtzman
"If you think you're getting free lunch,
  check the price of the beer"
Dallman Ross | 16 Aug 01:58

RE: dynamci filters

George Crum wrote Saturday, August 16, 2008 1:55 AM:

>     # If file does not exist then create file and forward to pager
>     :0 iE
>     {
>         * ? test ! -f /tmp/file
>         | touch /tmp/file
>         :0
>         ! pager <at> domain.com
>     }

There is your error.  No ":0" at the start of the nested
brace's first recipe.

As I had written:

>> Maybe a recipe doesn't start with ":0".

Dallman
George Crum | 15 Aug 00:56

Re: dynamci filters

Ok finally got back to this.  Here's what I threw together.  Keep in mind I'm fairly new to procmail.  This is my
second attempt at creating a procmailrc.  I wasn't sure about the action lines and assumed that if I
executed a shell command then I couldn't have the forward action on the next line.  The Subjects are exact
representations of what we'd see.  I have not tested this yet.  Does anyone see any problems that we would
have with this?

# pager on 1st notification and set to not pager until the tmp file is removed
:0 
* ^Subject:.*PROBLEM alert - server123 is CRITICAL
{
        # If file exists then forward to nopager
        :0 
    * ? test -f /tmp/file
    ! nopager <at> domain.com

    # If file does not exist then create file and forward to pager
    :0 iE
    {
        * ? test ! -f /tmp/file
        | touch /tmp/file
        :0
        ! pager <at> domain.com
    }
}

# Received Recovery, remove tmp file and forward to pager
:0 
* ^Subject:.*RECOVERY alert - server123 is OK
{
    :0
(Continue reading)

Scott Moseman | 13 Aug 22:50

Which grep match?

Let's start from this very basic grep recipe...

* ? formail -x Subject: | fgrep -is -f /etc/procmail/subjects.txt

I will know it matched an entry in the file, but I will not know
*which* entry (from subjects.txt) was matched.  Is there an *easy* way
to process this type of query *and* get the match output?  I suppose
in a worst case I could pipe to a script and go through the
subjects.txt file line by line looking for a match, but there must be
an easier way?

My goal is that I desire to start collecting a "hit count" on the
matches, so I see which ones are matched often and which ones are
rarely matched, if ever.

Thanks,
Scott
Remien, Carsten | 8 Aug 09:04

Add X-Header to see which filter greps

Hi,

I would like to see, which procmail filter has moving my mail to a 
special IMAP folder.
Is it possible to set a X-Header in each filter?
Or is there any other soultion?

Regards,

Carsten
Jake Di Toro | 5 Aug 19:59

Mailing list handler

Didn't see this come through, appoligies if this is posted twice:

I've had some recent changes to my mail handling and wanted to
streamline some more.  Dug through the archives for the mailing list
handlers and came up with this as the latest:
http://www.xray.mpe.mpg.de/mailing-lists/procmail/2007-11/msg00028.html 

Was wondering is a) there's been any "upgrades" in the last 9ish
months, and b) if anyone had a file available for download as the
archive has munged up a few lines etc.  I'm sure with a little testing
I'd work out the kinks, but it might be eaiser to have a clean copy to
start testing with.

--

-- 
Till Later, 
Jake <karrde <at> viluppo.net>
George Crum | 31 Jul 00:36

dynamci filters

Calling all procmail gurus here.  I have searched and can not find any info on how to do this and I'm not sure if
this is something that procmail can handle.

I would like to setup a filter that would catch a subject line that has 2 variations, but change where the
email will be forwarded to depending on this subject it matches.

1. All emails are forwarded to email-address1.

2. Receive email with "Subject: PROBLEM ..." for the first time, forward to email-address1.  Any
consecutive times afterwards I want to forward the email to email-address2.

3. When email with "Subject: RECOVERY..." is received I want the email to go to email-address1 and change
the filter for "Subject: PROBLEM ..." back to forwading to email-address1.

Is this possible with procmail?

-george
Adam Williams | 29 Jul 16:58

help with procmail rules

I have a user, rmiller <at> mdah.state.ms.us who wants all of his To: and Cc: 
email to go to his millerono <at> gmail.com as well as keeping a copy of the 
email on our mdah.state.ms.us mail server in his inbox.  However, when 
he sends mail from millerono <at> gmail.com he will Bcc: the email to 
rmiller <at> mdah.state.ms.us so that we have a a copy of his email.  Are the 
following procmail rules below correct to accomplish this?

:0:
* $ ^Bcc:.*rmiller <at> mdah.state.ms.us
${DEFAULT}

:0
* ^Cc.*rmiller <at> mdah.state.ms.us
{
        :0c
        ! millerono <at> gmail.com

        :0
        ${DEFAULT}
}

:0
* ^To.*rmiller <at> mdah.state.ms.us
{
        :0c
        ! millerono <at> gmail.com

        :0
        ${DEFAULT}
}
(Continue reading)

josias gonçalves | 28 Jul 19:55

procmail X-Recipient:

Hi, is my first time here in the forum and my question is about X-Recipient header.

Can in some way, change the To header to the same value of  X-Recipient header before other rules be read in the procmailrc ?

i try to see the history of list to see some awsers, but here have some message saying "page not found" trought apache / debian.

thanks.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail <at> lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
Jim Seavey | 26 Jul 20:16

new recipe filter...

Hi,

I have several users who receive email from one or more specific person(s) 
who think it is their appointed task in life to send out the absolute 
largest email's that they possibly can.

The vast majority of the stuff that is sent are jokes and other such 
trivia.

All email on our system is filtered using procmail to remove spam.

We have a global archiving of a copy of each incoming email that is the 
first thing that happens in the global procmail process.

The second thing the global procmail process does is send large email's 
directly to the users default incoming mail box; larger being greater than 
2MB so they do not cause procmail problems.

The following is the filter to move large email's into the users home 
directory.

:0 f
* > 2048000
| ${FORMAIL} -A"X-Note: Oversize/Not Filtered"

Works a treat.

This recipe is run prior to the individual users procmail recipes.  I would 
like to be able add a condition to this recipe that allows me to include 
specific From: email addresses that will  send the large email being sent 
by specific email addresses to /dev/null  and any others to be sent to the 
users default mail box. This way I can police the continual offenders who 
eat up disk space with this type of stuff.

How do I code this?

I already remove the messages on a daily basis from the users backup file 
based on the From: email address.

This may sound Draconian to some but we do not have the luxury of allowing 
this kind of stuff eat up disk space; especially when people are out of the 
office and do not check their email for some time.

Thanks.

Jim

Gmane