You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Stefan Lecho (JIRA)" <ji...@apache.org> on 2008/09/12 09:05:44 UTC

[jira] Created: (SYNAPSE-446) Multipart/mixed mail message not forwarded to proxy

Multipart/mixed mail message not forwarded to proxy
---------------------------------------------------

                 Key: SYNAPSE-446
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-446
             Project: Synapse
          Issue Type: Bug
            Reporter: Stefan Lecho


https://wso2.org/jira/browse/ESBJAVA-566

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SYNAPSE-446) Multipart/mixed mail message not forwarded to proxy

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631747#action_12631747 ] 

Asankha C. Perera commented on SYNAPSE-446:
-------------------------------------------

Andreas / Stefan

Sorry about the delay in my reply.. 

>Why does the sender give precedence to the transport headers to determine the recipient? I don't know. Note that for the From and CC addresses, it's the other way round: the sender firsts looks at OutTransportInfo. Maybe somebody else knows why this was implemented in this way?

This is because all transport senders gives higher priority to 'transport' headers/properties than the others. So a WS-A SOAP message may have its 'To' address to http://someendpoint while it maybe sent over the mail transport to mailto:someone@somewhere.com

> <syn:header name="To" value="mailto:bank.in@posthouse.com"/ <bank.in@posthouse.com%22/>>*". Theses
settings change however nothing to the result.

Yes, the "header" mediator changes the SOAP header not the transport headers. Use the following instead:

<syn:property name="To" value="addressuwant@somewhere.com" scope="transport"/>



> Multipart/mixed mail message not forwarded to proxy
> ---------------------------------------------------
>
>                 Key: SYNAPSE-446
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-446
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Stefan Lecho
>         Attachments: log.txt
>
>
> https://wso2.org/jira/browse/ESBJAVA-566

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SYNAPSE-446) Multipart/mixed mail message not forwarded to proxy

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631080#action_12631080 ] 

Andreas Veithen commented on SYNAPSE-446:
-----------------------------------------

I think the problem is totally unrelated to the content type of the message. The real explanation can be seen from the following lines in the logs:

MailTransportSender Setting From header to credoc.out@posthouse.com from OutTransportInfo
MailTransportSender Setting To header to credoc.in@posthouse.com from transport headers
MailTransportSender Setting Subject header to 'WSO2ESB - The subject of the mail - without an attachment !' from transport headers

To determine the recipient of the message, MailTransportSender gives precedence to the transport headers and only if there are no transport headers it will check the OutTransportInfo (which contains the address you specify as target of the proxy service). Why does the message context contain transport headers? Because the message initially came in as a mail (BTW, that's why you see a difference between mail and HTTP). Instead of sending the message to bank.in@posthouse.com, the transport sends the message to the original recipient, i.e. credoc.in@posthouse.com.

Why does the sender give precedence to the transport headers to determine the recipient? I don't know. Note that for the From and CC addresses, it's the other way round: the sender firsts looks at OutTransportInfo. Maybe somebody else knows why this was implemented in this way?

As a workaround you can try to clear the transport headers before sending the message out.

> Multipart/mixed mail message not forwarded to proxy
> ---------------------------------------------------
>
>                 Key: SYNAPSE-446
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-446
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Stefan Lecho
>         Attachments: log.txt
>
>
> https://wso2.org/jira/browse/ESBJAVA-566

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SYNAPSE-446) Multipart/mixed mail message not forwarded to proxy

Posted by "Stefan Lecho (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631815#action_12631815 ] 

Stefan Lecho commented on SYNAPSE-446:
--------------------------------------

Adding <syn:property name="To" value="addressuwant@somewhere.com" scope="transport"/>  or <syn:property name="To" action="remove" scope="transport"/>  works both. I prefer the last solution, because in that case the endpoint defined on the target level is used so there is no duplication of mail addresses. 

PS: I've remarked that the properties should be added to the inSequence and not to the outSequence. Is this normal ?


> Multipart/mixed mail message not forwarded to proxy
> ---------------------------------------------------
>
>                 Key: SYNAPSE-446
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-446
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Stefan Lecho
>         Attachments: log.txt
>
>
> https://wso2.org/jira/browse/ESBJAVA-566

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SYNAPSE-446) Multipart/mixed mail message not forwarded to proxy

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630705#action_12630705 ] 

Andreas Veithen commented on SYNAPSE-446:
-----------------------------------------

Can you try to dump the transports headers just before the message is sent out?

> Multipart/mixed mail message not forwarded to proxy
> ---------------------------------------------------
>
>                 Key: SYNAPSE-446
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-446
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Stefan Lecho
>
> https://wso2.org/jira/browse/ESBJAVA-566

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (SYNAPSE-446) Multipart/mixed mail message not forwarded to proxy

Posted by "Stefan Lecho (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Lecho updated SYNAPSE-446:
---------------------------------

    Attachment: log.txt

Attached you'll find an extract from the log file after using the Synapse
snapshot build.

It seems that now the same problem occurs when sending a text-based message,
whereas with the 1.2 releases the problem only occured when sending
XML-based messages. Could this be a regression ?




> Multipart/mixed mail message not forwarded to proxy
> ---------------------------------------------------
>
>                 Key: SYNAPSE-446
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-446
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Stefan Lecho
>         Attachments: log.txt
>
>
> https://wso2.org/jira/browse/ESBJAVA-566

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (SYNAPSE-446) Multipart/mixed mail message not forwarded to proxy

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated SYNAPSE-446:
------------------------------------

    Component/s: Transports

> Multipart/mixed mail message not forwarded to proxy
> ---------------------------------------------------
>
>                 Key: SYNAPSE-446
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-446
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>            Reporter: Stefan Lecho
>         Attachments: log.txt
>
>
> https://wso2.org/jira/browse/ESBJAVA-566

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (SYNAPSE-446) Multipart/mixed mail message not forwarded to proxy

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved SYNAPSE-446.
-------------------------------------

    Resolution: Won't Fix

> Multipart/mixed mail message not forwarded to proxy
> ---------------------------------------------------
>
>                 Key: SYNAPSE-446
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-446
>             Project: Synapse
>          Issue Type: Bug
>          Components: Transports
>            Reporter: Stefan Lecho
>         Attachments: log.txt
>
>
> https://wso2.org/jira/browse/ESBJAVA-566

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SYNAPSE-446) Multipart/mixed mail message not forwarded to proxy

Posted by "Stefan Lecho (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631333#action_12631333 ] 

Stefan Lecho commented on SYNAPSE-446:
--------------------------------------

Based on the 255 and 256 samples, I've defined the following
properties: "*<syn:property
name="Subject" value="Custom Subject for Response"
scope="transport"/><syn:header name="To" value="
mailto:bank.in@posthouse.com"/ <bank.in@posthouse.com%22/>>*". Theses
settings change however nothing to the result.

MailTransportSender keeps on using *credoc.in@posthouse.com *instead of *
bank**.in@posthouse.com <cr...@posthouse.com>* as *To Header* and I have
the impression that the address specified in the endpoint is not used at all.
Could this be clarified ?
*
Log*
* 2008-09-16 12:05:57,805 [192.168.13.175-INFOR2] [Axis2 Task] DEBUG
MailTransportSender Setting From header to credoc.out@posthouse.com from
OutTransportInfo
 2008-09-16 12:05:57,805 [192.168.13.175-INFOR2] [Axis2 Task] DEBUG
MailTransportSender Setting To header to credoc.in@posthouse.com from
transport headers
 2008-09-16 12:05:57,805 [192.168.13.175-INFOR2] [Axis2 Task] DEBUG
MailTransportSender Setting Subject header to 'WSO2ESB - The subject of the
mail - without an attachment !' from transport headers*

*Synapse.xml**<syn:target endpoint="MailTo-Endpoint">
 <syn:inSequence>
  <syn:log level="full" separator=","/>
  <syn:property name="senderAddress" expression="get-property('transport',
'From')"/>
  <syn:log level="full">
   <syn:property name="Sender Address"
expression="get-property('senderAddress')"/>
  </syn:log>
  <spring:spring bean="MailMediatorBean" key="MailMediatorApplicContext"/>
 </syn:inSequence>
 <syn:outSequence>
  <syn:log level="full" separator=","/>
  <syn:property name="Subject" value="Custom Subject for Response"
scope="transport"/>
  <syn:header name="To"
value="mailto:bank.in@posthouse.com"/<bank.in@posthouse.com%22/>
  <syn:log level="full">
   <syn:property name="message" value="Response message"/>
   <syn:property name="Sender Address"
expression="get-property('senderAddress')"/>
  </syn:log>
  <syn:send/>
 </syn:outSequence>
</syn:target>

**Endpoint**
*
*<syn:endpoint name="MailTo-Endpoint">
<syn:address uri="mailto:bank.in@posthouse.com" statistics="enable"/>
</syn:endpoint>*

On Mon, Sep 15, 2008 at 7:43 PM, Andreas Veithen (JIRA) <ji...@apache.org>wrote:



> Multipart/mixed mail message not forwarded to proxy
> ---------------------------------------------------
>
>                 Key: SYNAPSE-446
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-446
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Stefan Lecho
>         Attachments: log.txt
>
>
> https://wso2.org/jira/browse/ESBJAVA-566

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SYNAPSE-446) Multipart/mixed mail message not forwarded to proxy

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630840#action_12630840 ] 

Andreas Veithen commented on SYNAPSE-446:
-----------------------------------------

I added more logging to MailTransportSender. Can you test using the latest source code from trunk and post the logs?

> Multipart/mixed mail message not forwarded to proxy
> ---------------------------------------------------
>
>                 Key: SYNAPSE-446
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-446
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Stefan Lecho
>
> https://wso2.org/jira/browse/ESBJAVA-566

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SYNAPSE-446) Multipart/mixed mail message not forwarded to proxy

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631540#action_12631540 ] 

Andreas Veithen commented on SYNAPSE-446:
-----------------------------------------

Can you try with the following mediator?

<syn:property name="To" action="remove" scope="transport"/>

> Multipart/mixed mail message not forwarded to proxy
> ---------------------------------------------------
>
>                 Key: SYNAPSE-446
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-446
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Stefan Lecho
>         Attachments: log.txt
>
>
> https://wso2.org/jira/browse/ESBJAVA-566

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (SYNAPSE-446) Multipart/mixed mail message not forwarded to proxy

Posted by "Stefan Lecho (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630741#action_12630741 ] 

Stefan Lecho commented on SYNAPSE-446:
--------------------------------------

Tracing for the *javax.mail* and *org.apache.synapse.transport* has been
activated. Is this sufficient to dump the transport headers ?




> Multipart/mixed mail message not forwarded to proxy
> ---------------------------------------------------
>
>                 Key: SYNAPSE-446
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-446
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Stefan Lecho
>
> https://wso2.org/jira/browse/ESBJAVA-566

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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