Commit 9b69e060 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Preforked imap and lmtp services to speed things up; added default sieve script to sort away spam

parent 5abcc0b2
all: cyrus-config imapd-config cyrus-imapd-service services all: cyrus-config imapd-config cyrus-imapd-service services default-sieve
rm /etc/passwd rm /etc/passwd
mv -v /data/etc/passwd /etc/passwd mv -v /data/etc/passwd /etc/passwd
rm /etc/group rm /etc/group
...@@ -28,6 +28,7 @@ all: cyrus-config imapd-config cyrus-imapd-service services ...@@ -28,6 +28,7 @@ all: cyrus-config imapd-config cyrus-imapd-service services
@echo "$$SERVICES" >> /etc/services @echo "$$SERVICES" >> /etc/services
@echo "$$CYRUS_CONFIG" > /etc/cyrus.conf @echo "$$CYRUS_CONFIG" > /etc/cyrus.conf
@echo "$$IMAPD_CONFIG" > /etc/imapd.conf @echo "$$IMAPD_CONFIG" > /etc/imapd.conf
@echo "$$DEFAULT_SIEVE" > /etc/default/sieve
install -v -m750 -o cyrus -g mail -d /var/lib/cyrus install -v -m750 -o cyrus -g mail -d /var/lib/cyrus
install -v -m750 -o cyrus -g mail -d /var/spool/cyrus install -v -m750 -o cyrus -g mail -d /var/spool/cyrus
install -v -m750 -o cyrus -g mail -d /var/spool/sieve install -v -m750 -o cyrus -g mail -d /var/spool/sieve
...@@ -58,11 +59,11 @@ START { ...@@ -58,11 +59,11 @@ START {
# UNIX sockets start with a slash and are put into /var/lib/cyrus/socket # UNIX sockets start with a slash and are put into /var/lib/cyrus/socket
SERVICES { SERVICES {
# add or remove based on preferences # add or remove based on preferences
imap cmd="imapd" listen="imap" prefork=0 imap cmd="imapd" listen="imap" prefork=3
imaps cmd="imapd -s" listen="imaps" prefork=0 imaps cmd="imapd -s" listen="imaps" prefork=0
pop3 cmd="pop3d" listen="pop3" prefork=0 pop3 cmd="pop3d" listen="pop3" prefork=0
pop3s cmd="pop3d -s" listen="pop3s" prefork=0 pop3s cmd="pop3d -s" listen="pop3s" prefork=0
sieve cmd="timsieved" listen="sieve" prefork=0 sieve cmd="timsieved" listen="sieve" prefork=1
# these are only necessary if receiving/exporting usenet via NNTP # these are only necessary if receiving/exporting usenet via NNTP
# nntp cmd="nntpd" listen="nntp" prefork=0 # nntp cmd="nntpd" listen="nntp" prefork=0
...@@ -74,7 +75,7 @@ SERVICES { ...@@ -74,7 +75,7 @@ SERVICES {
# at least one LMTP is required for delivery # at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=0 # lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/lib/cyrus/socket/lmtp" prefork=0 lmtpunix cmd="lmtpd" listen="/var/lib/cyrus/socket/lmtp" prefork=1
# this is requied if using socketmap # this is requied if using socketmap
# smmap cmd="smmapd" listen="/var/lib/cyrus/socket/smmap" prefork=0 # smmap cmd="smmapd" listen="/var/lib/cyrus/socket/smmap" prefork=0
...@@ -309,7 +310,7 @@ autocreate_sieve_folders: Drafts | Sent | Junk | Trash ...@@ -309,7 +310,7 @@ autocreate_sieve_folders: Drafts | Sent | Junk | Trash
# # # #
# When this option is not defined, no default sieve filter is created. # When this option is not defined, no default sieve filter is created.
# The file must be readable by the Cyrus daemon. # The file must be readable by the Cyrus daemon.
#autocreate_sieve_script: <none> autocreate_sieve_script: /etc/default/sieve
# Autocreate_sieve_script_compile # Autocreate_sieve_script_compile
# ------------------------------- # -------------------------------
...@@ -387,3 +388,14 @@ smmap 2004/tcp # Cyrus smmapd (quota check) service ...@@ -387,3 +388,14 @@ smmap 2004/tcp # Cyrus smmapd (quota check) service
csync 2005/tcp # Cyrus replication service csync 2005/tcp # Cyrus replication service
endef endef
export SERVICES export SERVICES
default-sieve:
define DEFAULT_SIEVE
require "fileinto";
if header :is "X-Spam-Flag" "Yes"
{
fileinto "Junk";
}
endef
export DEFAULT_SIEVE
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment