You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Jeff Keyser <JK...@telocity.com> on 2002/04/04 04:36:27 UTC

Return-Path patch

I apologize for sending this directly to the developer's list, but the bug
database web site isn't working at the moment.  (Or maybe I just can't get
to it from my ISP - I'm not sure which.)

This proposed patch is in response to the repeated bounced e-mail from
lokitech.com yesterday.  The problem was that their James server was
bouncing the e-mail to the sender (the mailing list), and not the address in
the Return-Path header as it was supposed to.  The attached file is intended
to fix that problem.

Re: Return-Path patch

Posted by Serge Knystautas <se...@lokitech.com>.
Thank you very much, and I'm really sorry to everyone for having filled 
inboxes with that crap.  Our Netscape IMAP server crashed and I couldn't 
get it restarted for many hours.  I'll get this patch applied shortly 
and deployed on our server.

Serge Knystautas
Loki Technologies
http://www.lokitech.com/

Jeff Keyser wrote:
> I apologize for sending this directly to the developer's list, but the bug
> database web site isn't working at the moment.  (Or maybe I just can't get
> to it from my ISP - I'm not sure which.)
> 
> This proposed patch is in response to the repeated bounced e-mail from
> lokitech.com yesterday.  The problem was that their James server was
> bouncing the e-mail to the sender (the mailing list), and not the address in
> the Return-Path header as it was supposed to.  The attached file is intended
> to fix that problem.
> 
> 
> ------------------------------------------------------------------------
> 
> Index: src/java/org/apache/james/James.java
> ===================================================================
> RCS file: /home/cvspublic/jakarta-james/src/java/org/apache/james/James.java,v
> retrieving revision 1.19
> diff -u -r1.19 James.java
> --- src/java/org/apache/james/James.java	27 Feb 2002 05:05:53 -0000	1.19
> +++ src/java/org/apache/james/James.java	4 Apr 2002 02:19:23 -0000
> @@ -347,6 +347,11 @@
>          MimeMessage orig = mail.getMessage();
>          //Create the reply message
>          MimeMessage reply = (MimeMessage) orig.reply(false);
> +        //If there is a Return-Path header,
> +        if (orig.getHeader("Return-Path") != null) {
> +            //Return the message to that address, not to the Reply-To address
> +            reply.setRecipient(MimeMessage.RecipientType.TO, new InternetAddress(orig.getHeader("Return-Path")[0]));
> +        }
>          //Create the list of recipients in our MailAddress format
>          Collection recipients = new HashSet();
>          Address addresses[] = reply.getAllRecipients();


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Return-Path patch

Posted by Serge Knystautas <se...@lokitech.com>.
Good point.

We should probably add some Javadocs to the bounce method that it has 
this behavior and also check through any code within James to make sure 
we are using bounce() only when we really want a bounce and not a reply.
-- 
Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/

Jeff Keyser wrote:
> I don't think so.  When replying, you want the message to go to the sender
> or what's in the "Reply-To" header.  However, bounces are not true replies,
> and don't follow the same rules.
> 
> Now if there were a "bounce()" method on Message that did the same thing,
> then yes, this would be a bug. :-)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Return-Path patch

Posted by Jeff Keyser <JK...@telocity.com>.
I don't think so.  When replying, you want the message to go to the sender
or what's in the "Reply-To" header.  However, bounces are not true replies,
and don't follow the same rules.

Now if there were a "bounce()" method on Message that did the same thing,
then yes, this would be a bug. :-)

> -----Original Message-----
> From: Serge Knystautas [mailto:sergek@lokitech.com]
> Sent: Friday, April 05, 2002 12:25 AM
> To: James Developers List
> Subject: Re: Return-Path patch
>
>
> Applied patch.  You know, I'm thinking this is a bug in JavaMail...
> shouldn't the MimeMessage.reply() method take the Return-Path into
> account?  Maybe this is something only a mail server has to
> worry about.
>   Anyway, it's in CVS now.
> --
> Serge Knystautas
> Loki Technologies - Unstoppable Websites
> http://www.lokitech.com/
>
> Jeff Keyser wrote:
> > I apologize for sending this directly to the developer's
> list, but the bug
> > database web site isn't working at the moment.  (Or maybe I
> just can't get
> > to it from my ISP - I'm not sure which.)
> >
> > This proposed patch is in response to the repeated bounced
> e-mail from
> > lokitech.com yesterday.  The problem was that their James server was
> > bouncing the e-mail to the sender (the mailing list), and
> not the address in
> > the Return-Path header as it was supposed to.  The attached
> file is intended
> > to fix that problem.
> >
> >
> >
> --------------------------------------------------------------
> ----------
> >
> > Index: src/java/org/apache/james/James.java
> > ===================================================================
> > RCS file:
> /home/cvspublic/jakarta-james/src/java/org/apache/james/James.java,v
> > retrieving revision 1.19
> > diff -u -r1.19 James.java
> > --- src/java/org/apache/james/James.java	27 Feb 2002
> 05:05:53 -0000	1.19
> > +++ src/java/org/apache/james/James.java	4 Apr 2002
> 02:19:23 -0000
> > @@ -347,6 +347,11 @@
> >          MimeMessage orig = mail.getMessage();
> >          //Create the reply message
> >          MimeMessage reply = (MimeMessage) orig.reply(false);
> > +        //If there is a Return-Path header,
> > +        if (orig.getHeader("Return-Path") != null) {
> > +            //Return the message to that address, not to
> the Reply-To address
> > +
> reply.setRecipient(MimeMessage.RecipientType.TO, new
> InternetAddress(orig.getHeader("Return-Path")[0]));
> > +        }
> >          //Create the list of recipients in our MailAddress format
> >          Collection recipients = new HashSet();
> >          Address addresses[] = reply.getAllRecipients();
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Return-Path patch

Posted by Serge Knystautas <se...@lokitech.com>.
Applied patch.  You know, I'm thinking this is a bug in JavaMail... 
shouldn't the MimeMessage.reply() method take the Return-Path into 
account?  Maybe this is something only a mail server has to worry about. 
  Anyway, it's in CVS now.
-- 
Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/

Jeff Keyser wrote:
> I apologize for sending this directly to the developer's list, but the bug
> database web site isn't working at the moment.  (Or maybe I just can't get
> to it from my ISP - I'm not sure which.)
> 
> This proposed patch is in response to the repeated bounced e-mail from
> lokitech.com yesterday.  The problem was that their James server was
> bouncing the e-mail to the sender (the mailing list), and not the address in
> the Return-Path header as it was supposed to.  The attached file is intended
> to fix that problem.
> 
> 
> ------------------------------------------------------------------------
> 
> Index: src/java/org/apache/james/James.java
> ===================================================================
> RCS file: /home/cvspublic/jakarta-james/src/java/org/apache/james/James.java,v
> retrieving revision 1.19
> diff -u -r1.19 James.java
> --- src/java/org/apache/james/James.java	27 Feb 2002 05:05:53 -0000	1.19
> +++ src/java/org/apache/james/James.java	4 Apr 2002 02:19:23 -0000
> @@ -347,6 +347,11 @@
>          MimeMessage orig = mail.getMessage();
>          //Create the reply message
>          MimeMessage reply = (MimeMessage) orig.reply(false);
> +        //If there is a Return-Path header,
> +        if (orig.getHeader("Return-Path") != null) {
> +            //Return the message to that address, not to the Reply-To address
> +            reply.setRecipient(MimeMessage.RecipientType.TO, new InternetAddress(orig.getHeader("Return-Path")[0]));
> +        }
>          //Create the list of recipients in our MailAddress format
>          Collection recipients = new HashSet();
>          Address addresses[] = reply.getAllRecipients();


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Return-Path patch

Posted by Danny Angus <da...@thought.co.uk>.
This list is the right place for patches to be sent.
:-)

> -----Original Message-----
> From: Jeff Keyser [mailto:JKeyser@telocity.com]
> Sent: 04 April 2002 03:36
> To: James Developers List (E-mail)
> Subject: Return-Path patch
>
>
> I apologize for sending this directly to the developer's list, but the bug
> database web site isn't working at the moment.  (Or maybe I just can't get
> to it from my ISP - I'm not sure which.)
>
> This proposed patch is in response to the repeated bounced e-mail from
> lokitech.com yesterday.  The problem was that their James server was
> bouncing the e-mail to the sender (the mailing list), and not the
> address in
> the Return-Path header as it was supposed to.  The attached file
> is intended
> to fix that problem.
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>