Major move around

This commit is contained in:
Val
2015-07-08 10:06:43 +01:00
parent 90a0de099b
commit a56a8d917e
21 changed files with 83 additions and 76 deletions

View File

@@ -1,14 +0,0 @@
auth_mechanisms = plain login
passdb {
driver = passwd-file
args = /etc/dovecot/passwd
}
userdb {
driver = static
args = uid=vmail gid=vmail home=/vmail/%d/%n allow_all_users=yes
}

View File

@@ -1,3 +0,0 @@
protocol imap {
imap_client_workarounds = tb-extra-mailbox-sep
}

View File

@@ -1,5 +0,0 @@
protocol lda {
hostname = mail.docker.container
postmaster_address = postmaster@mail.docker.container
mail_plugin_dir = /usr/lib/dovecot/modules/lda
}

View File

@@ -1,2 +0,0 @@
auth_verbose = yes
auth_debug = yes

View File

@@ -1,19 +0,0 @@
mail_location = maildir:/vmail/%d/%n:LAYOUT=fs
namespace inbox {
inbox = yes
# set these to autocreate or else thunderbird will complain
mailbox Trash {
auto = create
special_use = \Trash
}
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox Sent {
auto = subscribe # autocreate and autosubscribe the Sent mailbox
special_use = \Sent
}
}

View File

@@ -1,34 +0,0 @@
service imap-login {
inet_listener imap {
}
#disable imaps since we use TLS connections through the standard imap
inet_listener imaps {
port = 0
}
}
service imap {
}
# not sure if this is needed
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = vmail
mode = 0660
user = postfix
}
}
service auth {
unix_listener /var/spool/postfix/private/auth {
mode = 0660
user = postfix
group = vmail
}
}
service auth-worker {
}

View File

@@ -1,5 +0,0 @@
ssl = required
disable_plaintext_auth = yes
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem

View File

@@ -1,2 +0,0 @@
admin@example.org admin@example.org
@example.org catch-all@example.org

View File

@@ -1 +0,0 @@
example.org

View File

@@ -1 +0,0 @@
localhost

View File

@@ -1,68 +0,0 @@
# Log to syslog
Syslog yes
# Required to use local socket with MTAs that access the socket as a non-
# privileged user (e.g. Postfix)
#UMask 002
# dkim-milter (2.5.2.dfsg-1ubuntu1) hardy:
# Disable new umask option by default (not needed since Ubuntu default
# uses a TCP socket instead of a Unix socket).
# Attempt to become the specified userid before starting operations.
#UserID 105 # 'id postfix' in your shell
# Sign for example.com with key in /etc/mail/dkim.key using
# selector '2007' (e.g. 2007._domainkey.example.com)
Domain example.com
KeyFile /etc/dkim.key # See bellow how to generate and set up the key
Selector mail
# Common settings. See dkim-filter.conf(5) for more information.
AutoRestart yes
Background yes
Canonicalization relaxed/relaxed
DNSTimeout 5
Mode sv
SignatureAlgorithm rsa-sha256
SubDomains no
#UseASPDiscard no
#Version rfc4871
X-Header no
#InternalHosts /etc/mail/dkim-InternalHosts.txt
# The contents of /etc/mail/dkim-InternalHosts.txt should be
# 127.0.0.1/8
# 192.168.1.0/24
# other.internal.host.domain.tld
# You need InternalHosts if you are signing e-mails on a gateway mail server
# for each of the computers on your LAN.
###############################################
# Other (less-standard) configuration options #
###############################################
#
# If enabled, log verification stats here
Statistics /var/log/dkim-filter/dkim-stats
#
# KeyList is a file containing tuples of key information. Requires
# KeyFile to be unset. Each line of the file should be of the format:
# sender glob:signing domain:signing key file
# Blank lines and lines beginning with # are ignored. Selector will be
# derived from the key's filename.
#KeyList /etc/dkim-keys.conf
#
# If enabled, will generate verification failure reports for any messages
# that fail signature verification. These will be sent to the r= address
# in the policy record, if any.
#ReportInfo yes
#
# If enabled, will issue a Sendmail QUARANTINE for any messages that fail
# signature verification, allowing them to be inspected later.
#Quarantine yes
#
# If enabled, will check for required headers when processing messages.
# At a minimum, that means From: and Date: will be required. Messages not
# containing the required headers will not be signed or verified, but will
# be passed through
#RequiredHeaders yes

View File

@@ -1,2 +0,0 @@
catch-all@example.org:{PLAIN}password123
admin@example.org:{SHA256-CRYPT}$5$3qaCC/fV65Adtfoy$O20EXoSOcgWKf5NyAZnXAtGPQoSgeYRjLm56M25.H12

View File

@@ -1,79 +0,0 @@
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = /etc/mailname, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
# SMTP configuration for incoming mail (port 25)
# Outgoing mail (port 587) configuration is specified in master.cf
# allow all connections (since we want to receive mail from outside)
smtpd_client_restrictions = permit
# Don't talk to mail systems that don't know their own hostname.
# With Postfix < 2.3, specify reject_unknown_hostname.
smtpd_helo_restrictions = permit
# Don't accept mail from domains that don't exist.
smtpd_sender_restrictions = permit
# Only accept mail where this server is the final destination
smtpd_relay_restrictions = permit_auth_destination, reject
# Mail thats not for us gets filtered out by smtpd_relay_restrictions
# When the mail is for us, we just accept everything. (could add spam blocklists/user checking etc. here)
smtpd_recipient_restrictions = permit
# Delivery to dovecot
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_mailbox_domains = /etc/postfix/virtual-mailbox-domains
virtual_mailbox_maps = hash:/etc/postfix/virtual-mailbox-maps
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
# additional authentication settings
smtpd_tls_auth_only = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
# DKIM
milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891

View File

@@ -1,15 +0,0 @@
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}
# we need to be permissive with the helo restrictions since the client can only
# authenticate after HELO has been sent
submission inet n - n - - smtpd
-o smtpd_etrn_restrictions=reject
-o smtpd_sasl_type=dovecot
-o smtpd_sasl_path=private/auth
-o smtpd_sasl_auth_enable=yes
-o smtpd_helo_restrictions=permit
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o smtpd_sender_restrictions=permit_sasl_authenticated,reject
-o smtpd_relay_restrictions=permit_sasl_authenticated,reject
-o smtpd_recipient_restrictions=permit_sasl_authenticated,reject