Knowledge base

Inspect and answer an incoming SMTP connection verified

Seven functions on an incoming connection: its socket, whether it is encrypted, whether it is authenticated — and the ability to decide that last one.

In detail

MQ_setAuthenticated is the significant one: a plugin can declare a connection authenticated, which is the hook for authenticating senders against something the engine does not know about — a customer database, an LDAP directory, a token service. MQ_send writes directly to the connection, so a plugin can answer an SMTP command itself. Taken together with the per-connection data slots, this is a small SMTP server extension point rather than a filter. It is also the part of the interface with security consequences: a plugin here decides who may submit mail through the node. Any node running one needs that plugin reviewed with the same care as smtp-auth itself.