public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] procmail, formail and maildir for digests...
@ 2006-10-10 11:09 Steve [Gentoo]
  2006-10-10 11:29 ` Kevin Fullerton
  2006-10-11 16:12 ` [gentoo-user] " Moshe Kamensky
  0 siblings, 2 replies; 9+ messages in thread
From: Steve [Gentoo] @ 2006-10-10 11:09 UTC (permalink / raw
  To: gentoo-user

I'm familiar with this procmail recipe:

--
:0

* ^List-Id:.*<gentoo-user.gentoo.org>
| formail +1 -ds >> gentoo_user
--

However... I need to use maildir.... is there a straightforward way to deliver directly to maildir folders with formail from procmail?






-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] procmail, formail and maildir for digests...
  2006-10-10 11:09 [gentoo-user] procmail, formail and maildir for digests Steve [Gentoo]
@ 2006-10-10 11:29 ` Kevin Fullerton
  2006-10-11 10:32   ` Steve [Gentoo]
  2006-10-11 16:12 ` [gentoo-user] " Moshe Kamensky
  1 sibling, 1 reply; 9+ messages in thread
From: Kevin Fullerton @ 2006-10-10 11:29 UTC (permalink / raw
  To: gentoo-user

Here's the procmail recipe I use with maildir folders and the Gentoo lists - I think as long as procmail is setup with maildir support you just need 
to set your MAILDIR var and use a trailing slash and it knows it'd delivering to a MailDir.

MAILDIR=$HOME/.maildir
LOGFILE=$HOME/.procmaillog
LOGABSTRACT=no
VERBOSE=on
FORMAIL=/usr/bin/formail
NL="
"

:0:
* ^List-Id:.*gentoo-user\.gentoo\.org
$MAILDIR/gentoo-user/

Cheers

Kevin

On 12:09 Tue 10 Oct     , Steve [Gentoo] wrote:
> I'm familiar with this procmail recipe:
> 
> --
> :0
> 
> * ^List-Id:.*<gentoo-user.gentoo.org>
> | formail +1 -ds >> gentoo_user
> --
> 
> However... I need to use maildir.... is there a straightforward way to deliver directly to maildir folders with formail from procmail?
> 
> 
> 
> 
> 
> 
> -- 
> gentoo-user@gentoo.org mailing list
> 
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: [gentoo-user] procmail, formail and maildir for digests...
  2006-10-10 11:29 ` Kevin Fullerton
@ 2006-10-11 10:32   ` Steve [Gentoo]
  2006-10-11 10:40     ` Rasmus Andersen
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Steve [Gentoo] @ 2006-10-11 10:32 UTC (permalink / raw
  To: gentoo-user

Kevin Fullerton wrote:
> Here's the procmail recipe I use with maildir folders and the Gentoo lists - I think as long as procmail is setup with maildir support you just need to set your MAILDIR var and use a trailing slash and it knows it'd delivering to a MailDir.
>   
Ahhhh, I guess I hadn't been as clear as I could have been. I have an
almost identical setup to yours right now and that allows me to use
procmail to deliver to maildir...  The problem I have is that I want to
use formail to split my digests into individual messages (because large
digests play havoc with IMAP, and to make replies easier) - but I can
only find documentation showing how to use formail to split digests into
mbox format.  Unsurprisingly the silly attempt below doesn't work (as "|
formail..." is interpreted by /bin/sh.) :
--

:0
* ^List-Id:.*<gentoo-user.gentoo.org>
| formail +1 -ds >> gentoo_user/

--

Is formail the right tool for me to use here?  Is there a tool to
deliver an mbox of messages to a maildir that I can use in place of '>>
gentoo_user/' above?


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: [gentoo-user] procmail, formail and maildir for digests...
  2006-10-11 10:32   ` Steve [Gentoo]
@ 2006-10-11 10:40     ` Rasmus Andersen
  2006-10-11 14:07       ` Steve [Gentoo]
  2006-10-11 12:17     ` [gentoo-user] " reader
  2006-10-11 13:38     ` Re: [gentoo-user] " Michael Sullivan
  2 siblings, 1 reply; 9+ messages in thread
From: Rasmus Andersen @ 2006-10-11 10:40 UTC (permalink / raw
  To: gentoo-user

On Wed, Oct 11, 2006 at 11:32:08AM +0100, Steve [Gentoo] wrote:
> Is formail the right tool for me to use here?  Is there a tool to
> deliver an mbox of messages to a maildir that I can use in place of '>>
> gentoo_user/' above?

To googling for mbox2maildir or mb2md(?). With a bit of work I think
they could do it.

Rasmus
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-user]  Re: procmail, formail and maildir for digests...
  2006-10-11 10:32   ` Steve [Gentoo]
  2006-10-11 10:40     ` Rasmus Andersen
@ 2006-10-11 12:17     ` reader
  2006-10-11 13:38     ` Re: [gentoo-user] " Michael Sullivan
  2 siblings, 0 replies; 9+ messages in thread
From: reader @ 2006-10-11 12:17 UTC (permalink / raw
  To: gentoo-user

"Steve [Gentoo]" <gentoo_steve@shic.co.uk> writes:

> --
>
> :0
> * ^List-Id:.*<gentoo-user.gentoo.org>
> | formail +1 -ds >> gentoo_user/
>
> --

I don't have your setup but am a longtime procmail user..
Maybe you can use formail as a filter and then deliver something like
below... I may have it broken up wrong but the idea may be of use:

(Untested)
:0fw
{
 * ^List-Id:.*<gentoo-user.gentoo.org>
 | formail +1 -ds 
 :0
 gentoo_user/
}

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: [gentoo-user] procmail, formail and maildir for digests...
  2006-10-11 10:32   ` Steve [Gentoo]
  2006-10-11 10:40     ` Rasmus Andersen
  2006-10-11 12:17     ` [gentoo-user] " reader
@ 2006-10-11 13:38     ` Michael Sullivan
  2 siblings, 0 replies; 9+ messages in thread
From: Michael Sullivan @ 2006-10-11 13:38 UTC (permalink / raw
  To: gentoo-user

On Wed, 2006-10-11 at 11:32 +0100, Steve [Gentoo] wrote:
> Kevin Fullerton wrote:
> > Here's the procmail recipe I use with maildir folders and the Gentoo lists - I think as long as procmail is setup with maildir support you just need to set your MAILDIR var and use a trailing slash and it knows it'd delivering to a MailDir.
> >   
> Ahhhh, I guess I hadn't been as clear as I could have been. I have an
> almost identical setup to yours right now and that allows me to use
> procmail to deliver to maildir...  The problem I have is that I want to
> use formail to split my digests into individual messages (because large
> digests play havoc with IMAP, and to make replies easier) - but I can
> only find documentation showing how to use formail to split digests into
> mbox format.  Unsurprisingly the silly attempt below doesn't work (as "|
> formail..." is interpreted by /bin/sh.) :
> --
> 
> :0
> * ^List-Id:.*<gentoo-user.gentoo.org>
> | formail +1 -ds >> gentoo_user/
> 
> --
> 
> Is formail the right tool for me to use here?  Is there a tool to
> deliver an mbox of messages to a maildir that I can use in place of '>>
> gentoo_user/' above?
> 

There's probably an easier way to do this, but couldn't you use formail
to split your digests into individual mails in mbox format and then use
another tool to covert those mboxes to maildir?  You could use a cron
job...

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] procmail, formail and maildir for digests...
  2006-10-11 10:40     ` Rasmus Andersen
@ 2006-10-11 14:07       ` Steve [Gentoo]
  0 siblings, 0 replies; 9+ messages in thread
From: Steve [Gentoo] @ 2006-10-11 14:07 UTC (permalink / raw
  To: gentoo-user

Rasmus:

I've had a look at mb2md, and this seems close to what I'd need - though
I'm dubious about two aspects:

1.    It doesn't seem to have a filter mode (i.e. It always takes file
as input as opposed to stdin, which would allow it to slot more neatly
into a procmail based solution.
2.    The documentation suggests that it is intended to transform whole
mbox files into maildir directories - whereas I'd need it to take an
mbox file and append it to a maildir directory which would likely
already contain messages from the previous digest.

Am I missing something obvious (to someone else)?

Reader at Newsguy:

While I don't really understand why your suggestion should work...I
tried it anyway.  It didn't work... and delivered the digest to my inbox
and to my gentoo folder, but didn't in split the digest.

--
>From user@domain.co.uk  Wed Oct 11 14:40:21 2006
 Subject: Digest of gentoo-user@gentoo.org issue 950 (52678-52727)
  Folder:
.Mailing.Gentoo.ThisMonth/new/1160574057.17594_0.server          161160
procmail: Extraneous filter-flag ignored
procmail: Skipped "* ^List-Id:.*<gentoo-user.gentoo.org>"
procmail: Skipped "| formail +1 -ds "
--

It seems strange that this should be tricky to set-up - procmail
obviously intends to address digest splitting and to support both mbox
and maildir delivery... Surely there's a simple solution?

Steve

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-user] Re: procmail, formail and maildir for digests...
  2006-10-10 11:09 [gentoo-user] procmail, formail and maildir for digests Steve [Gentoo]
  2006-10-10 11:29 ` Kevin Fullerton
@ 2006-10-11 16:12 ` Moshe Kamensky
  2006-10-12 10:07   ` Steve [Gentoo]
  1 sibling, 1 reply; 9+ messages in thread
From: Moshe Kamensky @ 2006-10-11 16:12 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

* Steve [Gentoo] <gentoo_steve@shic.co.uk> [11/10/06 09:34]:
> I'm familiar with this procmail recipe:
> 
> --
> :0
> 
> * ^List-Id:.*<gentoo-user.gentoo.org>
> | formail +1 -ds >> gentoo_user
> --
> 
> However... I need to use maildir.... is there a straightforward way to deliver directly to maildir folders with formail from procmail?

The -s option of formail allows you to specify an argument, which is a 
program name. This program will be run for each message, with the 
message on the stdin. So if you have such a program that delivers to a 
maildir, you can use it. procmail itself is one such program, so you 
should be able to do something like

| formail +1 -ds procmail .procmailrc.gentoo

and then have .procmailrc.gentoo say something like

:0
gentoo-user/

Moshe
> 
> 
> 
> 
> 
> 
> -- 
> gentoo-user@gentoo.org mailing list
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Re: procmail, formail and maildir for digests...
  2006-10-11 16:12 ` [gentoo-user] " Moshe Kamensky
@ 2006-10-12 10:07   ` Steve [Gentoo]
  0 siblings, 0 replies; 9+ messages in thread
From: Steve [Gentoo] @ 2006-10-12 10:07 UTC (permalink / raw
  To: gentoo-user

Moshe Kamensky wrote:
> The -s option of formail allows you to specify an argument, which is a 
> program name. This program will be run for each message, with the 
> message on the stdin. So if you have such a program that delivers to a 
> maildir, you can use it. procmail itself is one such program, so you 
> should be able to do something like
>
> | formail +1 -ds procmail .procmailrc.gentoo
>
> and then have .procmailrc.gentoo say something like
>
> :0
> gentoo-user/
>   
That works perfectly... Thanks!

I'd overlooked that -s had an optional argument with formail - and while
I'd realised I probably wanted procmail to deliver messages, I hadn't
realised that I could have separate configurations as easily as that.

I'm surprised this example is neither one of the convenient examples in
the man procmailex man page... nor widely cited in the online howtos
I've seen.





-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-10-12 10:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-10 11:09 [gentoo-user] procmail, formail and maildir for digests Steve [Gentoo]
2006-10-10 11:29 ` Kevin Fullerton
2006-10-11 10:32   ` Steve [Gentoo]
2006-10-11 10:40     ` Rasmus Andersen
2006-10-11 14:07       ` Steve [Gentoo]
2006-10-11 12:17     ` [gentoo-user] " reader
2006-10-11 13:38     ` Re: [gentoo-user] " Michael Sullivan
2006-10-11 16:12 ` [gentoo-user] " Moshe Kamensky
2006-10-12 10:07   ` Steve [Gentoo]

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox