[ 
https://issues.apache.org/jira/browse/JAMES-2913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16945601#comment-16945601
 ] 

Benoit Tellier commented on JAMES-2913:
---------------------------------------

https://github.com/linagora/james-project/pull/2744 contributes the integration 
test.

> PerRecipientHeaders are not applied for RemoteDelivery
> ------------------------------------------------------
>
>                 Key: JAMES-2913
>                 URL: https://issues.apache.org/jira/browse/JAMES-2913
>             Project: James Server
>          Issue Type: Bug
>          Components: Remote Delivery, SpoolManager & Processors
>    Affects Versions: 3.4.0
>            Reporter: Benoit Tellier
>            Priority: Major
>              Labels: bug
>
> Jerry Malcolm reported this on the DEV mailing list:
> {code:java}
> I noticed in 3.3 that the SpamAssassin mailet changed to support different 
> spamassassin results per recipient in a multi-recipient email.  I understand 
> MailImpl's PerRecipientHeaders.  And I found MailDispatcher's 
> addSpecificHeadersForRecipient(...) that adds the actual headers.  But it 
> appears that MailDispatcher is outbound only.   The per-recipient 
> spamassassin results are analyzed in IsMarkedAsSpam matcher.  No problems 
> with any of that.
> Here's my issue... I am adding an option for debug purposes to store 
> additional spamassassin output as headers.  I'm simply adding a few more 
> entries in the PerRecipientHeaders object.  But it appears that the 
> PerRecipientHeaders are not being converted to actual headers on inbound 
> mail.  I figure that's reasonable since spamassassin mailet was the only code 
> adding them, and the spam matcher handles it.  But if any other mailets (or 
> in my case, additions to spamassassin mailet) add PerRecipientHeaders, they 
> are lost.
> I know how to convert them to real headers. I can easily make the addition to 
> the code. My concern is that I don't know when they should be added.  This is 
> where it gets muddy for me.  Where in the flow (what class) does an inbound 
> email get split into per-recipient instances?  Obviously, per-recipient 
> headers need to get added 'per recipient/instance' (after the split).
> Can someone tell me the recommended class to add any 'per recipient' headers 
> as real headers to an inbound email?  If my understanding is totally wrong, 
> I'm up for some education as well... 
> {code}
> Clearly, RemoteDelivery should set per-recipient headers before sending the 
> email.
> While making that change, we should be carefull about outbound performance 
> degradation this might incurs: mails that do not have per recipient headers 
> SHOULD still be sent within a single SMTP transaction to avoid useless DATA 
> duplication. (We can assume DATA will always be different for mails having 
> custom headers).
> We need to write an integration test for this within 
> "server/mailet/integration-tests".



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to