[Imap-use] E-mails set to unread
Mark Crispin
mrc at Washington.EDU
Thu Apr 24 11:57:34 PDT 2008
On Thu, 24 Apr 2008, Rick Knight wrote:
> On my system I use procmail to filter messages and then deliver mail to mbox
> format mailfiles based on the content, subject, sender etc. of the message.
> For example I have a filter that looks for "[imap-use" in the subject. If
> found, the message is delivered to Mail/Imap. If a message is passed by all
> filters it is delivered to Mail/mbox. Both Mail/Imap and Mail/mbox are mbox
> format files (any file which starts with the characteristic "From "). My
> question is, when I convert my INBOX with the command...
>
> % mailutil copy INBOX #driver.mix/INBOX
>
> Will ~/Mail/Imap be converted as well?
No.
> It looks, from your answer, like it
> will not be converted. If not, then what form will "mailutil" take to
> convert Mail/Imap to mix format?
>
> % mailutil copy IMAP #driver.mix/Imap
Note that "mailutil copy" copies as opposed to converts in place. After
"converting INBOX" you still have the old-format INBOX as well as the
mix-format INBOX, and you need to delete the old-format INBOX as a
separate step.
Since, with non-INBOX mailboxes, the filesystem name is the same
regardless of format, you can not do a simple copy. You must do something
like:
% mailutil copy Imap #driver.mix/Imap.CONVERTED
% rm Mail/Imap
% mv Mail/Imap.CONVERTED Mail/Imap
Lots of variation is possible here.
Shell scripts are your friend. I hope that some people on this list will
share some of the scripts that they created for this purpose
Note that for specific conversion to mix format, there is a program called
mixcvt on the UW FTP server:
ftp://ftp.cac.washingotn.edu/mail/mixcvt.tar.Z
that does a somewhat better job (e.g., it preserves UIDs and splits the
old messages into multiple files) than mailutil does. mailutil is a very
general purpose program and will do the job, whereas mixcvt is
specifically designed for conversion.
Like mailutil, mixcvt copies instead of converts-in-place. So it does not
affect the source mailbox; you have to dispose of that separately.
With mixcvt, you don't use the "#driver.mix/" prefix; the destination is
always mix. Instead, you would do (give the above examples):
% mailutil copy INBOX #driver.mix/INBOX
% rm Mail/mbox
% mailutil copy Imap #driver.mix/Imap.CONVERTED
% rm Mail/Imap
% mv Mail/Imap.CONVERTED Mail/Imap
> I have 35 mail files in my Mail folder, including trash and sent. Does each
> file need to be converted individually? Again, judging from your earlier,
> yes.
Correct. Shell scripts are your friend.
-- Mark --
http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
More information about the Imap-use
mailing list