# Support proxying to other LMTP/SMTP servers by performing passdb lookups.
#lmtp_proxy = no
+# When recipient address includes the detail (e.g. user+detail), try to save
+# the mail to the detail mailbox. See also recipient_delimiter and
+# lda_mailbox_autocreate settings.
+#lmtp_save_to_detail_mailbox = no
+
protocol lmtp {
# Space separated list of plugins to load (default is global mail_plugins).
#mail_plugins = $mail_plugins
if (dctx.dest_addr == NULL)
dctx.dest_addr = rcpt->address;
dctx.final_dest_addr = rcpt->address;
- dctx.dest_mailbox_name = *rcpt->detail == '\0' ? "INBOX" : rcpt->detail;
+ dctx.dest_mailbox_name = *rcpt->detail != '\0' &&
+ client->lmtp_set->lmtp_save_to_detail_mailbox ?
+ rcpt->detail : "INBOX";
dctx.save_dest_mail = array_count(&client->state.rcpt_to) > 1 &&
client->state.first_saved_mail == NULL;
static const struct setting_define lmtp_setting_defines[] = {
DEF(SET_BOOL, lmtp_proxy),
+ DEF(SET_BOOL, lmtp_save_to_detail_mailbox),
SETTING_DEFINE_LIST_END
};
static const struct lmtp_settings lmtp_default_settings = {
- .lmtp_proxy = FALSE
+ .lmtp_proxy = FALSE,
+ .lmtp_save_to_detail_mailbox = FALSE
};
static const struct setting_parser_info *lmtp_setting_dependencies[] = {
struct lmtp_settings {
bool lmtp_proxy;
+ bool lmtp_save_to_detail_mailbox;
};
extern const struct setting_parser_info lmtp_setting_parser_info;