Cyrus: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Installation == Install Cyrus Package <pre>apt-get install cyrus-admin cyrus-clients cyrus-common cyrus-doc cyrus-imapd cyrus-nntpd cyrus-pop3d cyrus-sasl2-doc libcyrus-im...") |
|||
(12 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== Installation == | == Installation == | ||
Install Cyrus Package | === Install packages === | ||
==== Install Cyrus Package ==== | |||
<syntaxhighlight lang="bash">apt-get install cyrus-admin cyrus-clients cyrus-common cyrus-doc cyrus-imapd cyrus-nntpd cyrus-pop3d cyrus-sasl2-doc libcyrus-imap-perl</syntaxhighlight> | |||
==== Install Sasl auth ==== | |||
<syntaxhighlight lang="bash">libauthen-sasl-perl libgsasl7 libsasl2-2 libsasl2-modules libsasl2-modules-db sasl2-bin</syntaxhighlight> | |||
< | === Validate / Adjust the configuration === | ||
==== /etc/default/saslauthd ==== | |||
<syntaxhighlight lang="bash"> | |||
START=yes | |||
##Postfix Rooted | |||
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd" | |||
</syntaxhighlight> | |||
==== /etc/imapd.conf ==== | |||
<syntaxhighlight lang="bash"> | |||
admins: cyrus | |||
sasl_mech_list: PLAIN LOGIN | |||
defaultdomain: objclt.com | |||
sasl_pwcheck_method: saslauthd | |||
tls_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem | |||
tls_key_file: /etc/ssl/private/ssl-cert-snakeoil.key | |||
</syntaxhighlight> | |||
==== /etc/cyrus.conf ==== | |||
<syntaxhighlight lang="bash"> | |||
imaps cmd="imapd -s -U 30" listen="imaps" prefork=0 maxchild=100 | |||
squatter_1 cmd="/usr/bin/nice -n 19 /usr/sbin/cyrus squatter -r" period=120 | |||
</syntaxhighlight> | |||
=== Validate Security === | |||
# Add Cyrus user to group ssl-cert same group as privat key /etc/ssl/private/ssl-cert-snakeoil.key | |||
# /etc/sasldb2 should be owned by cyrus | |||
=== Test configuration === | |||
<syntaxhighlight lang="bash">cyradm --user cyrus --auth login localhost -tls</syntaxhighlight> | |||
=== List mailboxes === | |||
* Login | |||
<syntaxhighlight lang="bash">cyradm --auth PLAIN --user cyrus localhost</syntaxhighlight> | |||
*Mailbox List | |||
<syntaxhighlight lang="bash">lm</syntaxhighlight> | |||
* Create Mailbox | |||
<syntaxhighlight lang="bash">cm user.myself</syntaxhighlight> | |||
* Change ACL to delete a mailbox | |||
<syntaxhighlight lang="bash">sam user.myself cyrus c</syntaxhighlight> | |||
* Delete Mailbox | |||
<syntaxhighlight lang="bash">dm user.myself</syntaxhighlight> | |||
== Trouble shooting == | |||
===Reconstruct mailbox=== | |||
* Under cyrus run (replace username by the user) | |||
<pre> | |||
/usr/lib/cyrus/bin/reconstruct -r -f -O user.username | |||
</pre> | |||
=== lmptunix ending abormal === | |||
* Try to reset Database (After Disk full) | |||
<pre> | |||
service cyrus-imapd stop | |||
rm /var/lib/cyrus/tls_sessions.db* | |||
rm /var/lib/cyrus/deliver.db* | |||
rm /var/lib/cyrus/db/* | |||
service cyrus-imapd start | |||
</pre> |
Latest revision as of 22:48, 7 January 2024
Installation
Install packages
Install Cyrus Package
apt-get install cyrus-admin cyrus-clients cyrus-common cyrus-doc cyrus-imapd cyrus-nntpd cyrus-pop3d cyrus-sasl2-doc libcyrus-imap-perl
Install Sasl auth
libauthen-sasl-perl libgsasl7 libsasl2-2 libsasl2-modules libsasl2-modules-db sasl2-bin
Validate / Adjust the configuration
/etc/default/saslauthd
START=yes
##Postfix Rooted
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"
/etc/imapd.conf
admins: cyrus
sasl_mech_list: PLAIN LOGIN
defaultdomain: objclt.com
sasl_pwcheck_method: saslauthd
tls_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem
tls_key_file: /etc/ssl/private/ssl-cert-snakeoil.key
/etc/cyrus.conf
imaps cmd="imapd -s -U 30" listen="imaps" prefork=0 maxchild=100
squatter_1 cmd="/usr/bin/nice -n 19 /usr/sbin/cyrus squatter -r" period=120
Validate Security
- Add Cyrus user to group ssl-cert same group as privat key /etc/ssl/private/ssl-cert-snakeoil.key
- /etc/sasldb2 should be owned by cyrus
Test configuration
cyradm --user cyrus --auth login localhost -tls
List mailboxes
- Login
cyradm --auth PLAIN --user cyrus localhost
- Mailbox List
lm
- Create Mailbox
cm user.myself
- Change ACL to delete a mailbox
sam user.myself cyrus c
- Delete Mailbox
dm user.myself
Trouble shooting
Reconstruct mailbox
- Under cyrus run (replace username by the user)
/usr/lib/cyrus/bin/reconstruct -r -f -O user.username
lmptunix ending abormal
- Try to reset Database (After Disk full)
service cyrus-imapd stop rm /var/lib/cyrus/tls_sessions.db* rm /var/lib/cyrus/deliver.db* rm /var/lib/cyrus/db/* service cyrus-imapd start