Contacted the Domino support team and the Domino head suggested to use Lotus Notes Agent instead. She managed to do a test and demonstrated it. It seems to worked as per what I wanted. Unfortunately, the teaching-one-to-fish-instead-of-feeding-one-with-fish philosophy was used on myself this time. Hence I had to spend extra miles to do research on this to perfecting this auto-reply to make it seems legit.
What I would want to achieve is something like this.
|
fake_email@abc.com
Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 5.1.1 <fake_email@abc.com>... User unknown (state 14).
----- Original message -----
MIME-Version: 1.0
Received: by 10.216.91.17 with SMTP id g17mr1347436wef.1.
27 May 2011 20:18:47 -0700 (PDT)
Received: by 10.216.55.145 with HTTP; Fri, 27 May 2011 20:18:47 -0700 (PDT)
Date: Sat, 28 May 2011 11:18:47 +0800
Message-ID: <BANLkTimrR3ZgANSc76ZFEL1z8x4-
Subject: Test email bounce
From: =?UTF-8?B?Q8+JIFRoYW0=?= <myemail@gmail.com>
To: fake_email@abc.com
Content-Type: multipart/alternative; boundary=
This is a test for email rebounce.
And this was what I have achieved
|
valid_email@testemail.com
Technical details of permanent failure:
We tried to deliver your message, but it was rejected by the recipient
domain. We recommend contacting the other email provider for further
information about the cause of this error. The error that the other
server returned was: 550 550 5.1.1 <valid_email@testemail.com>.
User unknown (state 14).
I think this is quite acceptable, although it wasn't exactly as per a legit bounced email like. As long as the recipient could understood that their email went into an invalid mailbox.
The working code for this in Lotus Script
Sub Initialize Dim session As New NotesSession Dim db As NotesDatabase Set session = New NotesSession Set db = session.CurrentDatabase Set docs = db.UnprocessedDocuments Count = docs.Count REM if we have new mail start processing If docs.Count > 0 Then For n = 1 To docs.Count Set memo = docs.GetNthDocument(n) If Not( memo.SentByAgent ) Then REM if attachemetns were stripped, send a reply Set reply = memo.CreateReplyMessage( False ) reply.From = "Mail Delivery Subsystem" reply.Principal = "daemon@testemail.com" reply.Subject = "Delivery Status Notification (Failure)" reply.Body = "Delivery to the following recipient failed permanently:" & Chr(13) & Chr(10) reply.Body = reply.Body & "" & Chr(13) & Chr(10) reply.Body = reply.Body & " valid_email@testemail.com" & Chr(13) & Chr(10) reply.Body = reply.Body & "" & Chr(13) & Chr(10) reply.Body = reply.Body & "Technical details of permanent failure:" & Chr(13) & Chr(10) reply.Body = reply.Body & "We tried to deliver your message, but it was rejected by the recipient" & Chr(13) & Chr(10) reply.Body = reply.Body & "domain. We recommend contacting the other email provider for further" & Chr(13) & Chr(10) reply.Body = reply.Body & "information about the cause of this error. The error that the other" & Chr(13) & Chr(10) reply.Body = reply.Body & "server returned was: 550 550 5.1.1 <valid_email@testemail.com>..." & Chr(13) & Chr(10) reply.Body = reply.Body & "User unknown (state 14)." Call reply.Send( False ) End If Call session.UpdateProcessedDoc(memo) Next End If End Sub