Solved

Automatically Delete Dead Messages

Posted on 2004-04-26
3
1,360 Views
Last Modified: 2013-12-18
How do I set Domino to automatically delete dead messages caused by the return address being invalid--hence no NDR can be sent? A typical situation is a spam/worm generated email to some generic name like john@domain.com and Domino accepts the mail because there is a John in the address book, but doesn't deliver because the name is not unique. Domino then tries to send an NDR to the sender's return address which of course fails. With most other email servers I've used this was just a configuration option (i.e. "Delete undeliverable mail with a bad return address"), but I can't find any such setting in Domino.

Note that I would accept an answer that explains how to automatically delete ALL dead messages regardless of reason.
0
Comment
Question by:glebn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 15

Assisted Solution

by:Bozzie4
Bozzie4 earned 50 total points
ID: 10922885
Create an agent that runs on all dead mails in mail.box.  Note that you must put the agent in another database, to be able to schedule it and let it run automatically.

cheers,

tom
0
 
LVL 19

Accepted Solution

by:
madheeswar earned 200 total points
ID: 10924816
Code:
Option Public
Sub Initialize '=============================================================================================== 'Created by Pablo Herman(1stopdomino) on 8-27-2002 '=============================================================================================== 'This agent will loop through the mail boxes on the server and remove dead mail based on a 'specified selection formula I built this selection formula by first creating a view in the 'mail.box database and putting in the specified formula. Once satisfied I moved this formula 'into my script code to use as a search string. You can schedule this agent to run as often 'as you would like and it should automatically keep your mail boxes clean. You will need to 'put it in a normal(.nsf) database and not the mail.box database otherwise the scheduler will 'not recognize it. '===============================================================================================
 Dim s As New NotesSession
 Dim mbox As NotesDatabase
 Dim dc As NotesDocumentCollection
 
 '>>Establish the database list to process
 Redim dbarray(2) As String
 dbarray(0) = "mail1.box"
 dbarray(1) = "mail2.box"
 dbarray(2) = "mail3.box"
 
 '>>If you only have one mail.box then remark the above 4 lines and unremark the next 2 lines
 'Redim dbarray(0) As String
 'dbarray(0) = "mail.box"
 
 '>>Define search fomula
 sstring$ = "SELECT FORM = ""NonDelivery Report"" & @Contains(@UpperCase(FailureReason); " & _
 """USER ACCOUNT INACTIVE"" : ""NO SUCH USER"" : ""NOT LISTED IN PUBLIC"")"
 '>>Loop through all databases and remove documents based on the search formula
 Forall d In dbarray
 '>>This can only run on the same server it is scheduled on therefore use we can only use ""
 Set mbox = s.GetDatabase("", Cstr(d))
 If mbox.isopen Then
 Set dc = mbox.Search(sstring$, Nothing, 0)
 Print "Found " & dc.count & " documents to delete in " & mbox.filename
 Call dc.RemoveAll(True)
 Else
 Print "Unable to open database " & Cstr(d)
 End If
 End Forall
 
End Sub

paste this code in another database and schedule it.

Best of luck
0
 
LVL 4

Author Comment

by:glebn
ID: 10929978
Thanks, Bozzie4 was correct but the code from madheeswar will save me a lot of time!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question