Purging select dead messages from mail.box
This agent will automatically delete dead messages from MAIL.BOX that match certain criteria.
This agent will automatically delete dead messages from MAIL.BOX that match certain criteria. I personally don't want to delete all Dead messages, but would like to automatically delete some so that I don't have to keep cleaning out MAIL.BOX on my SMTP server every day.
When you open MAIL.BOX, make note of some key phrases in each dead message that reoccur frequently. These phrases can be populated into the agent to keep the clutter down.
To implement, create a Shared agent in MAIL.BOX. Set it to run on Schedule Daily (or hourly if you have a large volume of mail) and to run against all documents in the database. Here is the code with some examples of common phrases that I see:
DeleteReasons:="INVALID RECIPIENT" : "MESSAGE BLOCKED" : "USER UNKNOWN" : "BOGUS MAIL" : "USER ACCOUNT INACTIVE" : "MAILBOX UNAVAILABLE" : "NO SUCH USER"; @If(@UpperCase(RoutingState)="DEAD" & @Contains(@UpperCase(DeadFailureReason);DeleteReasons); @DeleteDocument; "" ); SELECT @All
Start the conversation
0 comments