From 218598b2291040c40b3440db34fb28bd0d4e6270 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Fri, 16 Oct 2015 17:14:58 +0200 Subject: [PATCH] Postmaster address is configurable: ispmail_postmaster_address --- group_vars/all | 1 + roles/ispmail-dovecot/files/15-lda.conf | 49 -------------------------- roles/ispmail-dovecot/tasks/main.yml | 2 +- roles/ispmail-dovecot/templates/15-lda.conf.j2 | 48 +++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 50 deletions(-) delete mode 100644 roles/ispmail-dovecot/files/15-lda.conf create mode 100644 roles/ispmail-dovecot/templates/15-lda.conf.j2 diff --git a/group_vars/all b/group_vars/all index 05600b2..f94a926 100644 --- a/group_vars/all +++ b/group_vars/all @@ -18,3 +18,4 @@ ispmail_certificate_domains: ispmail_certificate_email: postmaster@example.org ispmail_certificate_days_valid: 3650 +ispmail_postmaster_address: postmaster@example.org diff --git a/roles/ispmail-dovecot/files/15-lda.conf b/roles/ispmail-dovecot/files/15-lda.conf deleted file mode 100644 index 220503a..0000000 --- a/roles/ispmail-dovecot/files/15-lda.conf +++ /dev/null @@ -1,49 +0,0 @@ -## -## LDA specific settings (also used by LMTP) -## - -# Address to use when sending rejection mails. -# Default is postmaster@. %d expands to recipient domain. -#postmaster_address = - -# Hostname to use in various parts of sent mails (e.g. in Message-Id) and -# in LMTP replies. Default is the system's real hostname@domain. -#hostname = - -# If user is over quota, return with temporary failure instead of -# bouncing the mail. -#quota_full_tempfail = no - -# Binary to use for sending mails. -#sendmail_path = /usr/sbin/sendmail - -# If non-empty, send mails via this SMTP host[:port] instead of sendmail. -#submission_host = - -# Subject: header to use for rejection mails. You can use the same variables -# as for rejection_reason below. -#rejection_subject = Rejected: %s - -# Human readable error message for rejection mails. You can use variables: -# %n = CRLF, %r = reason, %s = original subject, %t = recipient -#rejection_reason = Your message to <%t> was automatically rejected:%n%r - -# Delimiter character between local-part and detail in email address. -#recipient_delimiter = + - -# Header where the original recipient address (SMTP's RCPT TO: address) is taken -# from if not available elsewhere. With dovecot-lda -a parameter overrides this. -# A commonly used header for this is X-Original-To. -#lda_original_recipient_header = - -# Should saving a mail to a nonexistent mailbox automatically create it? -#lda_mailbox_autocreate = no - -# Should automatically created mailboxes be also automatically subscribed? -#lda_mailbox_autosubscribe = no - -protocol lda { - # Space separated list of plugins to load (default is global mail_plugins). - mail_plugins = $mail_plugins sieve -} - diff --git a/roles/ispmail-dovecot/tasks/main.yml b/roles/ispmail-dovecot/tasks/main.yml index c518169..42ab2f9 100644 --- a/roles/ispmail-dovecot/tasks/main.yml +++ b/roles/ispmail-dovecot/tasks/main.yml @@ -27,7 +27,7 @@ copy: src=10-ssl.conf dest=/etc/dovecot/conf.d/10-ssl.conf notify: restart dovecot - name: Copying LDA configuration (10-lda.conf - enable sieve plugin) - copy: src=15-lda.conf dest=/etc/dovecot/conf.d/15-lda.conf + template: src=15-lda.conf.j2 dest=/etc/dovecot/conf.d/15-lda.conf notify: restart dovecot - name: Copying SQL access configuration (dovecot-ssql.conf.ext) template: src=dovecot-sql.conf.ext.j2 dest=/etc/dovecot/dovecot-sql.conf.ext diff --git a/roles/ispmail-dovecot/templates/15-lda.conf.j2 b/roles/ispmail-dovecot/templates/15-lda.conf.j2 new file mode 100644 index 0000000..2d7ccc9 --- /dev/null +++ b/roles/ispmail-dovecot/templates/15-lda.conf.j2 @@ -0,0 +1,48 @@ +## +## LDA specific settings (also used by LMTP) +## + +# Address to use when sending rejection mails. +# Default is postmaster@. %d expands to recipient domain. +postmaster_address = {{ispmail_postmaster_address}} + +# Hostname to use in various parts of sent mails (e.g. in Message-Id) and +# in LMTP replies. Default is the system's real hostname@domain. +#hostname = + +# If user is over quota, return with temporary failure instead of +# bouncing the mail. +#quota_full_tempfail = no + +# Binary to use for sending mails. +#sendmail_path = /usr/sbin/sendmail + +# If non-empty, send mails via this SMTP host[:port] instead of sendmail. +#submission_host = + +# Subject: header to use for rejection mails. You can use the same variables +# as for rejection_reason below. +#rejection_subject = Rejected: %s + +# Human readable error message for rejection mails. You can use variables: +# %n = CRLF, %r = reason, %s = original subject, %t = recipient +#rejection_reason = Your message to <%t> was automatically rejected:%n%r + +# Delimiter character between local-part and detail in email address. +#recipient_delimiter = + + +# Header where the original recipient address (SMTP's RCPT TO: address) is taken +# from if not available elsewhere. With dovecot-lda -a parameter overrides this. +# A commonly used header for this is X-Original-To. +#lda_original_recipient_header = + +# Should saving a mail to a nonexistent mailbox automatically create it? +#lda_mailbox_autocreate = no + +# Should automatically created mailboxes be also automatically subscribed? +#lda_mailbox_autosubscribe = no + +protocol lda { + # Space separated list of plugins to load (default is global mail_plugins). + mail_plugins = $mail_plugins sieve +}