Обсуждение: Procmail recipe for new setup

Поиск
Список
Период
Сортировка

Procmail recipe for new setup

От
Steve Litt
Дата:
Hi all,

The following procmail recipe works for me:

===========================================
:0:
* ^(To|Cc).*pgsql-general@postgresql.org
.Postgres/
===========================================

In the preceding, the slash at the end of the destination (.Postgres)
is because Procmail is inserting the mail into a maildir (the maildir
for my local Dovecot IMAP server). I use the (To|Cc) vocabulary instead
of something like a list-id email heading to accommodate those who for
some reason email me and copy the list, or email the list and copy me.
(To|Cc) seems to work under all conditions.

Any recipes based on [GENERAL] being in the subject have stopped
working because [GENERAL] is no longer in the subject.

SteveT

Steve Litt 
November 2017 featured book: Troubleshooting: Just the Facts
http://www.troubleshooters.com/tjust


Re: Procmail recipe for new setup

От
Rich Shepard
Дата:
On Mon, 20 Nov 2017, Steve Litt wrote:

> The following procmail recipe works for me:
>
> ===========================================
> :0:
> * ^(To|Cc).*pgsql-general@postgresql.org
> .Postgres/
> ===========================================

Hi, Steve!
  Here's an alternative recipe:

:0:
* ^TO_.*pgsql-general@(lists\.)?postgresql.org
POSTGRES

The TO_(with no space after it) captures CCs too, and the regex (lists\.)?
says accept 0 (zero) or 1 (one) of the lists prefix. I use mbox not maildir
so POSTGRES is the name of the file in ~/mail/.

Regards,

Rich


Re: Procmail recipe for new setup

От
"Joshua D. Drake"
Дата:
On 11/20/2017 02:10 PM, Steve Litt wrote:
> Hi all,
>
> The following procmail recipe works for me:
>
> ===========================================
> :0:
> * ^(To|Cc).*pgsql-general@postgresql.org
> .Postgres/
> ===========================================

You may want to use TO ... See here:

https://www.mhonarc.org/archive/html/procmail/1998-04/msg00093.html


Thanks,

JD

-- 

Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc

PostgreSQL Centered full stack support, consulting and development.
Advocate: @amplifypostgres || Learn: https://pgconf.org
*****     Unless otherwise stated, opinions are my own.   *****



Re: Procmail recipe for new setup

От
Piotr Stefaniak
Дата:
On 2017-11-20 23:10, Steve Litt wrote:

> The following procmail recipe works for me:

I use this:

:0
* ^List-Id: \/.*
{    :0    * $MATCH ?? [<]+\/.*[^>]+    $MATCH/
    :0    $MATCH/
}

Re: Procmail recipe for new setup

От
Stephen Frost
Дата:
Greetings Piotr,

* Piotr Stefaniak (postgres@piotr-stefaniak.me) wrote:
> On 2017-11-20 23:10, Steve Litt wrote:
>
> > The following procmail recipe works for me:
>
> I use this:
>
> :0
> * ^List-Id: \/.*
> {
>      :0
>      * $MATCH ?? [<]+\/.*[^>]+
>      $MATCH/
>
>      :0
>      $MATCH/
> }

I would caution against using this kind of expansion as it may allow
malicious attackers to generate all kinds of not-nice stuff in your mail
directories.

Thanks!

Stephen

Re: Procmail recipe for new setup

От
Stephen Frost
Дата:
Greetings Rich, all,

* Rich Shepard (rshepard@appl-ecosys.com) wrote:
> On Mon, 20 Nov 2017, Steve Litt wrote:
>
> >The following procmail recipe works for me:
> >
> >===========================================
> >:0:
> >* ^(To|Cc).*pgsql-general@postgresql.org
> >.Postgres/
> >===========================================
>
> Hi, Steve!
>
>   Here's an alternative recipe:
>
> :0:
> * ^TO_.*pgsql-general@(lists\.)?postgresql.org
> POSTGRES
>
> The TO_(with no space after it) captures CCs too, and the regex (lists\.)?
> says accept 0 (zero) or 1 (one) of the lists prefix. I use mbox not maildir
> so POSTGRES is the name of the file in ~/mail/.

Yes, this is a good recipe to use, particularly as we will be,
eventually, encouraging more use of the 'lists.postgresql.org'
subdomain in the future, and email is already being accepted for the
lists through it.

Thanks!

Stephen