There is a difference between error handling in LocalDelivery and
RemoteDelivery. LocalDelivery simply sends a copy of the message as if it
were the sender to the error-causing addresses in the Mail.ERROR processor;
the original message is deleted:
if (!errors.isEmpty()) {
//If there were errors, we need to send a message to the sender
// with the details
getMailetContext().sendMail(mail.getSender(),
errors, mail.getMessage(),
Mail.ERROR);
}
//We always consume this message
mail.setState(Mail.GHOST);
So local delivery errors are under the control of the <processor
name="error"> section. RemoteDelivery does things differently. I am not
sure why, although I'll ask on the developer's mailing list to see if I can
get an explanation of what the original thinking was.
--- Noel
-----Original Message-----
From: Ide Roth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 18:23
To: [EMAIL PROTECTED]
Subject: RE: Bounced mail problem
Noel,
Previously when I've the error processor uncomment:
<!-- If you want to notify the postmaster that a message was marked
as spam, uncomment this -->
<mailet match="All" class="NotifyPostmaster">
</mailet>
So when I send a message to an invalid local address or invalid remote
address,
the orginal message goes to the error folder and the bounce message is sent
to the
postmaster.
Right now with the same config.xml.
If I send a message to an invalid local address, the original message goes
to the error folder and the bounce message is sent to the postmaster
as before. But if I send a message to an invalid remote address, the
orginal message does not get put into the error folder; instead the bounced
message is put into the error folder. And then it tried to notify the sender
and failed because the sender is invalid local address. So the message that
goes to the postmaster contain bounced error for the original recipient and
the sender. But this problem does not occur for invalid local recipient
with
an invalid local sender.
For invalid local recipient the message sent out is the same as the message
in the error folder:
****invalid local recipient message send out and put in error folder are
same****
Return-Path: <ide@iroth>
Received: from IROTH ([158.114.2.143])
by IROTH (JAMES SMTP Server 2.0a2) with SMTP ID 129
for <rothxxx@iroth>;
Wed, 4 Sep 2002 17:56:35 -0400
Message-ID: <4283878.1031176595497.JavaMail.iroth@IROTH>
Date: Wed, 4 Sep 2002 17:56:35 -0400 (EDT)
From: ide@iroth
To: rothxxx@iroth
Subject: JavaMail APIs Test
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
This is a message body.
Here's the second line.
**********************************************************************
This is the bounce message for invalid local recipient that got send to
postmaster.
********bounce message send to postmaster for invalid local
recipient*************
Message-ID: <5922857.1031176595648.JavaMail.iroth@IROTH>
Date: Wed, 4 Sep 2002 17:56:35 -0400
From: vkb@iroth
To: vkb@iroth
Subject: Re:JavaMail APIs Test
In-Reply-To: <4283878.1031176595497.JavaMail.iroth@IROTH>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="----=_Part_2_8949356.1031176595628"
------=_Part_2_8949356.1031176595628
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
We were unable to deliver the attached message because of an error in the
mail server.
Message details:
Subject: JavaMail APIs Test
Sent date: Wed Sep 04 17:56:35 EDT 2002
MAIL FROM: ide@iroth
RCPT TO: rothxxx@iroth
From: ide@iroth
To: rothxxx@iroth
Size (in bytes): 48
------=_Part_2_8949356.1031176595628
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
This is a message body.
Here's the second line.
------=_Part_2_8949356.1031176595628--
****************************************************************************
***
—---------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------------------
For invalid remote recipient:
The orginal message that got send out is:
************message send out to invalid remote
recipient***********************************
Return-Path: <ide@iroth>
Received: from IROTH ([158.114.2.143])
by IROTH (JAMES SMTP Server 2.0a2) with SMTP ID 129
for <rothxxx@iroth>;
Wed, 4 Sep 2002 17:56:35 -0400
Message-ID: <4283878.1031176595497.JavaMail.iroth@IROTH>
Date: Wed, 4 Sep 2002 17:56:35 -0400 (EDT)
From: ide@iroth
To: [EMAIL PROTECTED]
Subject: JavaMail APIs Test
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
This is a message body.
Here's the second line.
****************************************************************************
******
The message got put into the error folder:
****message got put into error folder for invalid remote
recipient*****************************
Message-ID: <12533127.1031176565775.JavaMail.iroth@IROTH>
Date: Wed, 4 Sep 2002 17:56:05 -0400
From: vkb@iroth
To: ide@iroth
Subject: Re: JavaMail APIs Test
In-Reply-To: <4283878.1031176500641.JavaMail.iroth@IROTH>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="----=_Part_0_5280753.1031176565685"
------=_Part_0_5280753.1031176565685
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi. This is the James mail server at IROTH.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
[EMAIL PROTECTED]
No route found to dewrqw.ocm
The original message is attached.
------=_Part_0_5280753.1031176565685
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
This is a message body.
Here's the second line.
------=_Part_0_5280753.1031176565685--
****************************************************************************
*******
This is the message that was sent to the postmaster for invalid remote
recipient:
***bounce message for invalid remote
recipient********************************************
Message-ID: <14086434.1031176568158.JavaMail.iroth@IROTH>
Date: Wed, 4 Sep 2002 17:56:08 -0400
From: vkb@iroth
To: vkb@iroth
Subject: Re: JavaMail APIs Test
In-Reply-To: <12533127.1031176565775.JavaMail.iroth@IROTH>
Mime-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_1_12864392.1031176568148"
------=_Part_1_12864392.1031176568148
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
We were unable to deliver the attached message because of an error in the
mail server.
Message details:
Subject: Re: JavaMail APIs Test
Sent date: Wed Sep 04 17:56:05 EDT 2002
MAIL FROM: vkb@iroth
RCPT TO: ide@iroth
From: vkb@iroth
To: ide@iroth
Size (in bytes): 589
------=_Part_1_12864392.1031176568148
Content-Type: multipart/mixed; boundary="----=_Part_0_5280753.1031176565685"
------=_Part_0_5280753.1031176565685
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi. This is the James mail server at IROTH.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
[EMAIL PROTECTED]
No route found to dewrqw.ocm
The original message is attached.
------=_Part_0_5280753.1031176565685
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
This is a message body.
Here's the second line.
------=_Part_0_5280753.1031176565685--
------=_Part_1_12864392.1031176568148--
****************************************************************************
*************
Hope this is not too confusing...
thanks,
Ide
>>> [EMAIL PROTECTED] 09/04/02 05:33PM >>>
Ide,
Perhaps you need to explain more clearly what the problem is. If someone
sends e-mail to an invalid remote address under circumstances where you
permit relaying (e.g., from your local network), and there is an error, then
the message should bounce to the sender, and should also go through the
error processor; at least as I understand it.
You say that it IS getting bounced, and it IS going to the error processor.
So what IS the problem? :-) The bounce should always go to the Return-Path
or Reply-To. Did you previously test by sending from the postmaster's
account?
--- Noel
-----Original Message-----
From: Ide Roth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 16:20
To: [EMAIL PROTECTED]
Subject: RE: Bounced mail problem
I'm not sure this is a hardcoding problem.
Previously I didn't have this problem, the orginal message was being put
into the
error folder and the bounced message was sent to the postmaster. The
problem
started after I started playing with the Redirect mailet. I remove the
Redirect
change from the congfig.xml, but something is still messing up the process.
Ide
>>> [EMAIL PROTECTED] 09/04/02 03:51PM >>>
No, it is hardcoded behavior. If not one beats me to it, I'll try to work
on it sometime within the next few weeks. The behavior isn't "wrong", per
se, but it might be more configurable. Is there a reason you don't want a
bounce message sent?
--- Noel
-----Original Message-----
From: Ide Roth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 15:12
To: [EMAIL PROTECTED]
Subject: RE: Bounced mail problem
Yes the error processor is being invoked. And it seems that the bounce is
happening first.
Is there a way to correct this?
Ide
>>> [EMAIL PROTECTED] 09/04/02 01:29PM >>>
If you check the spoolmanager log, do you see error processor being invoked?
I believe that you should see the message handed off to the error processor,
as well as being bounced. The bounce is likely to happen first, since that
operation is within the RemoteDelivery thread, whereas the error processor
is spooled.
--- Noel
-----Original Message-----
From: Ide Roth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 12:48
To: [EMAIL PROTECTED]
Subject: RE: Bounced mail problem
Change was done to the error processsor.
Ide
>>> [EMAIL PROTECTED] 09/04/02 12:26PM >>>
As I mentioned yesterday, RemoteDelivery.bounce() is currently hardcoded
behavior. In the event of a delivery failure, RemoteDelivery.failMessage()
sets the state to ERROR, and then calls the bounce() method, which will
bounce the e-mail to the originator, using either the Return-Path header or
the Reply-To header. So the sender will be notified of the bounce
regardless.
However, with respect to your postmaster notification, there are separate
processors labeled "error" and "spam" in the default configuration. The
"error" processor mistakenly has comments saying "spam" in it (probably cut
& paste), so I can't tell from your message which one you changed. Did you
change the error processor or the spam processor? Look for the name
attribute on the <processor> tag.
--- Noel
-----Original Message-----
From: Ide Roth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 9:57
To: [EMAIL PROTECTED]
Subject: Bounced mail problem
Hi,
I''ve been having problem with bounced mail. I've tried to send out an
email to a bad address on a remote server. The section
I've uncomment is in the error process:
<!-- If you want to notify the postmaster that a message was marked
as spam, uncomment this -->
<mailet match="All" class="NotifyPostmaster">
</mailet>
So the postmaster(vkb@iroth) is notify of the bounced email.
It seems that the bounced message being put into the error folder and from
there it is trying notify the sender instead of the postmaster.
The orignial message should be in the error folder and from there it should
try to notify the postmaster. Could someone tell me what
I'm doing wrong?
Please Help.
[messages snipped]
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>