*This message was transferred with a trial version of CommuniGate(tm) Pro*
On Sun, Jun 22, 2003, Judi Sohn said:

>I really like the "Delete Age Messages" script to keep my mailing list
>folders clutter-free. The description says:
>
>>Deletes old messages (and attachments) in all currently selected mail
>>folders after prompting user. Script can be customized to automatically
>>delete from specified folders with no user interaction.
>
>Can anyone explain for someone who doesn't know how to write AppleScript
>but can follow a basic recipe, how to customize the script to delete from
>a range of folders (all subfolders of a folder called "Mailing Lists")
>all read messages older than 3 days?

You have to list every folder individually.

>Oh, and I'd like to do the same for the Spam folder (from SpamSieve) and
>Mail Trash.

Judi,

Here's what my version of the relevant part of the script is.

***
property preferredContainers : {{name:"Mail Trash", ageInDays:2},
{name:"eLists/NetNewsWire", ageInDays:30}, {name:"eLists/OS X",
ageInDays:3}, {name:"eLists/PowerMail", ageInDays:365}, {name:"eLists/
Scripting", ageInDays:3}, {name:"eLists/Surginet", ageInDays:5},
{name:"eLists/TidBITS Talk", ageInDays:3}, {name:"eLists/URLMP-WC",
ageInDays:5}, {name:"eLists/UserLand", ageInDays:3}, {name:"Online
Orders", ageInDays:21}, {name:"Temporary", ageInDays:90}}

-- You can redefine "preferredContainers" as a list of the mailboxes/
expiration dates if you want this
-- script to cycle those mail folders automatically.
--property preferredContainers : {{name:"Folder/Subfolder",
ageInDays:365}, {name:"Out Tray", ageInDays:365}} -- add as many as you like
***

There are 2 relevant points. First is that there is no facility within PM
to actually schedule the script to run. You must either do this manually
or set up some other method of scheduling AppleScripts to execute. I
personally have done this from a cron job.

From one of Wayne's previous messages:

>Just make sure you setup your crontab properly it should look something
>like this:
>
>30 15 */3 * * osascript /Users/admin/deleteMessages
>
>This would run the script every 3 days at 3:30 PM

I've set mine up like this.

15 10 */2 * * osascript /Users/afragen/Documents/DeleteAgedMessages

Where DeleteAgedMessages is an alias to the "Delete Aged Messages v1.2"
script. Apparently cron doesn't like spaces.

You can get Cronix here. <http://www.koch-schmidt.de/cronnix/>

--
Andy Fragen


Reply via email to