Mark Crispin wrote:
The easiest way to do this is to edit file
imap-200?/src/osdep/unix/Makefile
to set
CREATEPROTO=mbxproto
instead of the current unixproto. Then rebuild the entire UW IMAP toolkit.
Yeah, I knew about that method. I was just wondering if there was a way to make dmail (from procmailrc, for example) know to instantiate new mail folders as mbx instead of mbox. It seems not unreasonable to have command-line args for tmail/dmail (other than -I) that could specify format. But, what to do in the case that it doesn't match existing format might be an issue.
You could do this with a little shell script, something like "dmail-create.sh" we use:
#!/bin/bash if [ ! -e "$HOME/$1" ] && [ $1 != ".inbox" ]; then /usr/local/bin/mbxcreat "#driver.mbx:$1" fi /usr/local/bin/dmail "+$1"
Where this script takes 1 command line argument - the path of the folder in which you want to save the message, relative to the user's home directory. ".inbox" is supposed to be in unix format so sendmail can deliver to it directly "if all else fails", hence the exception.
Then, in your .procmailrc scripts, instead of delivering to dmail, you deliver to dmail-create.sh. I.e.
LOCK=.lock.user.id
:0 :${LOCK}
| /usr/local/bin/dmail-create.sh INBOXThis way, the folder will be created in MBX format if it doesn't exist before dmail tries to save the message.
We didn't find any easier way to accomplish this for arbitrary folders; it would be nice if dmail could do this itself.
-Erik Kangas
--
Erik Kangas, Ph.D. --- President of Lux Scientiae, Incorporated [EMAIL PROTECTED] --- http://luxsci.com
Office Phone: 1-617-507-2162 Cell Phone: 1-617-596-9558 P.O. Box 326 Luxsci Toll Free: 1-800-441-6612 Westwood, Massachusetts LuxSci FAX: 1-413-332-0598 02090, USA
