Using PROCMAIL and MHONARC1997-03-20 19:28:04
Usually I wouldn't email two lists at the same time, but I figured this applied. I'm using MHONARC to archive my e-mail on the web so I can check them while I am away. I was getting sick of having to telnet into shell to manually delete all the messages.
This is what I figured out would work to use MHONARC with PROCMAIL the way I want to.
##If subject and ^TO contain "deletearchives",
##run the script that will delete the archives
| /bin/perl killit
##Copy incoming messages to folder_name
#Add new messages via MHONARC from the folder into the mail archive
| /mhonarc/mhonarc -add -outdir /mhonarc /mhonarc/folder_name
====End RC FILE
====Clear archived messages
$mailfolder = "folder_name";
$mhonarcdb = ".mhonarc.db";
$msghtmlfiles = "msg*.*";
# Delete MSG Files
open (CMD1, "|rm $msghtmlfiles");
#Erase the mailfolder that hold messages added by MHONARC
open (CMD2, ">$mailfolder");
#Erase mhonarc db file
open (CMD3, ">$mhonarcdb");
====End Clear archived messages
It seems to work ok! Does anyone think I will have any problems? Any input would be appreciated!