smartmachine 1.2.3 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/lib/smart_machine/apps/app.rb +1 -0
  3. data/lib/smart_machine/buildpackers/buildpacker.rb +2 -2
  4. data/lib/smart_machine/commands/grid.rb +8 -0
  5. data/lib/smart_machine/commands/grid_commands/emailer.rb +107 -0
  6. data/lib/smart_machine/commands/grid_commands/roundcube.rb +107 -0
  7. data/lib/smart_machine/configuration.rb +35 -2
  8. data/lib/smart_machine/credentials.rb +10 -0
  9. data/lib/smart_machine/engine.rb +7 -1
  10. data/lib/smart_machine/grids/adminer.rb +1 -0
  11. data/lib/smart_machine/grids/certbot.rb +1 -0
  12. data/lib/smart_machine/grids/emailer/imapsync.rb +7 -0
  13. data/lib/smart_machine/grids/emailer.rb +188 -0
  14. data/lib/smart_machine/grids/haproxy.rb +1 -0
  15. data/lib/smart_machine/grids/mariadb.rb +1 -0
  16. data/lib/smart_machine/grids/postgresql.rb +1 -0
  17. data/lib/smart_machine/grids/roundcube/.keep +0 -0
  18. data/lib/smart_machine/grids/roundcube.rb +184 -0
  19. data/lib/smart_machine/machine.rb +7 -0
  20. data/lib/smart_machine/syncer.rb +10 -0
  21. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/docker/command.rb +50 -0
  22. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/docker/entrypoint.rb +196 -0
  23. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/docker/logtailer.rb +75 -0
  24. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/dovecot/conf.d/10-auth.conf +132 -0
  25. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/dovecot/conf.d/10-mail.conf +427 -0
  26. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/dovecot/conf.d/10-master.conf +153 -0
  27. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/dovecot/conf.d/10-ssl.conf +87 -0
  28. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/dovecot/conf.d/15-mailboxes.conf +94 -0
  29. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/dovecot/conf.d/20-imap.conf +102 -0
  30. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/dovecot/conf.d/20-lmtp.conf +43 -0
  31. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/dovecot/conf.d/90-quota.conf +114 -0
  32. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/dovecot/conf.d/90-sieve.conf +229 -0
  33. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/dovecot/dovecot-sql.conf.ext +163 -0
  34. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/dovecot/sieve/learn-ham.sh +2 -0
  35. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/dovecot/sieve/learn-ham.sieve +5 -0
  36. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/dovecot/sieve/learn-spam.sh +2 -0
  37. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/dovecot/sieve/learn-spam.sieve +2 -0
  38. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/dovecot/sieve-after/spam-to-folder.sieve +6 -0
  39. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/haproxy/haproxy.cfg +58 -0
  40. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/monit/conf.d/services.cfg +70 -0
  41. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/monit/monitrc +344 -0
  42. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/opendkim.conf +71 -0
  43. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/postfix/main.cf +128 -0
  44. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/postfix/master.cf +149 -0
  45. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/postfix/mysql-sender-login-maps.cf +7 -0
  46. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/postfix/mysql-virtual-alias-domains.cf +7 -0
  47. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/postfix/mysql-virtual-alias-maps-domains.cf +7 -0
  48. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/postfix/mysql-virtual-alias-maps-masters.cf +7 -0
  49. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/postfix/mysql-virtual-alias-maps-users.cf +7 -0
  50. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/postfix/mysql-virtual-alias-maps-userstothemselves.cf +7 -0
  51. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/postfix/mysql-virtual-mailbox-domains.cf +7 -0
  52. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/postfix/mysql-virtual-mailbox-maps.cf +7 -0
  53. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/postfix-policyd-spf-python/policyd-spf.conf +12 -0
  54. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/etc/spamassassin/local.cf +124 -0
  55. data/lib/smart_machine/templates/dotsmartmachine/config/emailer/usr/local/bin/quota-warning.sh +22 -0
  56. data/lib/smart_machine/templates/dotsmartmachine/config/emailer.yml +37 -0
  57. data/lib/smart_machine/templates/dotsmartmachine/config/engine.yml +2 -0
  58. data/lib/smart_machine/templates/dotsmartmachine/config/roundcube/docker/custom-docker-entrypoint.sh +185 -0
  59. data/lib/smart_machine/templates/dotsmartmachine/config/roundcube/docker/entrypoint.rb +58 -0
  60. data/lib/smart_machine/templates/dotsmartmachine/config/roundcube/etc/apache2/sites-available/000-default.conf +36 -0
  61. data/lib/smart_machine/templates/dotsmartmachine/config/roundcube/usr/local/etc/php/conf.d/zzz_roundcube-custom.ini +4 -0
  62. data/lib/smart_machine/templates/dotsmartmachine/config/roundcube/var/roundcube/config/config.custom.inc.php +25 -0
  63. data/lib/smart_machine/templates/dotsmartmachine/config/roundcube/var/www/html/plugins/password/config.inc.php +523 -0
  64. data/lib/smart_machine/templates/dotsmartmachine/config/roundcube.yml +49 -0
  65. data/lib/smart_machine/templates/dotsmartmachine/config/users.yml +1 -1
  66. data/lib/smart_machine/version.rb +2 -2
  67. data/lib/smart_machine.rb +2 -0
  68. metadata +89 -8
@@ -0,0 +1,153 @@
1
+ #default_process_limit = 100
2
+ #default_client_limit = 1000
3
+
4
+ # Default VSZ (virtual memory size) limit for service processes. This is mainly
5
+ # intended to catch and kill processes that leak memory before they eat up
6
+ # everything.
7
+ #default_vsz_limit = 256M
8
+
9
+ # Login user is internally used by login processes. This is the most untrusted
10
+ # user in Dovecot system. It shouldn't have access to anything at all.
11
+ #default_login_user = dovenull
12
+
13
+ # Internal user is used by unprivileged processes. It should be separate from
14
+ # login user, so that login processes can't disturb other processes.
15
+ #default_internal_user = dovecot
16
+
17
+ service imap-login {
18
+ inet_listener imap {
19
+ #port = 143
20
+ ##### SmartMachine Begin.
21
+ port = 0
22
+ ##### SmartMachine Close.
23
+ }
24
+ inet_listener imaps {
25
+ #port = 993
26
+ #ssl = yes
27
+ }
28
+
29
+ # Number of connections to handle before starting a new process. Typically
30
+ # the only useful values are 0 (unlimited) or 1. 1 is more secure, but 0
31
+ # is faster. <doc/wiki/LoginProcess.txt>
32
+ #service_count = 1
33
+
34
+ # Number of processes to always keep waiting for more connections.
35
+ #process_min_avail = 0
36
+
37
+ # If you set service_count=0, you probably need to grow this.
38
+ #vsz_limit = $default_vsz_limit
39
+ }
40
+
41
+ service pop3-login {
42
+ inet_listener pop3 {
43
+ #port = 110
44
+ ##### SmartMachine Begin.
45
+ port = 0
46
+ ##### SmartMachine Close.
47
+ }
48
+ inet_listener pop3s {
49
+ #port = 995
50
+ #ssl = yes
51
+ }
52
+ }
53
+
54
+ service submission-login {
55
+ inet_listener submission {
56
+ #port = 587
57
+ }
58
+ }
59
+
60
+ service lmtp {
61
+ ##### SmartMachine Begin.
62
+ #unix_listener lmtp {
63
+ # #mode = 0666
64
+ #}
65
+ unix_listener /var/spool/postfix/private/dovecot-lmtp {
66
+ mode = 0600
67
+ user = postfix
68
+ group = postfix
69
+ }
70
+ ##### SmartMachine Close.
71
+
72
+ # Create inet listener only if you can't use the above UNIX socket
73
+ #inet_listener lmtp {
74
+ # Avoid making LMTP visible for the entire internet
75
+ #address =
76
+ #port =
77
+ #}
78
+ }
79
+
80
+ service imap {
81
+ # Most of the memory goes to mmap()ing files. You may need to increase this
82
+ # limit if you have huge mailboxes.
83
+ #vsz_limit = $default_vsz_limit
84
+
85
+ # Max. number of IMAP processes (connections)
86
+ #process_limit = 1024
87
+ }
88
+
89
+ service pop3 {
90
+ # Max. number of POP3 processes (connections)
91
+ #process_limit = 1024
92
+ }
93
+
94
+ service submission {
95
+ # Max. number of SMTP Submission processes (connections)
96
+ #process_limit = 1024
97
+ }
98
+
99
+ service auth {
100
+ # auth_socket_path points to this userdb socket by default. It's typically
101
+ # used by dovecot-lda, doveadm, possibly imap process, etc. Users that have
102
+ # full permissions to this socket are able to get a list of all usernames and
103
+ # get the results of everyone's userdb lookups.
104
+ #
105
+ # The default 0666 mode allows anyone to connect to the socket, but the
106
+ # userdb lookups will succeed only if the userdb returns an "uid" field that
107
+ # matches the caller process's UID. Also if caller's uid or gid matches the
108
+ # socket's uid or gid the lookup succeeds. Anything else causes a failure.
109
+ #
110
+ # To give the caller full permissions to lookup all users, set the mode to
111
+ # something else than 0666 and Dovecot lets the kernel enforce the
112
+ # permissions (e.g. 0777 allows everyone full permissions).
113
+ unix_listener auth-userdb {
114
+ #mode = 0666
115
+ #user =
116
+ #group =
117
+ }
118
+
119
+ # Postfix smtp-auth
120
+ #unix_listener /var/spool/postfix/private/auth {
121
+ # mode = 0666
122
+ #}
123
+ ##### SmartMachine Begin.
124
+ unix_listener /var/spool/postfix/private/auth {
125
+ mode = 0660
126
+ user = postfix
127
+ group = postfix
128
+ }
129
+ ##### SmartMachine Close.
130
+
131
+ # Auth process is run as this user.
132
+ #user = $default_internal_user
133
+ }
134
+
135
+ service auth-worker {
136
+ # Auth worker process is run as root by default, so that it can access
137
+ # /etc/shadow. If this isn't necessary, the user should be changed to
138
+ # $default_internal_user.
139
+ #user = root
140
+ ##### SmartMachine Begin.
141
+ user = $default_internal_user
142
+ ##### SmartMachine Close.
143
+ }
144
+
145
+ service dict {
146
+ # If dict proxy is used, mail processes should have access to its socket.
147
+ # For example: mode=0660, group=vmail and global mail_access_groups=vmail
148
+ unix_listener dict {
149
+ #mode = 0600
150
+ #user =
151
+ #group =
152
+ }
153
+ }
@@ -0,0 +1,87 @@
1
+ ##
2
+ ## SSL settings
3
+ ##
4
+
5
+ # SSL/TLS support: yes, no, required. <doc/wiki/SSL.txt>
6
+ ##### SmartMachine Begin.
7
+ #ssl = yes
8
+ ssl = required
9
+ ##### SmartMachine Close.
10
+
11
+ # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
12
+ # dropping root privileges, so keep the key file unreadable by anyone but
13
+ # root. Included doc/mkcert.sh can be used to easily generate self-signed
14
+ # certificate, just make sure to update the domains in dovecot-openssl.cnf
15
+ ##### SmartMachine Begin.
16
+ #ssl_cert = </etc/dovecot/private/dovecot.pem
17
+ #ssl_key = </etc/dovecot/private/dovecot.key
18
+ ssl_cert = </etc/letsencrypt/live/%<fqdn>s/fullchain.pem
19
+ ssl_key = </etc/letsencrypt/live/%<fqdn>s/key.pem
20
+ ##### SmartMachine Close.
21
+
22
+ # If key file is password protected, give the password here. Alternatively
23
+ # give it when starting dovecot with -p parameter. Since this file is often
24
+ # world-readable, you may want to place this setting instead to a different
25
+ # root owned 0600 file by using ssl_key_password = <path.
26
+ #ssl_key_password =
27
+
28
+ # PEM encoded trusted certificate authority. Set this only if you intend to use
29
+ # ssl_verify_client_cert=yes. The file should contain the CA certificate(s)
30
+ # followed by the matching CRL(s). (e.g. ssl_ca = </etc/ssl/certs/ca.pem)
31
+ #ssl_ca =
32
+
33
+ # Require that CRL check succeeds for client certificates.
34
+ #ssl_require_crl = yes
35
+
36
+ # Directory and/or file for trusted SSL CA certificates. These are used only
37
+ # when Dovecot needs to act as an SSL client (e.g. imapc backend or
38
+ # submission service). The directory is usually /etc/ssl/certs in
39
+ # Debian-based systems and the file is /etc/pki/tls/cert.pem in
40
+ # RedHat-based systems. Note that ssl_client_ca_file isn't recommended with
41
+ # large CA bundles, because it leads to excessive memory usage.
42
+ #ssl_client_ca_dir =
43
+ ssl_client_ca_dir = /etc/ssl/certs
44
+ #ssl_client_ca_file =
45
+
46
+ # Require valid cert when connecting to a remote server
47
+ #ssl_client_require_valid_cert = yes
48
+
49
+ # Request client to send a certificate. If you also want to require it, set
50
+ # auth_ssl_require_client_cert=yes in auth section.
51
+ #ssl_verify_client_cert = no
52
+
53
+ # Which field from certificate to use for username. commonName and
54
+ # x500UniqueIdentifier are the usual choices. You'll also need to set
55
+ # auth_ssl_username_from_cert=yes.
56
+ #ssl_cert_username_field = commonName
57
+
58
+ # SSL DH parameters
59
+ # Generate new params with `openssl dhparam -out /etc/dovecot/dh.pem 4096`
60
+ # Or migrate from old ssl-parameters.dat file with the command dovecot
61
+ # gives on startup when ssl_dh is unset.
62
+ ssl_dh = </usr/share/dovecot/dh.pem
63
+
64
+ # Minimum SSL protocol version to use. Potentially recognized values are SSLv3,
65
+ # TLSv1, TLSv1.1, and TLSv1.2, depending on the OpenSSL version used.
66
+ #ssl_min_protocol = TLSv1
67
+
68
+ # SSL ciphers to use, the default is:
69
+ #ssl_cipher_list = ALL:!kRSA:!SRP:!kDHd:!DSS:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!RC4:!ADH:!LOW@STRENGTH
70
+ # To disable non-EC DH, use:
71
+ #ssl_cipher_list = ALL:!DH:!kRSA:!SRP:!kDHd:!DSS:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!RC4:!ADH:!LOW@STRENGTH
72
+
73
+ # Colon separated list of elliptic curves to use. Empty value (the default)
74
+ # means use the defaults from the SSL library. P-521:P-384:P-256 would be an
75
+ # example of a valid value.
76
+ #ssl_curve_list =
77
+
78
+ # Prefer the server's order of ciphers over client's.
79
+ #ssl_prefer_server_ciphers = no
80
+
81
+ # SSL crypto device to use, for valid values run "openssl engine"
82
+ #ssl_crypto_device =
83
+
84
+ # SSL extra options. Currently supported options are:
85
+ # compression - Enable compression.
86
+ # no_ticket - Disable SSL session tickets.
87
+ #ssl_options =
@@ -0,0 +1,94 @@
1
+ ##
2
+ ## Mailbox definitions
3
+ ##
4
+
5
+ # Each mailbox is specified in a separate mailbox section. The section name
6
+ # specifies the mailbox name. If it has spaces, you can put the name
7
+ # "in quotes". These sections can contain the following mailbox settings:
8
+ #
9
+ # auto:
10
+ # Indicates whether the mailbox with this name is automatically created
11
+ # implicitly when it is first accessed. The user can also be automatically
12
+ # subscribed to the mailbox after creation. The following values are
13
+ # defined for this setting:
14
+ #
15
+ # no - Never created automatically.
16
+ # create - Automatically created, but no automatic subscription.
17
+ # subscribe - Automatically created and subscribed.
18
+ #
19
+ # special_use:
20
+ # A space-separated list of SPECIAL-USE flags (RFC 6154) to use for the
21
+ # mailbox. There are no validity checks, so you could specify anything
22
+ # you want in here, but it's not a good idea to use flags other than the
23
+ # standard ones specified in the RFC:
24
+ #
25
+ # \All - This (virtual) mailbox presents all messages in the
26
+ # user's message store.
27
+ # \Archive - This mailbox is used to archive messages.
28
+ # \Drafts - This mailbox is used to hold draft messages.
29
+ # \Flagged - This (virtual) mailbox presents all messages in the
30
+ # user's message store marked with the IMAP \Flagged flag.
31
+ # \Important - This (virtual) mailbox presents all messages in the
32
+ # user's message store deemed important to user.
33
+ # \Junk - This mailbox is where messages deemed to be junk mail
34
+ # are held.
35
+ # \Sent - This mailbox is used to hold copies of messages that
36
+ # have been sent.
37
+ # \Trash - This mailbox is used to hold messages that have been
38
+ # deleted.
39
+ #
40
+ # comment:
41
+ # Defines a default comment or note associated with the mailbox. This
42
+ # value is accessible through the IMAP METADATA mailbox entries
43
+ # "/shared/comment" and "/private/comment". Users with sufficient
44
+ # privileges can override the default value for entries with a custom
45
+ # value.
46
+
47
+ # NOTE: Assumes "namespace inbox" has been defined in 10-mail.conf.
48
+ namespace inbox {
49
+ # These mailboxes are widely used and could perhaps be created automatically:
50
+ mailbox Drafts {
51
+ special_use = \Drafts
52
+ }
53
+ mailbox Junk {
54
+ special_use = \Junk
55
+ ##### SmartMachine Begin.
56
+ auto = subscribe
57
+ autoexpunge = 30d
58
+ ##### SmartMachine Close.
59
+ }
60
+ mailbox Trash {
61
+ special_use = \Trash
62
+ ##### SmartMachine Begin.
63
+ auto = subscribe
64
+ autoexpunge = 30d
65
+ ##### SmartMachine Close.
66
+ }
67
+
68
+ # For \Sent mailboxes there are two widely used names. We'll mark both of
69
+ # them as \Sent. User typically deletes one of them if duplicates are created.
70
+ mailbox Sent {
71
+ special_use = \Sent
72
+ }
73
+ mailbox "Sent Messages" {
74
+ special_use = \Sent
75
+ }
76
+
77
+ # If you have a virtual "All messages" mailbox:
78
+ #mailbox virtual/All {
79
+ # special_use = \All
80
+ # comment = All my messages
81
+ #}
82
+
83
+ # If you have a virtual "Flagged" mailbox:
84
+ #mailbox virtual/Flagged {
85
+ # special_use = \Flagged
86
+ # comment = All my flagged messages
87
+ #}
88
+
89
+ # If you have a virtual "Important" mailbox:
90
+ #mailbox virtual/Important {
91
+ # special_use = \Important
92
+ # comment = All my important messages
93
+ #}
94
+ }
@@ -0,0 +1,102 @@
1
+ ##
2
+ ## IMAP specific settings
3
+ ##
4
+
5
+ # If nothing happens for this long while client is IDLEing, move the connection
6
+ # to imap-hibernate process and close the old imap process. This saves memory,
7
+ # because connections use very little memory in imap-hibernate process. The
8
+ # downside is that recreating the imap process back uses some resources.
9
+ #imap_hibernate_timeout = 0
10
+
11
+ # Maximum IMAP command line length. Some clients generate very long command
12
+ # lines with huge mailboxes, so you may need to raise this if you get
13
+ # "Too long argument" or "IMAP command line too large" errors often.
14
+ #imap_max_line_length = 64k
15
+
16
+ # IMAP logout format string:
17
+ # %i - total number of bytes read from client
18
+ # %o - total number of bytes sent to client
19
+ # %{fetch_hdr_count} - Number of mails with mail header data sent to client
20
+ # %{fetch_hdr_bytes} - Number of bytes with mail header data sent to client
21
+ # %{fetch_body_count} - Number of mails with mail body data sent to client
22
+ # %{fetch_body_bytes} - Number of bytes with mail body data sent to client
23
+ # %{deleted} - Number of mails where client added \Deleted flag
24
+ # %{expunged} - Number of mails that client expunged, which does not
25
+ # include automatically expunged mails
26
+ # %{autoexpunged} - Number of mails that were automatically expunged after
27
+ # client disconnected
28
+ # %{trashed} - Number of mails that client copied/moved to the
29
+ # special_use=\Trash mailbox.
30
+ # %{appended} - Number of mails saved during the session
31
+ #imap_logout_format = in=%i out=%o deleted=%{deleted} expunged=%{expunged} \
32
+ # trashed=%{trashed} hdr_count=%{fetch_hdr_count} \
33
+ # hdr_bytes=%{fetch_hdr_bytes} body_count=%{fetch_body_count} \
34
+ # body_bytes=%{fetch_body_bytes}
35
+
36
+ # Override the IMAP CAPABILITY response. If the value begins with '+',
37
+ # add the given capabilities on top of the defaults (e.g. +XFOO XBAR).
38
+ #imap_capability =
39
+
40
+ # How long to wait between "OK Still here" notifications when client is
41
+ # IDLEing.
42
+ #imap_idle_notify_interval = 2 mins
43
+
44
+ # ID field names and values to send to clients. Using * as the value makes
45
+ # Dovecot use the default value. The following fields have default values
46
+ # currently: name, version, os, os-version, support-url, support-email,
47
+ # revision.
48
+ #imap_id_send =
49
+
50
+ # ID fields sent by client to log. * means everything.
51
+ #imap_id_log =
52
+
53
+ # Workarounds for various client bugs:
54
+ # delay-newmail:
55
+ # Send EXISTS/RECENT new mail notifications only when replying to NOOP
56
+ # and CHECK commands. Some clients ignore them otherwise, for example OSX
57
+ # Mail (<v2.1). Outlook Express breaks more badly though, without this it
58
+ # may show user "Message no longer in server" errors. Note that OE6 still
59
+ # breaks even with this workaround if synchronization is set to
60
+ # "Headers Only".
61
+ # tb-extra-mailbox-sep:
62
+ # Thunderbird gets somehow confused with LAYOUT=fs (mbox and dbox) and
63
+ # adds extra '/' suffixes to mailbox names. This option causes Dovecot to
64
+ # ignore the extra '/' instead of treating it as invalid mailbox name.
65
+ # tb-lsub-flags:
66
+ # Show \Noselect flags for LSUB replies with LAYOUT=fs (e.g. mbox).
67
+ # This makes Thunderbird realize they aren't selectable and show them
68
+ # greyed out, instead of only later giving "not selectable" popup error.
69
+ #
70
+ # The list is space-separated.
71
+ #imap_client_workarounds =
72
+
73
+ # Host allowed in URLAUTH URLs sent by client. "*" allows all.
74
+ #imap_urlauth_host =
75
+
76
+ # Enable IMAP LITERAL- extension (replaces LITERAL+)
77
+ #imap_literal_minus = no
78
+
79
+ # What happens when FETCH fails due to some internal error:
80
+ # disconnect-immediately:
81
+ # The FETCH is aborted immediately and the IMAP client is disconnected.
82
+ # disconnect-after:
83
+ # The FETCH runs for all the requested mails returning as much data as
84
+ # possible. The client is finally disconnected without a tagged reply.
85
+ # no-after:
86
+ # Same as disconnect-after, but tagged NO reply is sent instead of
87
+ # disconnecting the client. If the client attempts to FETCH the same failed
88
+ # mail more than once, the client is disconnected. This is to avoid clients
89
+ # from going into infinite loops trying to FETCH a broken mail.
90
+ #imap_fetch_failure = disconnect-immediately
91
+
92
+ protocol imap {
93
+ # Space separated list of plugins to load (default is global mail_plugins).
94
+ #mail_plugins = $mail_plugins
95
+ ##### SmartMachine Begin.
96
+ mail_plugins = $mail_plugins quota imap_sieve
97
+ ##### SmartMachine Close.
98
+
99
+ # Maximum number of IMAP connections allowed for a user from each IP address.
100
+ # NOTE: The username is compared case-sensitively.
101
+ #mail_max_userip_connections = 10
102
+ }
@@ -0,0 +1,43 @@
1
+ ##
2
+ ## LMTP specific settings
3
+ ##
4
+
5
+ # Support proxying to other LMTP/SMTP servers by performing passdb lookups.
6
+ #lmtp_proxy = no
7
+
8
+ # When recipient address includes the detail (e.g. user+detail), try to save
9
+ # the mail to the detail mailbox. See also recipient_delimiter and
10
+ # lda_mailbox_autocreate settings.
11
+ #lmtp_save_to_detail_mailbox = no
12
+
13
+ # Verify quota before replying to RCPT TO. This adds a small overhead.
14
+ #lmtp_rcpt_check_quota = no
15
+
16
+ # Add "Received:" header to mails delivered.
17
+ #lmtp_add_received_header = yes
18
+
19
+ # Which recipient address to use for Delivered-To: header and Received:
20
+ # header. The default is "final", which is the same as the one given to
21
+ # RCPT TO command. "original" uses the address given in RCPT TO's ORCPT
22
+ # parameter, "none" uses nothing. Note that "none" is currently always used
23
+ # when a mail has multiple recipients.
24
+ #lmtp_hdr_delivery_address = final
25
+
26
+ # Workarounds for various client bugs:
27
+ # whitespace-before-path:
28
+ # Allow one or more spaces or tabs between `MAIL FROM:' and path and between
29
+ # `RCPT TO:' and path.
30
+ # mailbox-for-path:
31
+ # Allow using bare Mailbox syntax (i.e., without <...>) instead of full path
32
+ # syntax.
33
+ #
34
+ # The list is space-separated.
35
+ #lmtp_client_workarounds =
36
+
37
+ protocol lmtp {
38
+ # Space separated list of plugins to load (default is global mail_plugins).
39
+ #mail_plugins = $mail_plugins
40
+ ##### SmartMachine Begin.
41
+ mail_plugins = $mail_plugins sieve
42
+ ##### SmartMachine Close.
43
+ }
@@ -0,0 +1,114 @@
1
+ ##
2
+ ## Quota configuration.
3
+ ##
4
+
5
+ # Note that you also have to enable quota plugin in mail_plugins setting.
6
+ # <doc/wiki/Quota.txt>
7
+
8
+ ##
9
+ ## Quota limits
10
+ ##
11
+
12
+ # Quota limits are set using "quota_rule" parameters. To get per-user quota
13
+ # limits, you can set/override them by returning "quota_rule" extra field
14
+ # from userdb. It's also possible to give mailbox-specific limits, for example
15
+ # to give additional 100 MB when saving to Trash:
16
+
17
+ plugin {
18
+ #quota_rule = *:storage=1G
19
+ #quota_rule2 = Trash:storage=+100M
20
+
21
+ # LDA/LMTP allows saving the last mail to bring user from under quota to
22
+ # over quota, if the quota doesn't grow too high. Default is to allow as
23
+ # long as quota will stay under 10% above the limit. Also allowed e.g. 10M.
24
+ #quota_grace = 10%%
25
+
26
+ # Quota plugin can also limit the maximum accepted mail size.
27
+ #quota_max_mail_size = 100M
28
+ }
29
+
30
+ ##
31
+ ## Quota warnings
32
+ ##
33
+
34
+ # You can execute a given command when user exceeds a specified quota limit.
35
+ # Each quota root has separate limits. Only the command for the first
36
+ # exceeded limit is executed, so put the highest limit first.
37
+ # The commands are executed via script service by connecting to the named
38
+ # UNIX socket (quota-warning below).
39
+ # Note that % needs to be escaped as %%, otherwise "% " expands to empty.
40
+
41
+ plugin {
42
+ #quota_warning = storage=95%% quota-warning 95 %u
43
+ #quota_warning2 = storage=80%% quota-warning 80 %u
44
+ }
45
+
46
+ # Example quota-warning service. The unix listener's permissions should be
47
+ # set in a way that mail processes can connect to it. Below example assumes
48
+ # that mail processes run as vmail user. If you use mode=0666, all system users
49
+ # can generate quota warnings to anyone.
50
+ #service quota-warning {
51
+ # executable = script /usr/local/bin/quota-warning.sh
52
+ # user = dovecot
53
+ # unix_listener quota-warning {
54
+ # user = vmail
55
+ # }
56
+ #}
57
+
58
+ ##
59
+ ## Quota backends
60
+ ##
61
+
62
+ # Multiple backends are supported:
63
+ # dirsize: Find and sum all the files found from mail directory.
64
+ # Extremely SLOW with Maildir. It'll eat your CPU and disk I/O.
65
+ # dict: Keep quota stored in dictionary (eg. SQL)
66
+ # maildir: Maildir++ quota
67
+ # fs: Read-only support for filesystem quota
68
+
69
+ plugin {
70
+ #quota = dirsize:User quota
71
+ #quota = maildir:User quota
72
+ #quota = dict:User quota::proxy::quota
73
+ #quota = fs:User quota
74
+ }
75
+
76
+ # Multiple quota roots are also possible, for example this gives each user
77
+ # their own 100MB quota and one shared 1GB quota within the domain:
78
+ plugin {
79
+ #quota = dict:user::proxy::quota
80
+ #quota2 = dict:domain:%d:proxy::quota_domain
81
+ #quota_rule = *:storage=102400
82
+ #quota2_rule = *:storage=1048576
83
+ }
84
+
85
+ ##### SmartMachine Begin.
86
+ plugin {
87
+ quota = count:User quota
88
+ quota_vsizes = yes
89
+
90
+ quota_status_success = DUNNO
91
+ quota_status_nouser = DUNNO
92
+ quota_status_overquota = "452 4.2.2 Mailbox is full and cannot receive any more emails"
93
+ }
94
+
95
+ service quota-status {
96
+ executable = /usr/lib/dovecot/quota-status -p postfix
97
+ unix_listener /var/spool/postfix/private/quota-status {
98
+ user = postfix
99
+ }
100
+ }
101
+
102
+ plugin {
103
+ quota_warning = storage=95%% quota-warning 95 %u
104
+ quota_warning2 = storage=80%% quota-warning 80 %u
105
+ }
106
+ service quota-warning {
107
+ executable = script /usr/local/bin/quota-warning.sh
108
+ unix_listener quota-warning {
109
+ user = vmail
110
+ group = vmail
111
+ mode = 0660
112
+ }
113
+ }
114
+ ##### SmartMachine Close.