Dallman Ross | 3 May 2007 13:26

RE: Filter and Resend Message


> On Thu, May 03, 2007 at 11:09:43AM +0800, DR. Lee - NS1 wrote:
> 
> > The solution, from the technical point of view, maybe clumsy but
> > it does what I need anyway, In business, we can not afford to
> > look for perfect solution.
> 
> > [snip]
> 

> I acknowledge your "Don't let the good be the enemy of the perfect";
> in that vein, here is something easier on the eyes and, probably,
> the process table:
> 
>  MY_TO = `formail -zx To: -zx Cc: | fmt -1 |
>           grep  <at> ourdomain\. | uniq -c | tr -d '[[]()<>,	]'`
> 
> (That was a tab after the comma in the final brackets.)

By the way, if you are delivering to folders, such as maildir+
folders, you don't need separate procmail delivery recipes for
each local folder.  You can put them all on one delivery line.

After you massage MY_TO appropriately to have the various
mailfolder paths in the lines, you would do this:

   MAILDIR = /var/spool/mail  # or wherever the mailspool is
   MY_TO = "$MAILDIR/john/ $MAILDIR/paula/ $MAILDIR/jill/"

  :0
(Continue reading)

DR. Lee - NS1 | 5 May 2007 16:25

RE: Filter and Resend Message

Hi,

I played with the following script with and without the dot and it works
as long as the sub-dir was created in advance
and the user group write right is set correctly. Why is Procmail can
write to multiple directories but can not write to multiple
standard e-mail files? 

Now that the mail is stored in the subdirectory instead of the
tradtioanl "one file for all mails", how could I get IMAP account using
MS Outlook to see it? Do I have to use a different client end?

# This format will create subr- dir called new and cur and tmp
automatically
#:0
#* test
#/var/spool/mail/kfl/ /var/spool/mail/dadu/


# This format will use numbered mail in the named directory
#
:0
* test
/var/spool/mail/kfl/. /var/spool/mail/dadu/.

Rgds,
Kfl. HK.

 
>By the way, if you are delivering to folders, such as maildir+ folders,
(Continue reading)

Bart Schaefer | 5 May 2007 17:27
Picon

Re: Filter and Resend Message

On 5/5/07, DR. Lee - NS1 <kflee <at> itnc.com> wrote:
> Hi,
>
> Why is Procmail can
> write to multiple directories but can not write to multiple
> standard e-mail files?

Directory writes do not require filesystem locks to synchronize with
other programs.
DR. Lee - NS1 | 7 May 2007 05:07

RE: Filter and Resend Message


>>
>> Why is Procmail can
>> write to multiple directories but can not write to multiple standard 
>> e-mail files?

>Directory writes do not require filesystem locks to synchronize with
other programs.

Surely, to allow to write to multiple files could be considered an
enhancement for the future version of procmail;

Any idea how a PC fornt end would be able to see the directory of mail
using IMAP ?

Rgds,
Kfl. HK.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail <at> lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
Gerald V. Livingston II | 7 May 2007 08:22

Re: Filter and Resend Message

On Mon, 07 May 2007 11:07:24 +0800 "DR. Lee - NS1" <kflee <at> itnc.com> wrote:

> Any idea how a PC fornt end would be able to see the directory of mail
> using IMAP ?

You have to have an IMAP *SERVER* such as Courier-IMAP or uw-IMAP on the
backend.

Gerald
ITNC_Root-NS1 | 5 May 2007 14:20

RE: Filter and Resend Message


Hi, 

>By the way, if you are delivering to folders, such as maildir+ folders,
you don't need separate procmail delivery recipes for each local
>folder.  You can put them all on one delivery line.

>After you massage MY_TO appropriately to have the various mailfolder
paths in the lines, you would do this:

>   MAILDIR = /var/spool/mail  # or wherever the mailspool is
>   MY_TO = "$MAILDIR/john/ $MAILDIR/paula/ $MAILDIR/jill/"

>  :0
>   $MY_TO

>Dallman

I managed to constrcut the MY_TO to:
procmail: Assigning "MAIL_TO=/var/spool/mail/candy/
/var/spool/mail/paly/"

But the procmail does not delivery the mail to the second person:

procmail: Acquiring kernel-lock
procmail: Match on ! "^^^^"
procmail: Unable to treat as directory "/var/spool/mail/candy"
procmail: Skipped "/var/spool/mail/paly/"
procmail: Assigning "LASTFOLDER=/var/spool/mail/candy"
procmail: Opening "/var/spool/mail/candy"
(Continue reading)


Gmane