Context
Two problems seen in production when an organizer sends an event invitation to an external attendee (e.g. herve.grandjean@canut.org):
- No trace of the invitation in Twake Mail "Sent" folder, even though the calendar back-end did dispatch the invitation.
- The external attendee never received the mail and the organizer has no feedback about the failure.
1. Invitations bypass the organizer's Sent folder — by design, but very confusing
calendar-smtp/src/main/java/com/linagora/calendar/smtp/MailSender.java:142 delivers via a system SMTP relay account (auth from smtp.username / smtp.password — see MailSenderConfiguration.java:43-59). No JMAP submission on behalf of the organizer, no reference to "sent mailbox" / "outbox" / JMAP anywhere in calendar-smtp or calendar-scheduling.
Consequence: invitations never appear in the organizer's Twake Mail Sent folder. The organizer can't verify the mail was actually queued for delivery, can't reply-thread from Sent, can't audit their outgoing scheduling traffic.
Two acceptable outcomes:
- (preferred) send via the user's JMAP submission so the mail lands in Sent — the invitation is technically the organizer's outbound mail.
- (minimum) clearly state in the UI/help that calendar invites go via a system relay, and add a "delivery log" visible to the organizer.
2. External delivery failed silently
Pipeline observed in code:
esn-sabre AMQPSchedulePlugin → exchange calendar:itip:localDelivery
→ ItipLocalDeliveryConsumer.java:82 (splits N-recipient message into N single-recipient messages)
→ ItipEmailNotificationPublisher.java:85 → exchange calendar:event:notificationEmail:send
→ EventEmailConsumer.java:76 (routes by iCalendar METHOD)
→ EventMailHandler.handInviteEvent() (EventMailHandler.java:409)
→ MailSender.send() (MailSender.java:142)
Any failure at any hop lands in a dead-letter queue (tcalendar:itip:localDelivery:dead-letter, tcalendar:event:notificationEmail:send:dead-letter) with zero user-facing visibility.
Expected
- Either integrate JMAP submission so invitations land in the organizer's Sent folder, or provide an explicit in-app notification when calendar mail delivery fails (bounce, SMTP relay rejection, dead-letter).
- Document the current SMTP relay architecture so support can troubleshoot: which config keys must be set, which queues to check, which logs to grep.
Steps to reproduce
- Organizer with a Twake Mail account creates an event and adds one internal + one external attendee.
- Check Twake Mail Sent folder → invitation is not there. (Bug 1)
- If the external attendee never receives the invite, look at the DLQs on the RabbitMQ instance to see if the message was dropped, and the SMTP relay logs to see if delivery was rejected. (Bug 2)
Files
calendar-smtp/src/main/java/com/linagora/calendar/smtp/MailSender.java:142
calendar-smtp/src/main/java/com/linagora/calendar/smtp/MailSenderConfiguration.java:43-59
calendar-amqp/src/main/java/com/linagora/calendar/amqp/ItipLocalDeliveryConsumer.java:82
calendar-amqp/src/main/java/com/linagora/calendar/amqp/ItipEmailNotificationPublisher.java:85
calendar-amqp/src/main/java/com/linagora/calendar/amqp/EventEmailConsumer.java:76
calendar-amqp/src/main/java/com/linagora/calendar/amqp/EventMailHandler.java:409
Reported from production feedback on Twake Calendar, downstream of Benjamin's forwarding.
Context
Two problems seen in production when an organizer sends an event invitation to an external attendee (e.g.
herve.grandjean@canut.org):1. Invitations bypass the organizer's Sent folder — by design, but very confusing
calendar-smtp/src/main/java/com/linagora/calendar/smtp/MailSender.java:142delivers via a system SMTP relay account (auth fromsmtp.username/smtp.password— seeMailSenderConfiguration.java:43-59). No JMAP submission on behalf of the organizer, no reference to "sent mailbox" / "outbox" / JMAP anywhere incalendar-smtporcalendar-scheduling.Consequence: invitations never appear in the organizer's Twake Mail Sent folder. The organizer can't verify the mail was actually queued for delivery, can't reply-thread from Sent, can't audit their outgoing scheduling traffic.
Two acceptable outcomes:
2. External delivery failed silently
Pipeline observed in code:
esn-sabre AMQPSchedulePlugin→ exchangecalendar:itip:localDelivery→
ItipLocalDeliveryConsumer.java:82(splits N-recipient message into N single-recipient messages)→
ItipEmailNotificationPublisher.java:85→ exchangecalendar:event:notificationEmail:send→
EventEmailConsumer.java:76(routes by iCalendar METHOD)→
EventMailHandler.handInviteEvent()(EventMailHandler.java:409)→
MailSender.send()(MailSender.java:142)Any failure at any hop lands in a dead-letter queue (
tcalendar:itip:localDelivery:dead-letter,tcalendar:event:notificationEmail:send:dead-letter) with zero user-facing visibility.Expected
Steps to reproduce
Files
calendar-smtp/src/main/java/com/linagora/calendar/smtp/MailSender.java:142calendar-smtp/src/main/java/com/linagora/calendar/smtp/MailSenderConfiguration.java:43-59calendar-amqp/src/main/java/com/linagora/calendar/amqp/ItipLocalDeliveryConsumer.java:82calendar-amqp/src/main/java/com/linagora/calendar/amqp/ItipEmailNotificationPublisher.java:85calendar-amqp/src/main/java/com/linagora/calendar/amqp/EventEmailConsumer.java:76calendar-amqp/src/main/java/com/linagora/calendar/amqp/EventMailHandler.java:409Reported from production feedback on Twake Calendar, downstream of Benjamin's forwarding.