Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ parse_conf(const char *config_path)
config.authpath= data;
else if (strcmp(word, "CERTFILE") == 0 && data != NULL)
config.certfile = data;
else if (strcmp(word, "LMTP") == 0 && data == NULL)
config.features |= LMTP;
else if (strcmp(word, "MAILNAME") == 0 && data != NULL)
config.mailname = data;
else if (strcmp(word, "MASQUERADE") == 0 && data != NULL) {
Expand Down Expand Up @@ -259,5 +261,10 @@ parse_conf(const char *config_path)
/* NOTREACHED */
}

if ((config.features & LMTP) && (config.features & (TLS_OPP | STARTTLS | SECURETRANSFER))) {
errlogx(EX_CONFIG, "%s: LMTP does not support TLS", config_path);
/* NOTREACHED */
}

fclose(conf);
}
1 change: 1 addition & 0 deletions dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
#define TLS_OPP 0x080 /* Opportunistic STARTTLS */
#define NULLCLIENT 0x100 /* Nullclient support */
#define VERIFYCERT 0x200 /* Verify remote host's certificate against CA */
#define LMTP 0x400 /* Use LMTP instead of SMTP with the relay */

#ifndef CONF_PATH
#error Please define CONF_PATH
Expand Down
2 changes: 1 addition & 1 deletion net.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ int perform_server_greeting(int fd, struct smtp_features* features) {
Send EHLO
XXX allow HELO fallback
*/
send_remote_command(fd, "EHLO %s", hostname());
send_remote_command(fd, "%s %s", config.features & LMTP ? "LHLO" : "EHLO", hostname());

char buffer[EHLO_RESPONSE_SIZE];
memset(buffer, 0, sizeof(buffer));
Expand Down