Sfoglia il codice sorgente

Switched from LDA to LMTP

merge-requests/1/merge
Christoph Haas 10 anni fa
parent
commit
a27528f197
6 ha cambiato i file con 34 aggiunte e 63 eliminazioni
  1. +9
    -7
      roles/ispmail-dovecot/files/10-master.conf
  2. +20
    -0
      roles/ispmail-dovecot/files/20-lmtp.conf
  3. +2
    -2
      roles/ispmail-dovecot/tasks/main.yml
  4. +0
    -48
      roles/ispmail-dovecot/templates/15-lda.conf.j2
  5. +1
    -0
      roles/ispmail-packages/tasks/main.yml
  6. +2
    -6
      roles/ispmail-postfix/tasks/main.yml

+ 9
- 7
roles/ispmail-dovecot/files/10-master.conf Vedi File

@@ -46,15 +46,17 @@ service pop3-login {
}

service lmtp {
unix_listener lmtp {
#mode = 0666
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}

# Create inet listener only if you can't use the above UNIX socket
#inet_listener lmtp {
# Avoid making LMTP visible for the entire internet
#address =
#port =
#port =
#}
}

@@ -88,8 +90,8 @@ service auth {
# permissions (e.g. 0777 allows everyone full permissions).
unix_listener auth-userdb {
#mode = 0666
#user =
#group =
#user =
#group =
}

# Postfix smtp-auth
@@ -115,7 +117,7 @@ service dict {
# For example: mode=0660, group=vmail and global mail_access_groups=vmail
unix_listener dict {
#mode = 0600
#user =
#group =
#user =
#group =
}
}

+ 20
- 0
roles/ispmail-dovecot/files/20-lmtp.conf Vedi File

@@ -0,0 +1,20 @@
##
## LMTP specific settings
##

# 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

# Verify quota before replying to RCPT TO. This adds a small overhead.
#lmtp_rcpt_check_quota = no

protocol lmtp {
# Space separated list of plugins to load (default is global mail_plugins).
#mail_plugins = $mail_plugins
mail_plugins = $mail_plugins sieve
}

+ 2
- 2
roles/ispmail-dovecot/tasks/main.yml Vedi File

@@ -26,8 +26,8 @@
- name: Copying SSL configuration (10-ssl.conf)
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)
template: src=15-lda.conf.j2 dest=/etc/dovecot/conf.d/15-lda.conf
- name: Copying LMTP configuration (20-lmtp.conf - enable sieve plugin)
copy: src=20-lmtp.conf dest=/etc/dovecot/conf.d/20-lmtp.conf
notify: restart dovecot
- name: Copying mailboxes configuration (15-mailboxes.conf - autocreate folders)
copy: src=15-mailboxes.conf dest=/etc/dovecot/conf.d/15-mailboxes.conf


+ 0
- 48
roles/ispmail-dovecot/templates/15-lda.conf.j2 Vedi File

@@ -1,48 +0,0 @@
##
## LDA specific settings (also used by LMTP)
##

# Address to use when sending rejection mails.
# Default is postmaster@<your domain>. %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
}

+ 1
- 0
roles/ispmail-packages/tasks/main.yml Vedi File

@@ -9,6 +9,7 @@
- dovecot-mysql
- dovecot-pop3d
- dovecot-imapd
- dovecot-lmtpd
- dovecot-managesieved
- phpmyadmin
- spamass-milter


+ 2
- 6
roles/ispmail-postfix/tasks/main.yml Vedi File

@@ -30,12 +30,8 @@
- virtual-mailbox-maps
- virtual-alias-maps

- name: Define dovecot service in master.cf
command: postconf -vM dovecot/unix='dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${recipient}'
notify: restart postfix

- name: Set virtual_transport to dovecot
command: postconf virtual_transport=dovecot
- name: Make Postfix use LMTP to send emails to Dovecot
command: postconf virtual_transport=lmtp:unix:private/dovecot-lmtp

- name: Restricting delivery to Dovecot to one email at a time
command: postconf dovecot_destination_recipient_limit=1


Caricamento…
Annulla
Salva