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

Rashid Mahmood commented on JAMES-322:
--------------------------------------

{noformat}
            <mailet match="RecipientIsLocal" class="LocalDelivery">
               <consume>false</consume>
               <passThrough>true</passThrough>            
            </mailet>
            <mailet match="RecipientIsLocal" 
class="com.test.mailserver.mailets.DSNNotifySuccess">
               <messageString>Your message (id [id]) was successfully 
delivered.</messageString>
               <subject>Delivery Notification (success)</subject>
               <passThrough>false</passThrough>
               <debug>true</debug>
           </mailet>
{noformat}
i made above configuration, but unable to figure out when a problem occurred 
during local storage, how my custom mailet know for which recepients error 
occurred? To my custom mailet service() method original email is passed as 
parameter. MailDispatcher is sending a new email to Sender with Error Recepients
{code:java}
 public void dispatch(Mail mail) throws MessagingException {
        List<MailAddress> errors =  customizeHeadersAndDeliver(mail);
        if (!errors.isEmpty()) {
            // If there were errors, we redirect the email to the ERROR
            // processor.
            // In order for this server to meet the requirements of the SMTP
            // specification, mails on the ERROR processor must be returned to
            // the sender. Note that this email doesn't include any details
            // regarding the details of the failure(s).
            // In the future we may wish to address this.
            Mail newMail = MailImpl.builder()
                .sender(mail.getMaybeSender())
                .recipients(errors)
                .mimeMessage(mail.getMessage())
                .state(Mail.ERROR)
                .build();
            mailetContext.sendMail(newMail);
        }
        if (consume) {
            // Consume this message
            mail.setState(Mail.GHOST);
        }
    }
{code}
Also how can i get Original-Envelope-ID as per rfc3461?

> please support  Delivery Status Notifcations as per rfc3461
> -----------------------------------------------------------
>
>                 Key: JAMES-322
>                 URL: https://issues.apache.org/jira/browse/JAMES-322
>             Project: James Server
>          Issue Type: New Feature
>          Components: SMTPServer
>    Affects Versions: 2.2.0, 2.3.0
>         Environment: any
>            Reporter: Ralf Hauser
>            Assignee: Stefano Bagnara
>            Priority: Major
>             Fix For: Trunk
>
>
> http://www.ietf.org/rfc/rfc3461.txt



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to