]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
submission: Drop unused anonymous_allowed fields
authorMarco Bettini <marco.bettini@open-xchange.com>
Fri, 19 May 2023 08:42:39 +0000 (08:42 +0000)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 31 May 2023 09:54:07 +0000 (09:54 +0000)
src/submission/submission-client.c
src/submission/submission-client.h
src/submission/submission-commands.c
src/submission/submission-recipient.h

index 397d05d26e06d151b83b18d695da629a992278b4..20cf39b753febdaf491098d13f4c6f60dd0a5eab 100644 (file)
@@ -261,7 +261,7 @@ client_create(int fd_in, int fd_out, struct event *event,
        if (hook_client_created != NULL)
                hook_client_created(&client);
 
-       if (user->anonymous && !client->anonymous_allowed) {
+       if (user->anonymous) {
                smtp_server_connection_abort(
                        &client->conn, 534, "5.7.9",
                        "Anonymous login is not allowed for submission");
index 74b6058b39fca64e000d9de7e39cf164de8504f8..a4f4ff5fb011ba26b1d2f47eb86c3a8659c08edc 100644 (file)
@@ -19,8 +19,6 @@ struct client_state {
        struct submission_backend *backend;
        struct istream *data_input;
        uoff_t data_size;
-
-       bool anonymous_allowed:1;
 };
 
 struct client_extra_capability {
@@ -118,7 +116,6 @@ struct client {
        bool destroyed:1;
        bool anvil_sent:1;
        bool backend_capabilities_configured:1;
-       bool anonymous_allowed:1;
 };
 
 struct submission_module_register {
index 6593f8544227f46c6604b507822434d20eaf96e3..517c716d35305e4a84ebf11cb625d41c0c584f4d 100644 (file)
@@ -138,7 +138,7 @@ int client_default_cmd_mail(struct client *client,
                            struct smtp_server_cmd_ctx *cmd,
                            struct smtp_server_cmd_mail *data)
 {
-       if (client->user->anonymous && !client->state.anonymous_allowed) {
+       if (client->user->anonymous) {
                /* NOTE: may need to allow anonymous BURL access in the future,
                   but while that is not supported, deny all anonymous access
                   explicitly. */
@@ -169,7 +169,7 @@ int client_default_cmd_rcpt(struct client *client ATTR_UNUSED,
                            struct smtp_server_cmd_ctx *cmd,
                            struct submission_recipient *srcpt)
 {
-       if (client->user->anonymous && !srcpt->anonymous_allowed) {
+       if (client->user->anonymous) {
                /* NOTE: may need to allow anonymous BURL access in the future,
                   but while that is not supported, deny all anonymous access
                   explicitly. */
@@ -275,7 +275,7 @@ int cmd_data_begin(void *conn_ctx,
        struct istream *inputs[2];
        string_t *path;
 
-       if (client->user->anonymous && !client->state.anonymous_allowed) {
+       if (client->user->anonymous) {
                smtp_server_reply(cmd, 554, "5.7.1",
                                  "Access denied (anonymous user)");
                return -1;
index d80046f0e50b06144c3f24b2a0768c948912757e..6af7d044b230d2150a0eb18eec0cdd4421d84392 100644 (file)
@@ -12,8 +12,6 @@ struct submission_recipient {
 
        /* Module-specific contexts. */
        ARRAY(union submission_recipient_module_context *) module_contexts;
-
-       bool anonymous_allowed:1;
 };
 
 struct submission_recipient_module_register {