struct smtp_server_cmd_ctx *cmd,
struct smtp_server_cmd_mail *data)
{
+ if (client->user->anonymous && !client->state.anonymous_allowed) {
+ /* NOTE: may need to allow anonymous BURL access in the future,
+ but while that is not supported, deny all anonymous access
+ explicitly. */
+ smtp_server_reply(cmd, 554, "5.7.1",
+ "Access denied (anonymous user)");
+ return -1;
+ }
+
return submission_backend_cmd_mail(client->state.backend, cmd, data);
}
struct smtp_server_cmd_ctx *cmd,
struct submission_recipient *srcpt)
{
+ if (client->user->anonymous && !srcpt->anonymous_allowed) {
+ /* NOTE: may need to allow anonymous BURL access in the future,
+ but while that is not supported, deny all anonymous access
+ explicitly. */
+ smtp_server_recipient_reply(
+ srcpt->rcpt, 554, "5.7.1",
+ "Access denied (anonymous user)");
+ return -1;
+ }
+
return submission_backend_cmd_rcpt(srcpt->backend, cmd, srcpt);
}
struct istream *inputs[2];
string_t *path;
+ if (client->user->anonymous && !client->state.anonymous_allowed) {
+ smtp_server_reply(cmd, 554, "5.7.1",
+ "Access denied (anonymous user)");
+ return -1;
+ }
+
inputs[0] = data_input;
inputs[1] = NULL;
if (ret < 0 || !smtp_server_connection_data_check_state(cmd))
return;
+ if (client->user->anonymous) {
+ smtp_server_reply(cmd, 554, "5.7.1",
+ "Access denied (anonymous user)");
+ return;
+ }
+
burl_cmd = p_new(cmd->pool, struct cmd_burl_context, 1);
burl_cmd->client = client;
burl_cmd->cmd = cmd;
{
struct client *client = conn_ctx;
+ if (client->user->anonymous) {
+ smtp_server_reply(cmd, 550, "5.7.1",
+ "Access denied (anonymous user)");
+ return -1;
+ }
+
return client->v.cmd_vrfy(client, cmd, param);
}