Title: Future sent dates
One annoying thing about some junk mail: The "time sent" of the message is often years in the future, like July 12, 2018. My junk mail filter flags them as junk; I have a mail rule that moves them into the Junk Mail folder so I can review them there and then delete them (99% of them anyhow, but the visual check is still essential for me). But then they often sit in the Deleted Items folder for ages. My Microsoft Entourage is set to delete everything in Deleted Items more than three days old, every time I quit the program. But, because of the bogus time sent, the messages do not get deleted.

I've written a little script that fixes the problem. Attach this to a mail rule that runs for all messages whose status is "junk mail". (Use the "run script" action.) If a message's date is in the future more than 24 hours (allowing for messages from other time zones around the world or people whose clocks are set slightly in the future), it will set the time sent to the current date and time, less one hour. This will allow the auto-delete action to work properly when the message is moved to Deleted Items.

tell application "Microsoft Entourage" --
    set currentMessages to the current messages --
    repeat with theMsg in the currentMessages --
        my ProcessMsg(theMsg) --
    end repeat --
end tell --

on ProcessMsg(theMsg) --
    tell application "Microsoft Entourage" --
        set dSent to time sent of theMsg
        set tomorrow to (current date) + 1 * days
        if dSent > tomorrow then
            set time sent of theMsg to (current date) - 1 * hours
        end if
    end tell --
end ProcessMsg --

--
Peace be with you!
Allen <[EMAIL PROTECTED]> XNS Name: =Allen Watson
My web page: <http://home.earthlink.net/~allenwatson/>
Scripts for OE and Entourage: <http://homepage.mac.com/allenwatson/>

Reply via email to