View Issue Details

IDProjectCategoryView StatusLast Update
0003945Composrcorepublic2019-11-14 21:35
ReporterChris GrahamAssigned To 
Status non-assignedResolutionopen 
Product Version 
Fixed in Version 
Summary0003945: Option to bypass SMTP relay server
DescriptionE-mail is implemented in a complicated way, more complicated and error prone than it needs to be for our situation.

A mail client connects to an SMTP relay server (smarthost), and the message goes into that server's queue - and that server then connects to the recipient's SMTP server (or another relay, in a chain). That recipient server then puts it into a mailbox, which is typically accessed via webmail/POP3/IMAP.

The reasons for the SMTP relay server are:
1) The recipient's SMTP server may be down, so it may need to go through a re-try/back-off algorithm.
2) The relay server implements a queue, levelling out load.
3) The mail client may be running on a residential connection, via an ISP that has to block direct use of SMTP (anything but a smarthost) to avoid their networks getting banned for spam-abuse.

Half this complexity is unnecessary for Composr:
1/2) We already have a mail queue, so effectively we are X% of an SMTP server already (we need to have a queue as we cannot rely on our own SMTP relay being active or having low latency to send through it; ideally every web server would have it's own smarthost that relayed to the next smarthost, but that is not always the case due to configuration complexity).
3) Composr is likely not running on a residential connection.

Yet, the complexity of using an SMTP relay means that:
a) Said relay needs to be configured. Even if we have a local smarthost that relays to the next smarthost, that needs to be configured.
b) Said relay's configuration may break down, and it is hard to know because Health Check emails won't get sent if SMTP is down. I am working with a client right now where regularly the SMTP password is changed and the Composr config needs to be matched to it.

I would therefore propose a few improvements to Composr...
a) If an e-mail won't send, make sure it is always (re-)queued. Currently I think it depends on context, an e-mail coded to bypass-queue will fail without ever going into the queue.
b) Allow the SMTP configuration to be enabled, but with no configured relay. In this situation Composr will work as its own outgoing SMTP server, providing direct delivery.
c) Implement a back-off algorithm into the mail queue.
d) Implement SMTP message logging into the mail queue, and ability to view this in the Composr mail queue UI. i.e. Each queue item would get its own little embedded log file.
e) Implement the ability to filter within the Composr mail queue UI, e.g. to mails that have had problems sending. Then an admin can choose to bulk-delete.
f) If an SMTP auth to a configured relay server is failing, or PHP's mail command is failing, automatically fall back to direct sending.
TagsPseudo-addon: E-mail log
Attach Tags
Time estimation (hours)16
Sponsorship open


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-11-07 20:10 Chris Graham New Issue
2019-11-07 20:11 Chris Graham Tag Attached: Pseudo-addon: E-mail log
2019-11-07 20:11 Chris Graham Tag Attached: ocProducts client-work (likely)
2019-11-14 21:35 Chris Graham Tag Detached: ocProducts client-work (likely)