[vox-tech] program to move message from inbox to folder

Henry House hajhouse at houseag.com
Wed Sep 29 11:44:19 PDT 2004


På onsdag, 29 september 2004, skrev Charles McLaughlin:
> Hello,
> 
> I want to write a shell script to move messages from a mail spool inbox 
> to a number of folders.  So if there are messages in the inbox, the 
> first message should go to folder1, second message should go to folder2, 
> etc.
> 
> Is there a command I can use in my script to move the first message in 
> the inbox to a folder?  I was thinking procmail, but I don't want to do 
> any pattern matching, I just want to move the first message over and 
> over again.

Offhand, this sound like an easy job if you use a maildir to store the
messages instead of an mbox. (A maildir is a specially arranged directory
structure containing one message per file, while an mbox is a flat file
containing 0--n messages.) See maildir(5) for documentation on this format
and its file-naming conventions.

-- 
Henry House
Please don't send me HTML mail! My mail system will reject it.
The unintelligible text that may follow is a digital signature.
See <http://hajhouse.org/pgp> to find out how to use it.
My OpenPGP key: <http://hajhouse.org/hajhouse.asc>.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://ns1.livepenguin.com/pipermail/vox-tech/attachments/20040929/624dea44/attachment.bin


More information about the vox-tech mailing list