Hylton Conacher (ZR1HPC | 26 Aug 2011 15:21
Picon

Procmailrc start

Hi,

Yes I am a newbie to procmail, so I ask that you point me to some
information so I can start using and understanding this program.

Be kind, I am a KDE user with limited cli usage.

I would like to start using Procmail for email filtering as I currently
have almost 600 filters listed in Mozilla Thunderbird moving email to an
equally large number of folders. The Mozilla filters are failing on
occasions and this is only due to the large number. Doing the recipes in
procmail is going to be LOTS of fun :|

Unfortunately this is a production system and there is no backup. That
is being remedied but in the meantime the procmail filters still need
setting up.

I have obtained and had an introductory read of the book called Procmail
Companion (McCarthy), the procmail homepage, and done significant Google
searching as well as fairly extensive man page work, all without being
able to find an explanation of what the 'default' lines of code would be
for a procmailrc file. Is there a list of the lines of code that could
go in the start of the file, if so where?

If not, what are the bare minimum lines? A full listing of them would be
better as then I can add just the ones needed.

I would assume the following lines of code before the recipes:

Maildir
(Continue reading)

Komal Tagdiwala (ktagdiwa | 26 Aug 2011 16:07
Picon
Favicon

RE: Procmailrc start

The book below should be very helpful. I know it was very helpful when I
started several years back and I still refer to it when I need to learn
anything new.

The Procmail Companion
By: Martin McCarthy
Publisher: Addison-Wesley Professional
Publication Date: 01-NOV-2001
Insert Date: 26-SEP-2002

Hope that helps.

Regards,
Komal
-----Original Message-----
From: procmail-bounces <at> lists.RWTH-Aachen.de
[mailto:procmail-bounces <at> lists.RWTH-Aachen.de] On Behalf Of Hylton
Conacher (ZR1HPC)
Sent: Friday, August 26, 2011 6:22 AM
To: Procmail
Subject: Procmailrc start

Hi,

Yes I am a newbie to procmail, so I ask that you point me to some
information so I can start using and understanding this program.

Be kind, I am a KDE user with limited cli usage.

I would like to start using Procmail for email filtering as I currently
(Continue reading)

Robert Holtzman | 26 Aug 2011 20:27
Picon

Re: Procmailrc start

On Fri, Aug 26, 2011 at 07:07:12AM -0700, Komal Tagdiwala (ktagdiwa) wrote:
> The book below should be very helpful. I know it was very helpful when I
> started several years back and I still refer to it when I need to learn
> anything new.
> 
> The Procmail Companion
> By: Martin McCarthy
> Publisher: Addison-Wesley Professional
> Publication Date: 01-NOV-2001
> Insert Date: 26-SEP-2002
> 
> Hope that helps.

The OP plainly stated he had read that book.

--

-- 
Bob Holtzman
If you think you're getting free lunch, 
check the price of the beer.
Key ID: 8D549279
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail <at> lists.RWTH-Aachen.de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail
Patrick Shanahan | 26 Aug 2011 16:14
Picon

Re: Procmailrc start

* Hylton Conacher (ZR1HPC) <hylton <at> conacher.co.za> [08-26-11 09:22]:
> Yes I am a newbie to procmail, so I ask that you point me to some
> information so I can start using and understanding this program.
> 
mailing list is:     procmail <at> lists.RWTH-Aachen.de
home page is:        http://www.procmail.org/
excellent pointers:  http://www.professional.org/procmail/disclaimer.html

> Unfortunately this is a production system and there is no backup. That
> is being remedied but in the meantime the procmail filters still need
> setting up.

as long as you do not recipe mail to /dev/null, you should be able to
recover *any* msg on your system that procmail has directed.

> I have obtained and had an introductory read of the book called Procmail
> Companion (McCarthy)

This should be excellent, she is an expert.

> , the procmail homepage, and done significant Google searching as well
> as fairly extensive man page work, all without being able to find an
> explanation of what the 'default' lines of code would be for a
> procmailrc file.  Is there a list of the lines of code that could go in
> the start of the file, if so where?

http://www.professional.org/procmail/disclaimer.html

> If not, what are the bare minimum lines? A full listing of them would be
> better as then I can add just the ones needed.
(Continue reading)

Erik Christiansen | 26 Aug 2011 16:16
Favicon

Re: Procmailrc start

On 26.08.11 15:21, Hylton Conacher (ZR1HPC) wrote:
> If not, what are the bare minimum lines? A full listing of them would be
> better as then I can add just the ones needed.
> 
> I would assume the following lines of code before the recipes:
> 
> Maildir
> log
> verbose
> path
> 
> What else before the recipes start?

Do you have the three examples:

/usr/share/doc/procmail/examples/[1-3]procmailrc

on your host? I don't recall whether they came with the apt-get procmail
... yep seems so, since I don't see a procmail doc package.

You should be able to have some fun with them already.

I just now saw the package:

procmail-lib - procmail library of plug-in recipes

which might be worth a glance, once you're up and running.

It is many years since I've looked above the recipes, at the start of my
.procmailrc. Here's what I find:
(Continue reading)

LuKreme | 26 Aug 2011 19:21
Favicon

Re: Procmailrc start

"Hylton Conacher (ZR1HPC)" <hylton <at> conacher.co.za> squawked out on Friday 26-Aug-2011 <at> 07:21:36
> I have obtained and had an introductory read of the book called Procmail
> Companion (McCarthy)

Good book.

> Is there a list of the lines of code that could go in the start of the file, if so where?

Nope, it depends largely on your system and your setup. For example, I start off mine with:

DATE=`date '+%d-%b-%Y'`
LONGDATE=`date "+%Y%m%d %I:%M:%S %z"`
NL="
"
WS=“  “ # space and tab
MYLOGFILE="pm-$DATE.log"
LOGFILE=$HOME/logs/$MYLOGFILE
LOGABSTRACT=NO

then I check to see it a message is from someone I have in a ‘mark as read’ file:

READLIST=$HOME/.readlist
READIT=`grep -i "^$CLEANFROM" $READLIST`
LOG="readlist=$READLIST CLEANFROM=$CLEANFROM READIT=$READIT$NL”

:0
* ! READIT ?? ^^^^
{ TRAP='mv "$LASTFOLDER" "${LASTFOLDER}:2,S"’ Which }

(So, for example, if root <at> mydomain.tld is in .readlist’ then that message would be marked as read in my Maildir)
(Continue reading)

Ruud H.G. van Tol | 27 Aug 2011 19:41
Picon

Re: Procmailrc start

On 2011-08-26 19:21, LuKreme wrote:
> Hylton Conacher:

>> Is there a list of the lines of code that could go in the start of the file, if so where?
>
> Nope, it depends largely on your system and your setup. For example, I start off mine with:
>
> DATE=`date '+%d-%b-%Y'`
> LONGDATE=`date "+%Y%m%d %I:%M:%S %z"`

I hate to do shell calls,
so I get the date from the '^From ' line of the message.

Demo: http://rvtol.home.xs4all.nl/procmail/basic/

--

-- 
Ruud
LuKreme | 27 Aug 2011 23:21
Favicon

Re: Procmailrc start

On Aug 27, 2011, at 11:41, "Ruud H.G. van Tol" <rvtol <at> isolution.nl> wrote:

> I hate to do shell calls,
> so I get the date from the '^From ' line of the message.

Yeah, I prefer just calling date and getting the exact format I want. My current mail server hardware is
about 100,000 times more powerful than the first system I ran procmail on, I don't worry much about simple
shell calls.
Ruud H.G. van Tol | 28 Aug 2011 13:17
Picon

Re: Procmailrc start

On 2011-08-27 23:21, LuKreme wrote:
> Ruud:

>> I hate to do shell calls,
>> so I get the date from the '^From ' line of the message.
>
> Yeah, I prefer [...] getting the exact format I want.

So do I, and (at least for me) that is easy to do in procmail.

My assumption about your shell calls was wrong,
see procmailrc on SHELLMETAS:
your date calls are both direct calls. :)

(but still too heavy for my taste)

> My current mail server hardware is about 100,000 times more powerful than the first system I ran procmail
on, I don't worry much about simple shell calls.

Until the volume (and grain of post-processing) makes you have to worry 
again.

--

-- 
Ruud
Hylton Conacher (ZR1HPC | 27 Aug 2011 21:56
Picon

Re: Procmailrc start

Tnx to all for the input.

I will be re-reading the Procmail Companion in association with the
links to notes Patrick and others have sent on.

I am sure there will be lots more questions and I may not have located
their answers in an FAQ. A simple pointer to where you KNOW the answer
is i.e. not hope that is where it is, would suffice, if you can't take
the time to explain it here, for me and future students.

On 26/08/11 15:21, Hylton Conacher (ZR1HPC) wrote:
> Hi,
> 
> Yes I am a newbie to procmail, so I ask that you point me to some
> information so I can start using and understanding this program.

<snip>

Gmane