Skip to content

Commit

Permalink
lib-lda: Dropped now useless settings from lib-lda/lda-settings.
Browse files Browse the repository at this point in the history
These are now in lib-smtp/smtp-submit-settings.
  • Loading branch information
stephanbosch authored and Timo Sirainen committed Oct 4, 2017
1 parent 1519df1 commit ebd21ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
20 changes: 2 additions & 18 deletions src/lib-lda/lda-settings.c
Expand Up @@ -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),
Expand All @@ -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",
Expand Down Expand Up @@ -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;
}
3 changes: 0 additions & 3 deletions src/lib-lda/lda-settings.h
Expand Up @@ -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;
Expand Down

0 comments on commit ebd21ab

Please sign in to comment.