bundles/dovecot: add full text indexing
This commit is contained in:
parent
a155fe22cb
commit
7491ec840c
4 changed files with 47 additions and 6 deletions
|
@ -3,3 +3,4 @@ driver = pgsql
|
||||||
default_pass_scheme = MD5-CRYPT
|
default_pass_scheme = MD5-CRYPT
|
||||||
password_query = SELECT username as user, password FROM mailbox WHERE username = '%u' AND active = true
|
password_query = SELECT username as user, password FROM mailbox WHERE username = '%u' AND active = true
|
||||||
user_query = SELECT '/var/mail/vmail/' || maildir as home, 65534 as uid, 65534 as gid FROM mailbox WHERE username = '%u' AND active = true
|
user_query = SELECT '/var/mail/vmail/' || maildir as home, 65534 as uid, 65534 as gid FROM mailbox WHERE username = '%u' AND active = true
|
||||||
|
iterate_query = SELECT username as user FROM mailbox WHERE active = true
|
||||||
|
|
|
@ -40,7 +40,7 @@ login_greeting = IMAPd ready
|
||||||
auth_mechanisms = plain login
|
auth_mechanisms = plain login
|
||||||
first_valid_uid = 65534
|
first_valid_uid = 65534
|
||||||
disable_plaintext_auth = yes
|
disable_plaintext_auth = yes
|
||||||
mail_plugins = $mail_plugins zlib old_stats
|
mail_plugins = $mail_plugins zlib old_stats fts fts_xapian
|
||||||
|
|
||||||
plugin {
|
plugin {
|
||||||
zlib_save_level = 6
|
zlib_save_level = 6
|
||||||
|
@ -56,6 +56,15 @@ plugin {
|
||||||
old_stats_refresh = 30 secs
|
old_stats_refresh = 30 secs
|
||||||
old_stats_track_cmds = yes
|
old_stats_track_cmds = yes
|
||||||
|
|
||||||
|
fts = xapian
|
||||||
|
fts_xapian = partial=3 full=20
|
||||||
|
|
||||||
|
fts_autoindex = yes
|
||||||
|
fts_enforced = yes
|
||||||
|
|
||||||
|
# Index attachements
|
||||||
|
fts_decoder = decode2text
|
||||||
|
|
||||||
% if node.has_bundle('rspamd'):
|
% if node.has_bundle('rspamd'):
|
||||||
sieve_before = /var/mail/vmail/sieve/global/spam-global.sieve
|
sieve_before = /var/mail/vmail/sieve/global/spam-global.sieve
|
||||||
|
|
||||||
|
@ -86,14 +95,19 @@ service auth {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
service lmtp {
|
service decode2text {
|
||||||
unix_listener /var/spool/postfix/private/dovecot-lmtp {
|
executable = script /usr/lib/dovecot/decode2text.sh
|
||||||
group = postfix
|
user = dovecot
|
||||||
mode = 0600
|
unix_listener decode2text {
|
||||||
user = postfix
|
mode = 0666
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
service indexer-worker {
|
||||||
|
vsz_limit = 0
|
||||||
|
process_limit = 0
|
||||||
|
}
|
||||||
|
|
||||||
service imap {
|
service imap {
|
||||||
executable = imap
|
executable = imap
|
||||||
}
|
}
|
||||||
|
@ -104,6 +118,14 @@ service imap-login {
|
||||||
vsz_limit = 64M
|
vsz_limit = 64M
|
||||||
}
|
}
|
||||||
|
|
||||||
|
service lmtp {
|
||||||
|
unix_listener /var/spool/postfix/private/dovecot-lmtp {
|
||||||
|
group = postfix
|
||||||
|
mode = 0600
|
||||||
|
user = postfix
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
service managesieve-login {
|
service managesieve-login {
|
||||||
inet_listener sieve {
|
inet_listener sieve {
|
||||||
port = 4190
|
port = 4190
|
||||||
|
|
|
@ -49,6 +49,13 @@ files = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
symlinks['/usr/lib/dovecot/decode2text.sh'] = {
|
||||||
|
'target': '/usr/share/doc/dovecot-core/examples/decode2text.sh',
|
||||||
|
'before': {
|
||||||
|
'svc_systemd:dovecot',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
actions = {
|
actions = {
|
||||||
'dovecot_generate_dhparam': {
|
'dovecot_generate_dhparam': {
|
||||||
'command': 'openssl dhparam -out /etc/dovecot/ssl/dhparam.pem 2048',
|
'command': 'openssl dhparam -out /etc/dovecot/ssl/dhparam.pem 2048',
|
||||||
|
|
|
@ -3,6 +3,7 @@ from bundlewrap.metadata import atomic
|
||||||
defaults = {
|
defaults = {
|
||||||
'apt': {
|
'apt': {
|
||||||
'packages': {
|
'packages': {
|
||||||
|
'dovecot-fts-xapian': {},
|
||||||
'dovecot-imapd': {},
|
'dovecot-imapd': {},
|
||||||
'dovecot-lmtpd': {},
|
'dovecot-lmtpd': {},
|
||||||
'dovecot-managesieved': {},
|
'dovecot-managesieved': {},
|
||||||
|
@ -35,6 +36,16 @@ defaults = {
|
||||||
'dovecot',
|
'dovecot',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'systemd-timers': {
|
||||||
|
'timers': {
|
||||||
|
'dovecot_fts_optimize': {
|
||||||
|
'command': [
|
||||||
|
'/usr/bin/doveadm fts optimize -A',
|
||||||
|
],
|
||||||
|
'when': '02:{}:00'.format(node.magic_number % 60),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if node.has_bundle('postfixadmin'):
|
if node.has_bundle('postfixadmin'):
|
||||||
|
|
Loading…
Reference in a new issue