Procmail skipping

Procmail skipping

am 19.10.2005 03:23:44 von hendry

I use this recipe to filter my mailing list traffic.

:0
* ^(List-Id|(X-)?Mailing-List|X-List):\/.*
{
LISTID=$MATCH

:0
* LISTID ?? ^.*[<]\/[^@>\.]*
.lists.$MATCH/

:0
* LISTID ?? ^\/[^@\.]*
.lists.$MATCH/
}



Unfortunately I've noticed mail not arriving (Skipped) from
docbook-help and apache-users mailing list manager.


--- Logging /home/hendry/Maildir//procmail.log for hendry, procmail:
Assigning "SHELL=/bin/sh"
procmail: Assigning "EOC=/home/hendry/opt/bin/enemies-of-carlotta"
procmail: No match on "^List-Id:.*dcglug\.org\.uk"
procmail: No match on "^List-Id: wp-hackers.lists.automattic.com"
procmail: No match on "^Sender: owner-mutt-users@mutt\.org"
procmail: Assigning "MATCH="
procmail: Matched " contact users-help@httpd.apache.org; run by ezmlm"
procmail: Match on "^(List-Id|(X-)?Mailing-List|X-List):\/.*"
procmail: Assigning "LISTID= contact users-help@httpd.apache.org; run
by ezmlm"
procmail: No match on "^.*[<]\/[^@>\.]*"
procmail: Assigning "MATCH="
procmail: Matched " contact users-help"
procmail: Match on "^\/[^@\.]*"
procmail: Skipped "contact users-help/"
procmail: Assigning "LASTFOLDER=.lists."
procmail: Opening ".lists."
procmail: Acquiring kernel-lock
procmail: Notified comsat:
"hendry@1662826:/home/hendry/Maildir//.lists."
>From users-return-@httpd.apache.org Tue Oct 18 17:53:32 2005
Subject: confirm subscribe to users@httpd.apache.org
Folder: .lists.
6154


Can someone suggest a better recipe?

Re: Procmail skipping

am 19.10.2005 17:55:53 von AK

kai.hendry@gmail.com wrote:

> I use this recipe to filter my mailing list traffic.
>
> :0
> * ^(List-Id|(X-)?Mailing-List|X-List):\/.*
> {
> LISTID=$MATCH
>
> :0
> * LISTID ?? ^.*[<]\/[^@>\.]*
> .lists.$MATCH/
>
> :0
> * LISTID ?? ^\/[^@\.]*
> .lists.$MATCH/
> }
>
>
>
> Unfortunately I've noticed mail not arriving (Skipped) from
> docbook-help and apache-users mailing list manager.
>
>
> --- Logging /home/hendry/Maildir//procmail.log for hendry, procmail:
> Assigning "SHELL=/bin/sh"
> procmail: Assigning "EOC=/home/hendry/opt/bin/enemies-of-carlotta"
> procmail: No match on "^List-Id:.*dcglug\.org\.uk"
> procmail: No match on "^List-Id: wp-hackers.lists.automattic.com"
> procmail: No match on "^Sender: owner-mutt-users@mutt\.org"
> procmail: Assigning "MATCH="
> procmail: Matched " contact users-help@httpd.apache.org; run by ezmlm"
> procmail: Match on "^(List-Id|(X-)?Mailing-List|X-List):\/.*"
> procmail: Assigning "LISTID= contact users-help@httpd.apache.org; run
> by ezmlm"
> procmail: No match on "^.*[<]\/[^@>\.]*"
> procmail: Assigning "MATCH="
> procmail: Matched " contact users-help"
> procmail: Match on "^\/[^@\.]*"
> procmail: Skipped "contact users-help/"
> procmail: Assigning "LASTFOLDER=.lists."
> procmail: Opening ".lists."
> procmail: Acquiring kernel-lock
> procmail: Notified comsat:
> "hendry@1662826:/home/hendry/Maildir//.lists."
>>From users-return-@httpd.apache.org Tue Oct 18 17:53:32 2005
> Subject: confirm subscribe to users@httpd.apache.org
> Folder: .lists.
> 6154
>
>
> Can someone suggest a better recipe?
>

When you extract the MATCH, you have a space
> procmail: Matched " contact users-help"
When the delivery attempt is made it sees a mailbox as ".lists. contact
users-help/"
You should have a mailbox named .lists. which will contain these messages.

or you could have DIR=`echo $LISTID|sed -e 's/ /_/g'`
This will replace spaces with underscores and should resolve your issue.

AK

Re: Procmail skipping

am 20.10.2005 03:13:56 von hendry

Thank you! Though .lists.contact_users-help is yucky. :(

It was matching this silly line:

Mailing-List: contact users-help@httpd.apache.org; run by ezmlm

--- Logging /home/hendry/Maildir//procmail.log for hendry, procmail:
Assigning "SHELL=/bin/sh"
procmail: No match on "^List-Id:.*dcglug\.org\.uk"
procmail: No match on "^List-Id: wp-hackers.lists.automattic.com"
procmail: Assigning "MATCH="
procmail: Matched " contact users-help@httpd.apache.org; run by ezmlm"
procmail: Match on "^(List-Id|(X-)?Mailing-List|X-List):\/.*"
procmail: Executing "echo $MATCH|sed -e 's/ /_/g'"
procmail: Assigning
"LISTID=contact_users-help@httpd.apache.org;_run_by_ezmlm"
procmail: No match on "^.*[<]\/[^@>\.]*"
procmail: Assigning "MATCH="
procmail: Matched "contact_users-help"
procmail: Match on "^\/[^@\.]*"
procmail: Assigning
"LASTFOLDER=.lists.contact_users-help/new/1129770202.19842_0 .chopstick"
procmail: Notified comsat:
"hendry@0:/home/hendry/Maildir//.lists.contact_users-help/ne w/1129770202.19842_0.chopstick"
>From users-return-56926-hendry=dabase.com@httpd.apache.org Wed Oct 19
18:03:22 2005
Subject: [users@httpd] Virual hosts not working
Folder: .lists.contact_users-help/new/1129770202.19842_0.chopstick
4280


I've updated my procmail which tries to create Maildir folders for each
mailing list:


:0
* ^(List-Id|(X-)?Mailing-List|X-List):\/.*
{
LISTID=`echo $MATCH|sed -e 's/ /_/g'`

:0
* LISTID ?? ^.*[<]\/[^@>\.]*
.lists.$MATCH/

:0
* LISTID ?? ^\/[^@\.]*
.lists.$MATCH/
}

Re: Procmail skipping

am 20.10.2005 17:16:33 von AK

kai.hendry@gmail.com wrote:

> Thank you! Though .lists.contact_users-help is yucky. :(
>
> It was matching this silly line:
>
> Mailing-List: contact users-help@httpd.apache.org; run by ezmlm
>
> --- Logging /home/hendry/Maildir//procmail.log for hendry, procmail:
> Assigning "SHELL=/bin/sh"
> procmail: No match on "^List-Id:.*dcglug\.org\.uk"
> procmail: No match on "^List-Id: wp-hackers.lists.automattic.com"
> procmail: Assigning "MATCH="
> procmail: Matched " contact users-help@httpd.apache.org; run by ezmlm"
> procmail: Match on "^(List-Id|(X-)?Mailing-List|X-List):\/.*"
> procmail: Executing "echo $MATCH|sed -e 's/ /_/g'"
> procmail: Assigning
> "LISTID=contact_users-help@httpd.apache.org;_run_by_ezmlm"
> procmail: No match on "^.*[<]\/[^@>\.]*"
> procmail: Assigning "MATCH="
> procmail: Matched "contact_users-help"
> procmail: Match on "^\/[^@\.]*"
> procmail: Assigning
> "LASTFOLDER=.lists.contact_users-help/new/1129770202.19842_0 .chopstick"
> procmail: Notified comsat:
> "hendry@0:/home/hendry/Maildir//.lists.contact_users-help/ne w/1129770202.19842_0.chopstick"
>>From users-return-56926-hendry=dabase.com@httpd.apache.org Wed Oct 19
> 18:03:22 2005
> Subject: [users@httpd] Virual hosts not working
> Folder: .lists.contact_users-help/new/1129770202.19842_0.chopstick
> 4280
>
>
> I've updated my procmail which tries to create Maildir folders for each
> mailing list:
>
>
> :0
> * ^(List-Id|(X-)?Mailing-List|X-List):\/.*
> {
> LISTID=`echo $MATCH|sed -e 's/ /_/g'`
>
> :0
> * LISTID ?? ^.*[<]\/[^@>\.]*
> .lists.$MATCH/
>
> :0
> * LISTID ?? ^\/[^@\.]*
> .lists.$MATCH/
> }
>

If you want the location to be of the mbox type, you need to remove the
terminating / in .lists.$MATCH

if you wish to only use the username part of the mailing list, you could
strip the contact by placing the following -e 's/ contact //' as the
first replacement rule for sed.

There are different ways to manipulate the extracted data into a format
you want prior to making any delivery attempts.

Ak