james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gautier DI FOLCO (JIRA)" <server-...@james.apache.org>
Subject [jira] [Created] (JAMES-2745) When a mail has multiple recipients, the mail is stored multiple time
Date Tue, 23 Apr 2019 11:34:00 GMT
Gautier DI FOLCO created JAMES-2745:
---------------------------------------

             Summary: When a mail has multiple recipients, the mail is stored multiple time
                 Key: JAMES-2745
                 URL: https://issues.apache.org/jira/browse/JAMES-2745
             Project: James Server
          Issue Type: Bug
            Reporter: Gautier DI FOLCO


When a mail has multiple recipients, the mail is stored multiple time.

[https://github.com/apache/james-project/blob/master/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/delivery/MailDispatcher.java#L133]
{code:java}
for (MailAddress recipient : mail.getRecipients()) {
  try {
    Map<String, List<String>> savedHeaders = saveHeaders(mail, recipient);
    addSpecificHeadersForRecipient(mail, message, recipient);
    mailStore.storeMail(recipient, mail);
    restoreHeaders(mail.getMessage(), savedHeaders);
  } catch (Exception ex) {
    LOGGER.error("Error while storing mail.", ex);
    errors.add(recipient);
  }
}
{code}
It causes slowness, especially with slow blob store (ie. OpenStack's Swift)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message