]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lda: Dropped now useless settings from lib-lda/lda-settings.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Thu, 14 Sep 2017 23:46:38 +0000 (01:46 +0200)
committerTimo Sirainen <tss@dovecot.fi>
Wed, 4 Oct 2017 22:07:46 +0000 (01:07 +0300)
These are now in lib-smtp/smtp-submit-settings.

src/lib-lda/lda-settings.c
src/lib-lda/lda-settings.h

index 4743c93ca467804fb5c1687ac18aecf6fa51fcd9..4675fc7dcca456c648960dfd399af4cb15401e1e 100644 (file)
@@ -19,10 +19,7 @@ static bool lda_settings_check(void *_set, pool_t pool, const char **error_r);
        { SET_DEFLIST, name, offsetof(struct lda_settings, field), defines }
 
 static const struct setting_define lda_setting_defines[] = {
-       DEF(SET_STR_VARS, postmaster_address),
        DEF(SET_STR, hostname),
-       DEF(SET_STR_VARS, submission_host),
-       DEF(SET_STR_VARS, sendmail_path),
        DEF(SET_STR, rejection_subject),
        DEF(SET_STR, rejection_reason),
        DEF(SET_STR, deliver_log_format),
@@ -36,10 +33,7 @@ static const struct setting_define lda_setting_defines[] = {
 };
 
 static const struct lda_settings lda_default_settings = {
-       .postmaster_address = "postmaster@%d",
        .hostname = "",
-       .submission_host = "",
-       .sendmail_path = "/usr/sbin/sendmail",
        .rejection_subject = "Rejected: %s",
        .rejection_reason =
                "Your message to <%t> was automatically rejected:%n%r",
@@ -73,22 +67,12 @@ const struct setting_parser_info lda_setting_parser_info = {
        .dependencies = lda_setting_dependencies
 };
 
-static bool lda_settings_check(void *_set, pool_t pool, const char **error_r)
+static bool lda_settings_check(void *_set, pool_t pool,
+       const char **error_r ATTR_UNUSED)
 {
        struct lda_settings *set = _set;
 
        if (*set->hostname == '\0')
                set->hostname = p_strdup(pool, my_hostdomain());
-       if (set->postmaster_address[0] == SETTING_STRVAR_UNEXPANDED[0] &&
-           set->postmaster_address[1] == '\0') {
-               /* check for valid looking fqdn in hostname */
-               if (strchr(set->hostname, '.') == NULL) {
-                       *error_r = "postmaster_address setting not given";
-                       return FALSE;
-               }
-               set->postmaster_address =
-                       p_strconcat(pool, SETTING_STRVAR_UNEXPANDED,
-                                   "postmaster@", set->hostname, NULL);
-       }
        return TRUE;
 }
index 0661678ab74bf9d67c5e2a63f28461747cf9d74e..8b0c20983ca09655e834746f54853f0391ef9c99 100644 (file)
@@ -4,10 +4,7 @@
 struct mail_user_settings;
 
 struct lda_settings {
-       const char *postmaster_address;
        const char *hostname;
-       const char *submission_host;
-       const char *sendmail_path;
        const char *rejection_subject;
        const char *rejection_reason;
        const char *deliver_log_format;