Cyrus: Difference between revisions

From Objectif Client Inc
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 40: Line 40:


=== List mailboxes ===
=== List mailboxes ===
<syntaxhighlight lang="bash">connect localhost</syntaxhighlight>
* Login
<syntaxhighlight lang="bash">connect localhost</syntaxhighlight>
<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 ==
== Trouble shooting ==

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

  1. Add Cyrus user to group ssl-cert same group as privat key /etc/ssl/private/ssl-cert-snakeoil.key
  2. /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