You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Saminda Abeyruwan <sa...@gmail.com> on 2007/12/05 10:24:32 UTC

Improvement to mail transport from a Synapse use case

Hi All,

There is a on going mail thread [1] in Synapse dev list on improvements to
Mail transport. According to the thread, they would look for

(1). Changing the subject
(2). Allow CC and BCC

(1). Is an trivial case, where a parameter or property could change the
subject.

(2). Allowing CC or BCC is complex, as it is tightly coupled with the MEP.
     -  Simple solution would be to introduce a parameter or property to
include CC or BCC list and simply exclude them from the MEP semantics. Thus,
it would be same as broadcasting to a set of users.
     - If MEP is introduced to CC or BCC, we could expect some complex
message exchange patterns. Would it be feasible or scalable to integrate CC
or BCC to a MEP.

Your comments on prior will be highly appreciated.

Thank you

Saminda


-- 


Resources:

[1].
http://mail-archives.apache.org/mod_mbox/ws-synapse-dev/200712.mbox/browser
Saminda Abeyruwan

Senior Software Engineer
WSO2 Inc. - www.wso2.org

Re: Improvement to mail transport from a Synapse use case

Posted by Ruwan Linton <ru...@gmail.com>.
Hi Saminda,

On Dec 5, 2007 2:54 PM, Saminda Abeyruwan <sa...@gmail.com> wrote:

>
> Hi All,
>
> There is a on going mail thread [1] in Synapse dev list on improvements to
> Mail transport. According to the thread, they would look for
>
> (1). Changing the subject
> (2). Allow CC and BCC
>
> (1). Is an trivial case, where a parameter or property could change the
> subject.


It would be nice if we can set a property on to the message context and
change the subject. This will allow runtime change of the mail subject. (if
this is possible)


> (2). Allowing CC or BCC is complex, as it is tightly coupled with the MEP.
>
>      -  Simple solution would be to introduce a parameter or property to
> include CC or BCC list and simply exclude them from the MEP semantics. Thus,
> it would be same as broadcasting to a set of users.
>      - If MEP is introduced to CC or BCC, we could expect some complex
> message exchange patterns. Would it be feasible or scalable to integrate CC
> or BCC to a MEP.


Again I prefer a MC property, if possible.

I think you missed one more thing which is the requirement of sending the
soap message as the email body content rather than as an attachment.

Thanks,
Ruwan

-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

Re: Improvement to mail transport from a Synapse use case

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
David Illsley wrote:
> Tough on who? AFAIK the first response will be processed by Axis2
> regardless of which original recipient received it.

Yes. Its user error for messing it up ..

Basically, I don't think we should be limiting the ability for someone to 
use the underlying transport fully. The alternative is that Synapse will 
write their own version of mail-send which will allow a Cc .. that makes 
no sense at all to me.

> Yuk, surely if a mediation does that it has some responsibility for
> aggregating the responses? Also this sounds like a case where
> Notification/Eventing might be most appropriate?

Even Eventing doesn't solve this problem - if I get a message I have to 
know whether I'm going to reply or not .. whether it was delivered via 
eventing or not doesn't make a difference.

> Yes, but in user e-mail there's some expectation that the user looks
> at how they were addressed to, perhaps because of the message content.
> We don't (AFAIK) have any notion of that in SOAP/email, or do we?

No, there isn't ... agreed. However, its again up to the people setting 
this up to make sure that wrong stuff doesn't happen.

Example: Lots of people have bots sign up to mailing lists (for archiving, 
for spammers to easily gather data etc. etc.). Obviously they receive all 
the mail but they never reply. If they reply (and then reply to the reply 
etc.) a loop will occur. Has happened before .. I used to run email for 
Sri Lanka and back in those days (early 90s) it was common for badly 
configured mail servers to start bouncing bounces and keep doing that. I 
used to have to manually notice this and fix it. Mail software is smarter now.

> Of course we could add a none ReplyTo to the copies which would have
> the desired effect, but if we do that, it really calls for multiple
> messages to be sent at the ServiceClient level rather than relying on
> smtp cc, bcc.

Yeah that's an option but that's a different thing. I think the underlying 
principle at question is whether a transport impl should restrict any of 
the properties of the transport .. my opinion is basically that we should 
not. Obviously we should configure it correctly for the default config, 
but if an advanced user wants to set a bcc or whatever, we shouldn't get 
in the way.

Sanjiva.
-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Improvement to mail transport from a Synapse use case

Posted by Saminda Abeyruwan <sa...@gmail.com>.
>
> Yes, but in user e-mail there's some expectation that the user looks
> at how they were addressed to, perhaps because of the message content.
> We don't (AFAIK) have any notion of that in SOAP/email, or do we?
>
> Of course we could add a none ReplyTo to the copies which would have
> the desired effect, but if we do that, it really calls for multiple
> messages to be sent at the ServiceClient level rather than relying on
> smtp cc, bcc.
>

When addressing is enabled, with ServiceClient, it has to set "TO" address.
Thus, at transport level, sender will receive the envelop with wsa:TO set to
prior address. If CC or BCC used, wsa:TO of copies should be changed
accordingly. I'm not sure whether one could change the payload according to
CC or BCC using JavaMail without any high level intervention.

Other possible solution would be to filter CCs and BCCs to individual
addresses and send them to endpoints as "wsa:TO" with none ReplyTo address.
This would require some processing at transport level.

Thank you

Saminda



-- 
Saminda Abeyruwan

Senior Software Engineer
WSO2 Inc. - www.wso2.org

Re: Improvement to mail transport from a Synapse use case

Posted by David Illsley <da...@gmail.com>.
An interesting discussion, some thoughts below...

On Dec 16, 2007 5:54 AM, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> Saminda Abeyruwan wrote:
> >
> > (2). Allowing CC or BCC is complex, as it is tightly coupled with the MEP.
> >      -  Simple solution would be to introduce a parameter or property to
> > include CC or BCC list and simply exclude them from the MEP semantics.
> > Thus, it would be same as broadcasting to a set of users.
> >      - If MEP is introduced to CC or BCC, we could expect some complex
> > message exchange patterns. Would it be feasible or scalable to integrate
> > CC or BCC to a MEP.
>
> You're over-reacting to what having Cc or Bcc means. Those are simply what
> the message sender wants to do - they have nothing to do with the MEP.
> There's no assumption of them replying - if they do, well, tough.

Tough on who? AFAIK the first response will be processed by Axis2
regardless of which original recipient received it.

>
> That's not a new problem- if u take ANY message with WS-Addr headers and
> send it to multiple places (like what the split mediator does in Synapse)
> then you could have that problem.

Yuk, surely if a mediation does that it has some responsibility for
aggregating the responses? Also this sounds like a case where
Notification/Eventing might be most appropriate?

>
> We just need to enable the user to set these properties and understand the
> expected behavior of those receiving copies of messages. That's not unlike
> in email .. if you bcc someone and they reply, then ouch.

Yes, but in user e-mail there's some expectation that the user looks
at how they were addressed to, perhaps because of the message content.
We don't (AFAIK) have any notion of that in SOAP/email, or do we?

Of course we could add a none ReplyTo to the copies which would have
the desired effect, but if we do that, it really calls for multiple
messages to be sent at the ServiceClient level rather than relying on
smtp cc, bcc.

David
-- 
David Illsley - IBM Web Services Development

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Improvement to mail transport from a Synapse use case

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
Saminda Abeyruwan wrote:
> 
> (2). Allowing CC or BCC is complex, as it is tightly coupled with the MEP.
>      -  Simple solution would be to introduce a parameter or property to 
> include CC or BCC list and simply exclude them from the MEP semantics. 
> Thus, it would be same as broadcasting to a set of users.
>      - If MEP is introduced to CC or BCC, we could expect some complex 
> message exchange patterns. Would it be feasible or scalable to integrate 
> CC or BCC to a MEP.

You're over-reacting to what having Cc or Bcc means. Those are simply what 
the message sender wants to do - they have nothing to do with the MEP. 
There's no assumption of them replying - if they do, well, tough.

That's not a new problem- if u take ANY message with WS-Addr headers and 
send it to multiple places (like what the split mediator does in Synapse) 
then you could have that problem.

We just need to enable the user to set these properties and understand the 
expected behavior of those receiving copies of messages. That's not unlike 
in email .. if you bcc someone and they reply, then ouch.

Sanjiva.
-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Improvement to mail transport from a Synapse use case

Posted by Amila Suriarachchi <am...@gmail.com>.
On Dec 5, 2007 2:54 PM, Saminda Abeyruwan <sa...@gmail.com> wrote:

>
> Hi All,
>
> There is a on going mail thread [1] in Synapse dev list on improvements to
> Mail transport. According to the thread, they would look for
>
> (1). Changing the subject
> (2). Allow CC and BCC
>
> (1). Is an trivial case, where a parameter or property could change the
> subject.
>
> (2). Allowing CC or BCC is complex, as it is tightly coupled with the MEP.
>
>      -  Simple solution would be to introduce a parameter or property to
> include CC or BCC list and simply exclude them from the MEP semantics. Thus,
> it would be same as broadcasting to a set of users.
>      - If MEP is introduced to CC or BCC, we could expect some complex
> message exchange patterns. Would it be feasible or scalable to integrate CC
> or BCC to a MEP.


hi saminda,

I think we have to  clarify the requirement bit more.
The first question is are CC, and BCC adresses web service endpoints?  or
are they normal mail endpoint s which does not send any replay.

if it is the latter case, I think the question you have mentioned(MEP
handling problem) is not going to happen.
since they don't send any replay and only replay we expect from the To EPR
address.

But if it is the former case as I guess we have to handle it at the service
client level. i.e we have to send seperate mail requests for each and every
CC and BCC address.
Just think about the senario where this service use the Addressing. In this
case Addressing handler have to set the "To" header correctly to send it to
the CC and BCC addresses as well.
Further in any case this service can only be an inonly service. otherwise
every recipient will send responses and there is no logic to merge them.

Thanks,
Amila.

>
>
> Your comments on prior will be highly appreciated.
>
> Thank you
>
> Saminda
>
>
> --
>
>
> Resources:
>
> [1]. http://mail-archives.apache.org/mod_mbox/ws-synapse-dev/200712.mbox/browser
>
> Saminda Abeyruwan
>
> Senior Software Engineer
> WSO2 Inc. - www.wso2.org




-- 
Amila Suriarachchi,
WSO2 Inc.