-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Milestone
Description
The LMTP protocol (RFC 2033) differs from ESMTP in only a few ways
- Port used
EHLOcommand replaced withLHLO- One delivery response per recipient
Implementing this protocol would allow cooperation with a wide range of other software.
This could be done in cmail-smtpd by
- Allowing the
LHLOcommand in the state machine and setting the proper protocol inclient_data->current_mail.protocol-> https://github.com/cmail-mta/cmail/blob/master/cmail-smtpd/smtpstatemachine.c#L5 - Responding with one recipient state for each handled recipient (this might require modifications of core handling) -> https://github.com/cmail-mta/cmail/blob/master/cmail-smtpd/smtpstatemachine.c#L557 and call tree
- Optionally, if allowing LMTP on all ports (as the current implementation handles SMTP/ESMTP) is not desirable
- Extending the listener structure with a field indicating supported protocols -> https://github.com/cmail-mta/cmail/blob/master/cmail-smtpd/smtpd.h#L83
- Extending the configuration parser to force a port to specific protocols -> https://github.com/cmail-mta/cmail/blob/master/cmail-smtpd/config.c#L33
- Enforcing that choice in the state machine (by rejecting commands not allowed for the forced protocol) -> https://github.com/cmail-mta/cmail/blob/master/cmail-smtpd/smtpd.h#L97