Commit 036dfefb authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

/run is not safe to store unix sockets - use /var/lib/cyrus/socket instead

parent bb3a21c9
......@@ -35,13 +35,12 @@ all: cyrus-config imapd-config cyrus-imapd-service services
chown cyrus:mail /var/lib/cyrus/server.pem
sudo -u cyrus cyrus-imapd-3.2.3/tools/mkimap
@echo "d /run/cyrus 755 cyrus mail -" > /usr/lib/tmpfiles.d/cyrus.conf
@echo "d /run/cyrus/socket 750 cyrus mail -" > /usr/lib/tmpfiles.d/cyrus-socket.conf
@echo "$$CYRUS_IMAPD_SERVICE" > /lib/systemd/system/cyrus-imapd.service
systemctl enable cyrus-imapd.service
if [ -f "/etc/mail/sendmail.mc" ]; then \
cd /etc/mail ; \
sed -i "x;/./{x;b};x;/^MAILER(/h;//idefine(\`confLOCAL_MAILER', \`cyrusv2')dnl" sendmail.mc ; \
sed -i "x;/./{x;b};x;/^MAILER(/h;//idefine(\`CYRUSV2_MAILER_ARGS',\`FILE /run/cyrus/socket/lmtp')dnl" sendmail.mc ; \
sed -i "x;/./{x;b};x;/^MAILER(/h;//idefine(\`CYRUSV2_MAILER_ARGS',\`FILE /var/lib/cyrus/socket/lmtp')dnl" sendmail.mc ; \
echo "MAILER(\`cyrusv2')dnl" >> sendmail.mc ; \
m4 m4/cf.m4 sendmail.mc > sendmail.cf ; \
fi
......@@ -56,7 +55,7 @@ START {
recover cmd="ctl_cyrusdb -r"
}
# UNIX sockets start with a slash and are put into /run/cyrus/socket
# UNIX sockets start with a slash and are put into /var/lib/cyrus/socket
SERVICES {
# add or remove based on preferences
imap cmd="imapd" listen="imap" prefork=0
......@@ -75,13 +74,13 @@ SERVICES {
# at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/run/cyrus/socket/lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/lib/cyrus/socket/lmtp" prefork=0
# this is requied if using socketmap
# smmap cmd="smmapd" listen="/run/cyrus/socket/smmap" prefork=0
# smmap cmd="smmapd" listen="/var/lib/cyrus/socket/smmap" prefork=0
# this is required if using notifications
# notify cmd="notifyd" listen="/run/cyrus/socket/notify" proto="udp" prefork=1
# notify cmd="notifyd" listen="/var/lib/cyrus/socket/notify" proto="udp" prefork=1
}
EVENTS {
......@@ -153,9 +152,9 @@ sievedir: /var/spool/sieve
## Important: KEEP THESE IN SYNC WITH cyrus.conf
###################################################################
lmtpsocket: /run/cyrus/socket/lmtp
idlesocket: /run/cyrus/socket/idle
notifysocket: /run/cyrus/socket/notify
lmtpsocket: /var/lib/cyrus/socket/lmtp
idlesocket: /var/lib/cyrus/socket/idle
notifysocket: /var/lib/cyrus/socket/notify
# Syslog prefix. Defaults to cyrus (so logging is done as cyrus/imap
# etc.)
......
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