mhonarc-users

Using PROCMAIL and MHONARC

1997-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.

====RC FILE

##If subject and ^TO contain "deletearchives",
##run the script that will delete the archives
:0
* ^TOdeletearchives*
* ^Subject:.*deletearchives
| /bin/perl killit

##Copy incoming messages to folder_name



:0c:/mhonarc.lock
* ^TO*
/mhonarc/folder_name

#Add new messages via MHONARC from the folder into the mail archive
:0c
* ^TO*
| /mhonarc/mhonarc -add -outdir /mhonarc /mhonarc/folder_name
====End RC FILE



====Clear archived messages
#!/bin/perl
$mailfolder = "folder_name";
$mhonarcdb = ".mhonarc.db";
$msghtmlfiles = "msg*.*";

# Delete MSG Files
open (CMD1, "|rm $msghtmlfiles");
close (CMD1);

#Erase the mailfolder that hold messages added by MHONARC
open (CMD2, ">$mailfolder");
print "";
close (CMD2);

#Erase mhonarc db file
open (CMD3, ">$mhonarcdb");
print "";
close (CMD3);
exit;
====End Clear archived messages

It seems to work ok! Does anyone think I will have any problems? Any input would be appreciated!

-- brett

<Prev in Thread] Current Thread [Next in Thread>
  • Using PROCMAIL and MHONARC, B Schlank <=