Report "502 Unsupported command" otherwise. Before, it would complain about the
client not being trusted, which is confusing.
attribute-value = xtext
*/
+ if ((conn->set.capabilities & SMTP_CAPABILITY_XCLIENT) == 0) {
+ smtp_server_reply(cmd,
+ 502, "5.5.1", "Unsupported command");
+ return;
+ }
+
/* check transaction state as far as possible */
if (!cmd_xclient_check_state(cmd))
return;
SMTP_CAPABILITY_PIPELINING |
SMTP_CAPABILITY_ENHANCEDSTATUSCODES |
SMTP_CAPABILITY_8BITMIME |
- SMTP_CAPABILITY_CHUNKING;
+ SMTP_CAPABILITY_CHUNKING |
+ SMTP_CAPABILITY_XCLIENT;
if (!conn->ssl && master_service_ssl_is_enabled(master_service))
lmtp_set.capabilities |= SMTP_CAPABILITY_STARTTLS;
lmtp_set.hostname = client->unexpanded_lda_set->hostname;
i_zero(&smtp_set);
smtp_set.capabilities = SMTP_CAPABILITY_SIZE |
- SMTP_CAPABILITY_ENHANCEDSTATUSCODES | SMTP_CAPABILITY_AUTH;
+ SMTP_CAPABILITY_ENHANCEDSTATUSCODES | SMTP_CAPABILITY_AUTH |
+ SMTP_CAPABILITY_XCLIENT;
if (client_is_tls_enabled(client))
smtp_set.capabilities |= SMTP_CAPABILITY_STARTTLS;
smtp_set.hostname = subm_client->set->hostname;