You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by "G. Sharon Yang" <ok...@gmail.com> on 2010/05/15 01:10:43 UTC

different return-paths for different emails

Hello, all,
I am stuck in this for more than one day... did lots of search and
still haven't solved the problem. I hope to get help here.

Does James mail server allow manually-set different 'return-path' for
different emails?
for example:
sending email from mailtest to email1, the 'return-path' is set to:
testuser-email1@mydomain.com

sending email from mailtest to email2, the 'return-path' is set to:
testuser-email2@mydomain.com

the same thing for email3....

Those envelops are set in Javamail ( by using mail.smtp.from) . I
checked the logs in in javamail, all in correct values. However, when
I check the actual emails, they all have the same 'return-path', in
this case, testuser-email1@mydomain.com. And the value will be re-set
only if I re-start tomcat server in my java server...

weird.... and trying to figure out why...

More background:
I am trying to implement VERP, as descrbied
here:http://cephas.net/blog/2006/06/09/using-apache-james-and-javamail-to-implement-variable-envelope-return-paths/

I have javamail and other java-related stuff in one server, james
server in another server. The emails were already sent/received
successfully.

Thanks,

Sharon

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: different return-paths for different emails

Posted by Norman Maurer <no...@apache.org>.
Nice to see you have it workin now..

Bye,
Norman


2010/5/17 G. Sharon Yang <ok...@gmail.com>:
> I combined the code from those two links:
> http://cephas.net/blog/2006/06/09/using-apache-james-and-javamail-to-implement-variable-envelope-return-paths/
> http://www.ibm.com/developerworks/java/library/j-james1.html
>
> Here are the core parts:
> String verpFrom = .....
> Properties props = new Properties();
> props.put("mail.smtp.from", verpFrom);
>
> Somehow, I solved the problem by setting a global session object(there
> was a local session object in my original code), just like the session
> object in MailClient.java file in above link.
>
> Hope this helps.
>
> Sharon
>
> On Sun, May 16, 2010 at 10:55 AM, Norman Maurer <no...@apache.org> wrote:
>> Hi Sharon,
>>
>> how you set the return path ? Can you show us the code ?
>>
>> Bye,
>> Norman
>>
>> 2010/5/15 G. Sharon Yang <ok...@gmail.com>:
>>> Hello, all,
>>> I am stuck in this for more than one day... did lots of search and
>>> still haven't solved the problem. I hope to get help here.
>>>
>>> Does James mail server allow manually-set different 'return-path' for
>>> different emails?
>>> for example:
>>> sending email from mailtest to email1, the 'return-path' is set to:
>>> testuser-email1@mydomain.com
>>>
>>> sending email from mailtest to email2, the 'return-path' is set to:
>>> testuser-email2@mydomain.com
>>>
>>> the same thing for email3....
>>>
>>> Those envelops are set in Javamail ( by using mail.smtp.from) . I
>>> checked the logs in in javamail, all in correct values. However, when
>>> I check the actual emails, they all have the same 'return-path', in
>>> this case, testuser-email1@mydomain.com. And the value will be re-set
>>> only if I re-start tomcat server in my java server...
>>>
>>> weird.... and trying to figure out why...
>>>
>>> More background:
>>> I am trying to implement VERP, as descrbied
>>> here:http://cephas.net/blog/2006/06/09/using-apache-james-and-javamail-to-implement-variable-envelope-return-paths/
>>>
>>> I have javamail and other java-related stuff in one server, james
>>> server in another server. The emails were already sent/received
>>> successfully.
>>>
>>> Thanks,
>>>
>>> Sharon
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: different return-paths for different emails

Posted by "G. Sharon Yang" <ok...@gmail.com>.
I combined the code from those two links:
http://cephas.net/blog/2006/06/09/using-apache-james-and-javamail-to-implement-variable-envelope-return-paths/
http://www.ibm.com/developerworks/java/library/j-james1.html

Here are the core parts:
String verpFrom = .....
Properties props = new Properties();
props.put("mail.smtp.from", verpFrom);

Somehow, I solved the problem by setting a global session object(there
was a local session object in my original code), just like the session
object in MailClient.java file in above link.

Hope this helps.

Sharon

On Sun, May 16, 2010 at 10:55 AM, Norman Maurer <no...@apache.org> wrote:
> Hi Sharon,
>
> how you set the return path ? Can you show us the code ?
>
> Bye,
> Norman
>
> 2010/5/15 G. Sharon Yang <ok...@gmail.com>:
>> Hello, all,
>> I am stuck in this for more than one day... did lots of search and
>> still haven't solved the problem. I hope to get help here.
>>
>> Does James mail server allow manually-set different 'return-path' for
>> different emails?
>> for example:
>> sending email from mailtest to email1, the 'return-path' is set to:
>> testuser-email1@mydomain.com
>>
>> sending email from mailtest to email2, the 'return-path' is set to:
>> testuser-email2@mydomain.com
>>
>> the same thing for email3....
>>
>> Those envelops are set in Javamail ( by using mail.smtp.from) . I
>> checked the logs in in javamail, all in correct values. However, when
>> I check the actual emails, they all have the same 'return-path', in
>> this case, testuser-email1@mydomain.com. And the value will be re-set
>> only if I re-start tomcat server in my java server...
>>
>> weird.... and trying to figure out why...
>>
>> More background:
>> I am trying to implement VERP, as descrbied
>> here:http://cephas.net/blog/2006/06/09/using-apache-james-and-javamail-to-implement-variable-envelope-return-paths/
>>
>> I have javamail and other java-related stuff in one server, james
>> server in another server. The emails were already sent/received
>> successfully.
>>
>> Thanks,
>>
>> Sharon
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: different return-paths for different emails

Posted by Norman Maurer <no...@apache.org>.
Hi Sharon,

how you set the return path ? Can you show us the code ?

Bye,
Norman

2010/5/15 G. Sharon Yang <ok...@gmail.com>:
> Hello, all,
> I am stuck in this for more than one day... did lots of search and
> still haven't solved the problem. I hope to get help here.
>
> Does James mail server allow manually-set different 'return-path' for
> different emails?
> for example:
> sending email from mailtest to email1, the 'return-path' is set to:
> testuser-email1@mydomain.com
>
> sending email from mailtest to email2, the 'return-path' is set to:
> testuser-email2@mydomain.com
>
> the same thing for email3....
>
> Those envelops are set in Javamail ( by using mail.smtp.from) . I
> checked the logs in in javamail, all in correct values. However, when
> I check the actual emails, they all have the same 'return-path', in
> this case, testuser-email1@mydomain.com. And the value will be re-set
> only if I re-start tomcat server in my java server...
>
> weird.... and trying to figure out why...
>
> More background:
> I am trying to implement VERP, as descrbied
> here:http://cephas.net/blog/2006/06/09/using-apache-james-and-javamail-to-implement-variable-envelope-return-paths/
>
> I have javamail and other java-related stuff in one server, james
> server in another server. The emails were already sent/received
> successfully.
>
> Thanks,
>
> Sharon
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org