Commit 24114944 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Configured saslauthd service

parent 9b06b768
all:
all: saslauthd-service saslauthd-service
tar xf cyrus-sasl-2.1.27.tar.gz
cd cyrus-sasl-2.1.27 && ./configure --prefix=/usr --sysconfdir=/etc --enable-auth-sasldb --with-dbpath=/var/lib/sasl/sasldb2 --with-saslauthd=/var/run/saslauthd --with-ldap
$(MAKE) -C cyrus-sasl-2.1.27
......@@ -7,5 +7,65 @@ all:
cd cyrus-sasl-2.1.27 && install -v -m644 saslauthd/LDAP_SASLAUTHD /usr/share/doc/cyrus-sasl-2.1.27
cd cyrus-sasl-2.1.27 && install -v -m644 doc/html/*.html /usr/share/doc/cyrus-sasl-2.1.27/html
cd cyrus-sasl-2.1.27 && install -v -dm700 /var/lib/sasl
@echo "$$SASLAUTHD_CONFIG" > /etc/default/saslauthd
@echo "d /run/saslauthd 755 root root -" > /usr/lib/tmpfiles.d/saslauthd.conf
@echo "$$SASLAUTHD_SERVICE" > /lib/systemd/system/saslauthd.service
systemctl enable saslauthd.service
rm -rf cyrus-sasl-2.1.27
saslauthd-service:
define SASLAUTHD_SERVICE
[Unit]
Description=Cyrus SASL authentication daemon
[Service]
Type=forking
EnvironmentFile=/etc/default/saslauthd
ExecStart=/usr/sbin/saslauthd -a $$MECHANISMS -n $$THREADS $$MECH_OPTIONS $$SASLAUTHD_OPTS
PIDFile=/run/saslauthd/saslauthd.pid
[Install]
WantedBy=multi-user.target
endef
export SASLAUTHD_SERVICE
saslauthd-config:
define SASLAUTHD_CONFIG
# Begin /etc/default/saslauthd
# Which authentication mechanisms should saslauthd use? (default: shadow)
#
# Available options in this package:
# getpwent -- use the getpwent() library function
# kerberos5 -- use Kerberos 5
# pam -- use PAM
# rimap -- use a remote IMAP server
# shadow -- use the local shadow password file
# sasldb -- use the local sasldb database file
# ldap -- use LDAP (configuration is in /etc/saslauthd.conf)
#
# Only one option may be used at a time. See the saslauthd man page
# for more information.
#
# Example: MECHANISMS="shadow"
MECHANISMS="sasldb"
# Additional options for this mechanism. (default: none)
# See the saslauthd man page for information about mech-specific options.
# Note: Specify "-O options" in the following variable or saslauthd will fail.
MECH_OPTIONS=""
# How many saslauthd processes should we run? (default: 5)
# A value of 0 will fork a new process for each connection.
THREADS=5
# Other options (default: -c -m /var/run/saslauthd)
# Note: You MUST specify the -m option or saslauthd won't run!
#
# See the saslauthd man page and the output of 'saslauthd -h' for general
# information about these options.
SASLAUTHD_OPTS="-c -m /var/run/saslauthd"
# End /etc/default/saslauthd
endef
export SASLAUTHD_CONFIG
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