This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
hannibal:cyrus_with_users_in_files [2013/11/10 01:43] Luc Nieland |
hannibal:cyrus_with_users_in_files [2013/12/18 12:54] (current) Luc Nieland |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | + | verplaatst | |
- | =====Cyrus IMAP-server (mail-store)===== | + | |
- | + | ||
- | Below a configuration with the config and user-info in files on the system. | + | |
- | + | ||
- | + | ||
- | ====Installation==== | + | |
- | + | ||
- | apt-get install cyrus-admin-2.4 cyrus-common-2.4 cyrus-clients-2.4 cyrus-doc-2.4 cyrus-imapd-2.4 sasl2-bin libcyrus-imap-perl24 libsasl2-modules | + | |
- | + | ||
- | + | ||
- | + | ||
- | Extra stuff: | + | |
- | apt-get install postfix binutils xfsprogs | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | ====Configuration==== | + | |
- | + | ||
- | The configuration below, creates an IMAP-server with listener on port 143 and 993. The 143 is configured to do only TLS (allowplaintext: 0). For debugging, this can be set to 'yes'. | + | |
- | + | ||
- | + | ||
- | /etc/default/saslauthd | + | |
- | + | ||
- | <code> | + | |
- | START=yes | + | |
- | DESC="SASL Authentication Daemon" | + | |
- | NAME="saslauthd" | + | |
- | MECHANISMS="sasldb" | + | |
- | MECH_OPTIONS="" | + | |
- | THREADS=5 | + | |
- | OPTIONS="-c -m /var/run/saslauthd" | + | |
- | </code> | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | /etc/cyrus.conf | + | |
- | + | ||
- | <code> | + | |
- | START { | + | |
- | + | ||
- | recover cmd="/usr/sbin/cyrus ctl_cyrusdb -r" | + | |
- | delprune cmd="/usr/sbin/cyrus expire -E 3" | + | |
- | tlsprune cmd="/usr/sbin/cyrus tls_prune" | + | |
- | } | + | |
- | SERVICES { | + | |
- | imap cmd="imapd -U 30" listen="imap" prefork=0 maxchild=100 | + | |
- | imaps cmd="imapd -s -U 30" listen="imaps" prefork=0 maxchild=100 | + | |
- | lmtp cmd="lmtpd -a 10.11.12.13" listen="0.0.0.0:24" prefork=0 maxchild=20 | + | |
- | sieve cmd="timsieved" listen="localhost:sieve" prefork=0 maxchild=100 | + | |
- | notify cmd="notifyd" listen="/var/run/cyrus/socket/notify" proto="udp" prefork=1 | + | |
- | } | + | |
- | EVENTS { | + | |
- | checkpoint cmd="/usr/sbin/cyrus ctl_cyrusdb -c" period=30 | + | |
- | delprune cmd="/usr/sbin/cyrus expire -E 3" at=0401 | + | |
- | tlsprune cmd="/usr/sbin/cyrus tls_prune" at=0401 | + | |
- | } | + | |
- | </code> | + | |
- | + | ||
- | + | ||
- | + | ||
- | /etc/imapd.conf | + | |
- | + | ||
- | <code> | + | |
- | configdirectory: /var/lib/cyrus | + | |
- | proc_path: /run/cyrus/proc | + | |
- | mboxname_lockpath: /run/cyrus/lock | + | |
- | defaultpartition: default | + | |
- | partition-default: /var/spool/cyrus/mail | + | |
- | partition-news: /var/spool/cyrus/news | + | |
- | newsspool: /var/spool/news | + | |
- | altnamespace: no | + | |
- | unixhierarchysep: no | + | |
- | lmtp_downcase_rcpt: yes | + | |
- | admins: cyrus | + | |
- | allowanonymouslogin: no | + | |
- | popminpoll: 1 | + | |
- | autocreatequota: 0 | + | |
- | umask: 077 | + | |
- | sieveusehomedir: false | + | |
- | sievedir: /var/spool/sieve | + | |
- | hashimapspool: true | + | |
- | allowplaintext: 0 | + | |
- | sasl_mech_list: PLAIN LOGIN | + | |
- | sasl_pwcheck_method: saslauthd | + | |
- | sasl_auto_transition: no | + | |
- | tls_cert_file: /etc/cyrus/ssl/imap.example.com_pub-key-cert.pem | + | |
- | tls_key_file: /etc/cyrus/ssl/imap.example.com_priv-key.pem | + | |
- | tls_ca_file: /etc/cyrus/ssl/ExamplecomCA_pub-key-ca-cert.pem | + | |
- | tls_ca_path: /etc/ssl/certs | + | |
- | tls_session_timeout: 1440 | + | |
- | tls_cipher_list: TLSv1+HIGH:!aNULL:@STRENGTH | + | |
- | lmtpsocket: 0.0.0.0:24 | + | |
- | idlesocket: /var/run/cyrus/socket/idle | + | |
- | notifysocket: /var/run/cyrus/socket/notify | + | |
- | syslog_prefix: cyrus | + | |
- | </code> | + | |
- | + | ||
- | + | ||
- | Note: make sure the imap-cert, imap-key and CA-cert files are readable for the operatingsystem-user cyrus. | + | |
- | + | ||
- | + | ||
- | Create imap-users with: | + | |
- | + | ||
- | saslpasswd2 -c cyrus | + | |
- | + | ||
- | + | ||
- | Check the useraccountlist with: | + | |
- | + | ||
- | sasldblistusers2 | + | |
- | + | ||
- | + | ||
- | And create mailboxes with: | + | |
- | + | ||
- | su - cyrus | + | |
- | cyradm localhost | + | |
- | cm user.cyrus | + | |
- | quit | + | |
- | exit | + | |
- | + | ||