Версия для печати
Архив документации на OpenNet.ru /
Раздел "Настройка почты (sendmail, postfix, qmail)"
(Многостраничная версия)
Установка и настройка Cyrus IMAP Server
Internet Message Access Protocol (IMAP) является стандартным
протоколом Internet для доступа к сообщениям (почта, новости и т.
д.). IMAP хранит сообщения и обеспечивет к ним доступ.
Файл doc/questions.html содержит список вопросов которых анм не задают, но на которые мы хотели бы ответить; doc/faq.html содержит
некоторые ответы, над которыми нам пришлось задуматься.
Пожалуйста, обращайтесь к Sending Feedback
если вы хотите узнать о багах, особенностях или патчах.
Для уточнения конкретных изменений смотрите файл
doc/changes
в дистрибутиве.
Перевод: Domas I Andrey
Оригинал: cyrus.org.ru
Содержание
Другие материалы
Вот некоторое ПО, которое может работать вместе
с Cyrus'ом. Этот софт либо поддерживается либо не поддерживается CMU, это Вы можете
уточнить у распространителей(?).
-
Websieve, основаный на WWW интерфейс для управления скриптами Sieve.
-
Sendmail, самый распространенный и популярный MTA.
-
Postfix, главный конкурент предыдущего MTA.
last modified: $Date: 2002/11/14 16:23:04 $
Назад
Changes to the Cyrus IMAP Server
Changes to the Cyrus IMAP Server since 2.1.15
- Clean up a timeout bug in fud proxy code.
- Fix a number of bugs with the murder and altnamespace handling.
- Detect fork() failures when launching sendmail in lmtpd
- Enable telemetry logging in lmtpd/lmtpproxyd
- Allow APOP to be disabled via an imap option
- Fix reconstruct to handle missing cyrus.header files
- Add the quotawarnkb option
- Update MUPDATE to look for IANA assigned port numbers.
Changes to the Cyrus IMAP Server since 2.1.14
- Correct a potential DOS attack in the fud daemon.
- Arbitron now works again
- Telemetry logging for mupdate
- Duplicate Suppression logging for redirect sieve actions
- A number of bugs in reconstruct have been fixed. also added the -p and -x
options
- Better stubbing out of user_deleteacl
- No longer log any shutdown() failures
- Improved IPv6 support (for systems with two getnameinfo implementations)
- Misc Documentation Improvements
Changes to the Cyrus IMAP Server since 2.1.13
- Be more forgiving in the parsing of MIME boundary headers, specifically
those generated by Eudora where the outer boundaries are substrings of
the inner boundaries. This feature can be disabled by enabling the
rfc2046_strict option.
- Allow cyradm to handle aggregate mailbox sets for ACL and DELETE
operations.
- Add a lmtp_downcase_rcpt option to force the lowercasing of
recipient addresses (Henrique de Moraes Holschuh <hmh@debian.org>).
- Include more MIME headers in sieve rejection notices
- Add an mbexamine command for debugging purposes
- LMTP will now fatal error if we cannot initialize the duplicate
delivery database.
- Continued audit by Security Appraisers and Bynari
- Correctly terminate the processes by calling service_abort even on
successful exit (helps to fix a db3 lockers problem)
- Fix some murder+altnamespace/unixhiersep issues
- Fix imclient's handling of literals.
- Add support for the windows-1256 character set
- Don't log 'could not shut down filedescriptor' messages when the
socket is already not connected
- Now include a script to convert sieve script names to the altnamespace
format
- Added a --with-extraident configure option to make it easier
to set the extra version information that is compiled into the binary.
- Minor build fixes.
- Minor other bug fixes.
Changes to the Cyrus IMAP Server since 2.1.12
- Add maxfds= option in cyrus.conf
- "The shutdown() Patch" by
Henrique de Moraes Holschuh <hmh@debian.org> and
Jeremy Howard <jhoward@fastmail.fm>
- Now report both built-with and running-with OpenSSL versions
- Misc other small bugfixes
- Security Appraisers and Bynari review of the majority of the modules
in imap/
Changes to the Cyrus IMAP Server since 2.1.11
- Master now will forcibly exit if a service is not executable
- Master now has a daemon mode and pidfile support (-d and -p options)
- Berkeley DB Configuration methods have changed. Hopefully they're
more generic now. You can still use --with-dbdir, or you can use
--with-bdb-libdir and --with-bdb-incdir
- timsieved now handles usernames with dots (when unixhierarchysep is active)
- tugowar has been removed from the distribution.
- Squatter now has an option to skip unmodified mailboxes.
- Properly hash username to remove a user's sieve scripts when their INBOX
is removed.
- Reset output buffer when prot_flush returns EOF.
- Minor Makefile improvements with use of $(srcdir)
- Remotepurge improvement for empty mailboxes
- Fix for AFS overwriting the canonicalized username in ptloader
- Security audit of imapd.c performed by SecurityAppraisers and Bynari
Changes to the Cyrus IMAP Server since 2.1.10
- Fixed some potential buffer overflows in the sieve code, as well
as a pre-login buffer overflow in the IMAP parsing code.
- ipurge can now skip flagged messages
- Fix a problem with the flat backend and tracking new files
- Fix a problem with the memory pool routines on 64-bit machines
Changes to the Cyrus IMAP Server since 2.1.9
- support Berkley DB 4.1
- more portable use of errno throughout
- timsieved now does telemetry logging
- libcyrus.a no longer supplies fs_get() and fs_give()
- fixed use of errno on some platforms
- fixed a bug in quota tracking across RENAMEs
- fixed an off-by-one error in the prot layer
- add support for character sets: iso-8859-15 and windows-1252
- Add the "at" method of running EVENTs to master, also has the side
effect of events running every period minutes, intead of every period +
run time minutes.
- timsieved version now tracks with IMAPd version
- minor documentation updates
Changes to the Cyrus IMAP Server since 2.1.8
- Fix a strlcpy() off-by-one error.
- Better handling of errors in connecting to LMTP servers for deliver and
lmtpproxyd.
- Fix bug in pop3proxyd's pop3s handling.
- Fix Exim install documentation.
Changes to the Cyrus IMAP Server since 2.1.7
- Fix a severe locking problem during failed CREATEs
- Change default locking method to fcntl from flock
- Don't cleanup the original mailbox during a RENAME while holding the
mailbox list lock
- Quoting fixes in cyradm
- Small pathname fix in rehash script
Changes to the Cyrus IMAP Server since 2.1.6
- Correct some minor version number errors.
Changes to the Cyrus IMAP Server since 2.1.5
- Better locking of the mailbox list during mupdate operations for
CREATE and RENAME
- Permissions fixes for annotations.
- pop3proxyd now does telemetry logging
- Cleanup a number of leaks in the murder code
- Correct semantics of our provided strlcpy(). Fix places where strlcpy()
was being used incorrectly.
- Correct a significant memory leak in the memory pool routines
- OpenSSL is now handled correctly for the perl modules
- Small documentation cleanups
- The normal assortment of small bugfixes
Changes to the Cyrus IMAP Server since 2.1.4
- Sieve is no longer dependent on duplicate delivery suppression
(it still uses the duplicate delivery database however).
- Sieve now supports draft-segmuller-sieve-relation-02.txt
- imtest now includes all the functionality previously
kept in pop3test, lmtptest, smtptest, and mupdatetest. imtest will
notice if it is invoked with one of these names and do the right
thing. The -P flag can be used to force a particular protocol. As
part of this, the default install location for mupdatetest has changed
to be the same as the other test utilities. imtest also
includes new MANAGESIEVE functionality (sivtest) as well as the
ability to reconnect to the same server multiple times (useful for testing
SSL/TLS session caching and DIGEST-MD5 fast reauth).
- snmpgen generates stubbed out code so we don't waste resources on
something that just doesn't work. At some point in time, we'll make it
work again as it would be useful to gather aggregate statistics on
what commands are being used so we can better tune the server. This
change closes bug #1191. New bug 1267 opened to re-enable the feature.
- Added the chk_cyrus program to help point out missing message
files and/or mailboxes
- ANNOTATEMORE improvements. Server annotation support has been added.
We are also now using the /vendor/cmu/cyrus-imapd hierarchy.
The "info" command in cyradm now returns annotations for the given mailbox
(provided that ANNOTATEMORE support is compiled into the server)
- The RENAME command has been almost entirely rewritten. Now we rely
on mailbox-level locking instead of locking the entire mailboxes file
for the duration of the rename. ctl_cyrusdb -r now also
cleans up "reserved" mailboxes that may appear in the event of a crash.
-
ctl_mboxlist can now dump only a particular partition
- The configuration subsystem now uses a hash table to speed up lookups
of options. Additionally, the hash table implementation has been updated
to possibly take advantage of memory pools.
- Many bugfixes related to the Cyrus Murder. Includes improvments to
subscription handling as well as correct merging of seen state on
mailbox moves.
- Can now configure an external debugger (debug_command option
in imapd.conf.
- Misc. autoconf-related fixes (most notably those related to sasl_checkapop
and O_DSYNC).
- Misc. locking-related fixes.
- Security fixes related to handling large literals in getxstring(), as
well as correct usage of layers in timsieved.
Changes to the Cyrus IMAP Server since 2.1.3
- All "MAIL" and "SIEVE" notifications are now handled by
notifyd which is a daemon that supports multiple notification
methods. The mailnotifier and sievenotifier options
have been added to /etc/imapd.conf to configure
notifications. (Ken Murchison)
- Many feature enhancements and bugfixes for the Cyrus Murder. The
code now supports live (but not transparent) moving of mailboxes from
one server to another.
- Some warning fixes.
- fdatasync() is no longer required.
- Fixed a bug in imap/append.c that would show itself if a
message was being delivered to five or more different
partitions.
- Deliveries now don't create a redudant temporary file using
tmpfile(); the staging directory is used instead. (Ken
Murchison)
- Fix a possible crashing bug in squatter. (Ken
Murchison)
- Deleting a user now also removes their Sieve scripts.
- cyrusdb_skiplist: release locks during iteration.
Should prevent denial of service attacks and possibly increase
performance.
- cyrusdb_skiplist: introduce a new mode using
O_DSYNC writes which is possibly faster on Solaris.
Currently off (it seems to hurt performance on Linux).
- master has preliminary code to avoid forking
storms.
- sieveshell should now loop through all available SASL
mechanisms before conceding defeat.
- sieveshell can now upload a file to a different name.
Changes to the Cyrus IMAP Server since 2.1.2
- fud now runs from the Cyrus master process; more generally, the
Cyrus master process can deal with UDP services. (Amos Gouaux,
amos@utdallas.edu)
- Sieve has been updated to be compliant with RFC 3028 and
draft-martin-sieve-notify-01. All notify actions and any
fileinto and/or redirect actions using stringlists
will have to be updated/changed.
- added cvt_cyrusdb for quick conversions between
different cyrusdb backends.
- fixed a bug in the Sieve header cache, where legal header names
were being rejected.
- many Murder-related fixes
- suppress a bogus TLS session reuse DBERROR message
- make the list of acceptable TLS ciphers configurable in
/etc/imapd.conf
- cyrusdb_skiplist fixes; it's now suitable for using in
production environments though there are still performance problems
outstanding
Changes to the Cyrus IMAP Server since 2.1.1
- now compatible with Berkeley DB4 (Larry M. Rosenbaum,
lmr@ornl.gov)
- timsieved now supports proxying via loginuseacl (Amos
Gouaux, amos@utdallas.edu)
- Sieve vacation now does a case-insensitive comparison of
:addresses
- Warning-related bug fixes from Henrique de Moras Holschuh
hmh@debian.org
- automatic archival of db3 files so that filesystem backups are
always consistent (Ken Murchison, ken@oceana.com)
- added a skiplist database backend, still needs more testing
- further work on the Cyrus Murder
- fixed bug in remotepurge dealing with mailboxes with
characters that need to be escaped inside quoted-strings
- Cyrus::IMAP::Admin now supports referrals
- cyradm, via Cyrus::IMAP::Shell, now can remove
quotaroots
- timsieved, sieveshell, and the MANAGESIEVE
protocol extended with referrals
Changes to the Cyrus IMAP Server since 2.1.0
- now compatible with Cyrus SASL 2.1.0
- fixed a problem with LMTP AUTH and unix domain sockets
- make deleting users faster
- add a "-n" switch to remotepurge
- cyradm now does implicit SASL authorization
- fix for Sieve :matches comparator
Changes to the Cyrus IMAP Server since 2.0.16
- migrated to SASLv2 (Rob Siemborski)
- altnamespace: it is now possible to display user mailboxes as
siblings to the INBOX at the top-level (Ken Murchison)
- unixhierarchysep: it is now possible possible to use slash as
the hierarchy seperator, instead of a period. (Ken Murchison,
inspired by David Fuchs, dfuchs@uniserve.com)
- SSL/TLS session caching (Ken Murchison)
- support for IMAP CHILDREN & LISTEXT extensions (Ken
Murchison, work in progress)
- check recipient quota & ACL at time of RCPT TO: in
lmtpd (Ken Murchison)
- support for LMTP STARTTLS & SIZE extensions (Ken
Murchison)
- unified deliver.db, using cyrusdb interface, hopefully
improving concurrency and performance (Ken Murchison)
- fixed STORE FLAGS () bug (Ken Murchison)
- fixed SEARCH SUBJECT vs. SEARCH HEADER SUBJECT bug (Ken
Murchison)
- users without an INBOX can have subscriptions (Ken Murchison;
noticing a trend here?)
- added cyrusdb_db3_nosync backend, used for duplicatedb and
session cache, to postpone non-critical writes. (Ken
Murchison)
- support for STARTTLS and AUTH=ANONYMOUS for timsieved (Ken
Murchison)
- do setgid and initgroups in master (as urged by several
people)
- added more config info to IMAP ID (in a vain attempt to improve
debugging)
- configure now checks for DB3.3
- SQUAT (Rob O'Callahan, roc@cs.cmu.edu)
- change SEARCH HEADER x to SEARCH x utilizing
internal cache where possible (Rob O'Callahan,
roc@cs.cmu.edu)
- an improved directory hashing option (Gary Mills,
mills@cc.UManitoba.CA)
- use of EGD for SSL/TLS (Amos Gouaux,
amos@utdallas.edu)
- separate certs/keys for services (Henning P. Schmiedehausen,
hps@intermeta.de)
- ability to force ipurge to traverse personal folders (Carsten
Hoeger, choeger@suse.de)
- fixed zero quota bugs in cyradm (Leena Heino,
liinu@uta.fi)
- ignore trailing whitespace in imapd.conf
- Received: header (with TLS and AUTH info)
- added '-i' switch to sendmail command line for SIEVE reject,
redirect and vacation
- small fixes to notify_unix
- added "duplicatesuppression" switch to imapd.conf for
enabling/disabling duplicate delivery suppression (Birger Toedtmann,
birger@takatukaland.de)
Changes to the Cyrus IMAP Server since 2.0.15
- fixed a longstanding bug in quota that would affect
people with unusual top-level hierarchy, fix by John Darrow,
John.P.Darrow@wheaton.edu.
- some important fixes to db3 interface code, by Walter Wong
wcw@cmu.edu, prompted by complaints from Scott Adkins
adkinss@ohio.edu.
- fixed some memory leaks in imclient and in the Perl IMAP
module, prompted by Toni Andjelkovic toni@soth.at.
- fixed a longstanding authentication error in the Perl IMAP
module, should remove pesky extra Password: prompt.
- fixed some allocation bugs in the managesieve perl module.
Changes to the Cyrus IMAP Server since 2.0.14
- fixed memory management bugs in imapd, lmtpd
that were being hit due to the connection reuse code and causing
subtle and annoying problems.
- we now clean up better when deleting a user
- fixed an endian bug in ipurge
-
pop3d now can also reuse processes.
- fix a bug in imclient that would strike when
cyradm specifies a mechanism on the command-line. (SASL
mechanism names aren't case sensitive.)
- fix some bugs in handling SIGHUP in master
- fix a couple of goofs in Admin.pm
Changes to the Cyrus IMAP Server since 2.0.13
- fixed a silly bug with reusing SSL connections
-
lmtpd can now service multiple clients in sequence,
hopefully improving performance
- changed how Berkeley db databases are opened, hopefully
lessening the chance of deadlock and improving performance
- fixed a couple of memory leaks
- lessened the chance of a race condition during
index_check()
Changes to the Cyrus IMAP Server since 2.0.12
- refactored code so less duplication
- added alternate config file for partial virtual domain
support
-
pop3d can now disable USER/PASS commands.
- STARTTLS now accepts a SSLv23 hello but doesn't allow SSLv23 to
be negotiated.
-
imtest no longer buffers to aid use as an automated
layer.
-
master now supports maximum number of service
processes via the "maxchild" modifier.
- fixed a bug in the Sieve string lexer.
- one imapd process can now service multiple clients in
sequence, eliminating a large number of forks.
Changes to the Cyrus IMAP Server since 2.0.11
- portability fixes involving setrlimit()
- fixed compiler warnings
- the STARTTLS command will only accept TLSv1 now, not SSLv2/v3.
The imaps port is unaffected by this change.
-
timsieved no longer returns garbage strings.
Changes to the Cyrus IMAP Server since 2.0.9
- some small memory savings
- the "fud" daemon once again works correctly
- the IDLE extension now uses signals correctly
- problems with libwrap have been resolved
-
imapd and pop3d now log connections protected
via TLS.
- efficiency improvements when searching for a particular
message-id
- fixed an envelope-parsing bug affecting SORT and THREAD
- made RENAME keep the same mailbox uniqueid, preserving seen
state across renames
- STOREing flags to multiple messages in one command is now more
efficient
- RENAME now preserves the ACL
- LIST is now as efficient as Cyrus v1.6, modulo Berkeley DB
issues.
- Sieve zephyr notifications are now correct.
- crash in reconstruct now fixed.
- man pages added for cyrus.conf, master,
lmtpd, idled, ctl_mboxlist, and
ctl_deliver.
-
master can now listen on specific interfaces
-
master can now reread /etc/cyrus.conf on
SIGHUP.
-
timsieved now uses symlinks instead of hard
links.
Changes to the Cyrus IMAP Server since 2.0.8
- remembered to update this file
- bug in Cyrus::IMAP perl module affecting cyradm's
setquota fixed
- portability fix with socklen_t
Changes to the Cyrus IMAP Server since 2.0.7
- preliminary implementation of the IDLE extension (Ken
Murchison, ken@oceana.com).
- THREAD=REFERENCES now part of the normal build.
- tweaks to the installation documentation and suggested Sendmail
configuration
- portability fixes and other small bugfixes
- added "-a" flag to lmtpd
- master process can now export statistics about running
processes via UCD SNMP AgentX
- many fixes to Cyrus Murder-related code
- fixes to perl code, especially the Sieve interface. added an
IMSP interface to the perl code, but it still needs work.
Changes to the Cyrus IMAP Server since 2.0.6
- some number of random static variables eliminated, to save on
memory footprint
- recursive RENAME was a little to eager; fixed. RENAME will also
give the client a hint that a sub-RENAME failed. (mostly probably
useful for cyradm, but cyradm doesn't take advantage of it
yet.)
- THREAD=X-JWZ has turned into THREAD=REFERENCES (Ken
Murchison)
- DELETE wasn't failing cleanly in database code; fixed.
- off-by-one bug in seen_db fixed.
- starting/committing/aborting transactions now logged more
correctly in cyrsudb_db3
- master will now accept port numbers instead of just service
names in cyrus.conf. also logs even more verbosely (see bug
#115.)
- libwrap_init() is now inside the loop, since i don't quite
understand the semantics of libwrap calls.
- setquota in cyradm now behaves more sanely (and gives correct
usage message).
- bugfixes to the managesieve client perl api. (still needs
work.)
- small fixes in timsieved.
- added a "make dist" target so i won't dread releases as
much.
Changes to the Cyrus IMAP Server since 2.0.5
- APPEND now honors the \Seen flag.
- mailboxes file can once again be a flat text file.
(compile-time choice)
- subscriptions file can be flat text or berkeley db. likewise
for seen state.
- unfortunately, the format of the mailboxes file has
changed.
- implementation of "JWZ" threading, a first pass on the
forthcoming THREAD=REFERENCES.
- bugfixes in libacap.
- bugfixes in other Murder related functionality.
- removal of dead code.
- will now look in CYRUS_PREFIX/etc/imapd.conf if there's no
/etc/imapd.conf.
- more paranoid implementation of ID.
- more descriptive lmtp errors.
- finished implementation of LMTP 8BITMIME.
- fixed minor bugs in pop3d.
- small test suite for cyrusdb backends added in
lib/test/.
- added -DPERL_POLLUTE to the perl compilation to deal
with Perl 5.6.
- small additions to the Sieve library.
- As usual, owe lots of thanks to Ken Murchison for his hard work
and awesome implementations.
Changes to the Cyrus IMAP Server SINCE 2.0.4
- Now should work with Berkeley DB 3.1, but does not
auto-upgrade 3.0 databases (and, in fact, I haven't written any
upgrade software yet).
- SORT and THREAD should now function correctly.
- Some configure fixes.
- Some fixes for possible race conditions in initializing
services and database structures.
- Some non-gcc compile fixes with structure initialization.
- Some non gcc compile fixes with structure initialization.
Changes to the Cyrus IMAP Server SINCE 2.0.3
- fixed mbpath and ipurge. Thanks to Alain
Turbide for the bug report.
- configure: removed mmap_private.c; it was buggy, and
not worth supporting.
- configure: improvements in detecting libwrap, typos fixed in
detecting libsasl.
- Merged the acapsieve library into libacap.
- improvements to the ACAP API.
- invariant checks added to the skiplist code.
- bugfix in TCL cyradm.
- acapmbox.c: bugfixes in handling acap connections.
- fix the size given for a unix socket address (changes
throughout the code), patch thanks to Vladimir Kravchenko,
jimson@null.ru.
- rewrote deliver to use the generic LMTP API in
lmtpengine.c. Likewise, implemented the client-side API in
lmtpengine.c. (Still need to implement AUTH.)
- added SORT and THREAD support (Ken Murchison,
ken@oceana.com.)
- In checking an APPEND command, we were rejecting valid system
flags and accepting invalid ones.
- minor bug fixes to proxyd.
- large amount of debugging code added to
target-acap.
- build fixes to Perl programs.
- allow plaintext authentication to timsieved.
Changes to the Cyrus IMAP Server in 2.0
- The mailboxes file is now a transaction-protected Berkeley
database.
- The core delivery process has been moved to lmtpd.
deliver is now a simple wrapper to create an LMTP
transaction.
- master process, responsible for spawning services
(imapd, lmtpd, etc.) and for routine
housekeeping. Optionally, it can use libwrap to allow or
deny connections.
- ACAP (Application Configuration Access Protocol) support for
Cyrus Murder: IMAP Aggregator.
- Sieve enhancements: regular expressions, notifications,
automatically setting IMAP flags.
- SNMP (Simple Network Management Protocol) support for
monitoring usage (e.g. number of users logged in) as well as for
instrumenting protocol usage (e.g. number of times CREATE has been
called).
- Perl version of cyradm contributed by Brandon Allbery
(allbery@ece.cmu.edu). Eventually we expect to transition
to the Perl version away from the TCL version.
- Bugfix in modified UTF-7 processing (for mailbox names). Bugfix
in index_searchcacheheader().
- Implemented the extension MULTIAPPEND.
- RENAME is now hierarchical.
- The right that controls whether a mailbox may be deleted is now
"c". (It used to be "d".)
- An additional backend for seen state has been created,
seen_db. It stores seen state in a per-user database.
Changes to the Cyrus IMAP Server Since Version 1.6.20
- Some fixes to the TLS support to gracefully degrade
service.
- Sieve now correctly re-sieves messages that are received with
identical message-ids, but different envelopes. It also obeys
plus-addressing on keep actions. (Fixes by Ken Murchison,
ken@oceana.com.)
- The server wasn't correctly calculating the percentage of quota
used when deciding whether or not to issue a warning.
- Implemented single-instance store: deliver, when using LMTP,
will only store one copy of a message per partition, and hard link
it among multiple users. Sites with a large number of partitions
could see a performance decrease.
Changes to the Cyrus IMAP Server Since Version 1.6.19
- Added STARTTLS support; requires OpenSSL.
- Sieve now uses MDNs to reject messages instead of DSNs,
conforming to the latest Sieve specification. (Ken Murchison)
- The duplicate delivery database expiration (deliver -E) was
deleting all entries; fixed.
- imtest is now a little smarter about parsing the protocol to
avoid synchronization errors prior to authentication.
- timsieved's parser is now written in C; should be no noticeable
changes, but should make compiling it much easier.
Changes to the Cyrus IMAP Server Since Version 1.6.16
- Fix to enclosed message parsing (thanks to John Myers).
- When trying to skip over non-synchronizing literals during
error recovery, the IMAP server never stopped eating. Fixed.
- Added with-sasldir as a configure option.
- Fixed a bug in cyradm when it got the CAPABILITY list.
- Fixed bugs relating to the incomplete SASLfication of
deliver.
- Fixed bugs in deliver relating to duplicate delivery
suppression and Sieve vacation functionality.
- Fixed a memory leak in deliver.
- When looking for SASL options, imapd wasn't defaulting to the
option without the plugin name requesting it. This caused PLAIN
authentications to incorrectly fail.
- Changed the expiration time of pts entries to 3 hours; only
affects sites using krb_pts as the authorization method.
- Fixed some bugs in imclient; mostly affects cyradm.
- Fixed a bug in the Sieve lexer and improved the usefulness of
the Sieve test program.
Changes to the Cyrus IMAP Server Since Version 1.6.13
- An annoying memory management bug in imclient was fixed and
it's efficiency was improved somewhat.
- Added the sieve client (installsieve) and server
(timsieved) for getting sieve scripts onto the server and
managing them once they are there.
- The default Sieve script layout has changed to
sievedir/u/user/default; this supports multiple Sieve scripts per
user with the ability to switch between them.
- Fixed the kerberos-to-local-host bug (patch by Greg Hudson,
ghudson@mit.edu).
- Started changes to deliver to support LMTP AUTH.
- Improved the error messages logged when authentication
fails.
- Fixed a bug dealing with argument processing in the arbitron
program.
- pop3d now correctly supports SASL AUTH.
- imtest will no longer prompt for authentication or
authorization names; instead, it defaults to the current Unix user.
Override on the command line.
- Likewise, cyradm will no longer prompt. It now accepts "-m" to
specify what SASL mechanism to use, and the pwcommand option to
authenticate should once again work when used
non-interactively.
Changes to the Cyrus IMAP Server Since Version 1.6.10
Changes to the Cyrus IMAP Server Since Version 1.6.1-BETA
- cyradm should now work with all mechanisms (it now handles
empty challenges and responses).
- Fixed deliver to deal with arbitrarily long headers
- COPY for non-existent sequence numbers returns NO; this
contrasts to UID COPY, which always returns OK.
- FETCH for non-existent sequence numbers returns NO; this
contrasts to UID FETCH, which always returns OK.
- Fixed a misleading BAD responses to commands that take
sequences.
- Added UIDNEXT untagged response to a SELECT (from
draft-crispin-imapv-07.txt).
- pop3d now correctly passes SASL configuration options to
libsasl.
- imtest now correctly flushes the server's output to the
screen.
- Added more hashing using a simple but stupid algorithm. Now
whenever there is a mailbox access, quota access, or subscription
access, it goes through a hash function. this is done to help
reduce the number of files/directories in any given directory.
- Added the binary mbpath. Given a mailbox name, this
binary will print the filesystem path to that mailbox. This way if
you have multiple partitions and hashing turned out, you don't have
to spend as many mental cycles figuring out where the actual
directory is.
- deliver now checks sieveusehomedir and
sievedir in the config file to determine where to look for
sieve scripts.
- ptloader now has a workaround for afs 3.5.
- clarified an error message in message.c when an unexpected end
of file is encountered.
- fixed some random memory leaks in deliver.
- fixed a fairly major bug in prot_fill. it was performing
incorrectly when reading only a single character.
- fixed a bug in how imtest looked for OK or NO.
- fixed a memory leak in imapd.
- imapd now allows any user (or member of a group) listed in
"proxyservers" to proxy.
Changes to the Cyrus IMAP Server Since Version 1.6.0-BETA
- fixed stupid bug in imapd
- fixed sasl/config.c interaction
- fixed use of stat in imtest
Changes to the Cyrus IMAP Server Since Version 1.5.24
- ANSI C is now required.
- imtest's interface has changed, to allow for SASL
authentication. Sorry, but it had to happen. It now also includes a
timing test (-z) which we use to test the SASL layers.
- imtest no longer uses a non-synchronizing literal with LOGIN,
so it should work against all IMAP servers.
- The prot layer now uses SASL for encryption and authentication.
This changed a large amount of code, and some build
procedures.
- As a side effect of SASL, --enable-static-libraries now doesn't
do anything. We are considering compiling cyrus with libtool to
change this.
- Error codes returned by programs have changed, and programs
return EX_TEMPFAIL far more than they used to. This is because
Sendmail considers most not-EX_TEMPFAIL errors permanent; now, if
it may not be permanent, EX_TEMPFAIL is returned. (See
lib/exitcodes.h.)
- Two bugs fixed: UID FETCH's with no messages in range now
return OK, not BAD. And an obscure bug in LIST case sensitivity is
fixed.
Changes to the Cyrus IMAP Server Since Version 1.5.19
- Most of the charset.c code (and mkchartable.c code) has been
replaced thanks to John Myers).
- Bug fix in message.c to look up headers in the cache when
they're in the cache correctly; thanks to Chris Newman for the
fix.
- Code cleanup here and there (thanks to Bruce Balden).
- Annoying (and confusing) lines in syslog every time a message
was delivered if deliver was compiled using dbm saying that deliver
was "unable to fetch entry" have been removed.
- Content-Disposition lines were being parsed improperly. If they
had no optional arguments, they were being ignored as if they were
syntactically incorrect. This is fixed, but imapd will continue to
serve wrong information unless cyrus.caches are rebuilt (with
reconstruct) for any message that was added to the mailbox before
this bug was fixed.
- The arbitron program now takes a mailbox pattern argument for
the mailbox to run on. The manpage always said it did anyway.
- Uninitialized variable fixed in imapd.c with the shutdown file
code.
- Minor tweaks to purify build config.
- Fix minor memory leak in proc.c where procfname wasn't being
free'd.
- Fix brain fart in auth_krb_pts.c where a CLOSE() was done to a
DB handle BEFORE we access the data read from the DB database. This
means we were copying free'd memory into the groups list. Note this
only affects people using DB, AFS and ptloader.
- Committed minor syslog log level changes in ptloader and
deliver.
- make distclean now does what it's supposed to.
- Possibly misnamed experimental --enable-static-libraries switch
that tries to do a good job of building binaries with whatever
static libraries are availible. If you use this, you do so at your
own risk, and if it fails, we will disavow all knowledge of you and
your team. Good luck, Jim.
- Add optional third argument to imtest for it to take input from
a file. This is a gross hack.
Changes to the Cyrus IMAP Server Since Version 1.5.14
Changes to the Cyrus IMAP Server Since Version 1.5.11
- The CREATE command now ignores a trailing hierarchy delimiter
instead of ignoring the CREATE command.
- UIDPLUS is now always advertised in CAPABILITY and is always
availible. The UIDPLUS extension is a set of optimizations using
UID values instead of sequence numbers and is described in RFC
2359.
- Cyrus no longer rejects messages with 8-bit characters in the
headers. Rather than reject the message, characters with the 8th
bit set are changed to 'X'. Internationalization in headers is
supported by the mechanism specified in RFC 2047 (and RFC
1342).
Changes to the Cyrus IMAP Server Since Version 1.5.10
- If ENABLE_EXPERIMENT is set, the server no longer claims to
support OPTIMIZE-1; instead, it claims to support UIDPLUS. The
Getuids command has been removed since it is not in the UIDPLUS
document (draft-myers-imap-optimize-03.txt).
- The checks for Tcl in configure are much smarter. The configure
script asks tclsh where its configuration lives, then consults the
shell scripts that have that information. This should work with 7.5
or better, which is what the server requires anyway. (All the
previous checks to look for Tcl libraries are gone; now, configure
runs tclsh and asks it where the Tcl libraries are, then runs the
shell scripts that are in that directory. Since the tclConfig.sh
script may not be in that directory, it looks in .. as well.)
- The checks for com_err in configure are a little smarter and
look to see if all the pieces are there before trying to use
them.
- Added support for the NAMESPACE extension (if
--enable-experiment is supplied).
- Added a "reject8bit" switch to imapd.conf. If set to "true",
messages containing 8-bit-set characters in the headers are
rejected (the previous behavior); if set to "false" or left to the
default value, messages containing 8-bit-set characters have these
characters changed to a constant character ('X').
- Added the "fud" program. This is an interm hack designed to
allow allow finger information to be retrieved for cyrus users.
This is experimental and it is not recommend that services be built
arround this feature, since it is likely to be removed in a future
release of the IMAP server.
- Bug fix: User defined flags now work properly.
Changes to the Cyrus IMAP Server Since Version 1.5.2
- Fixed a bug with word alignment on Solaris using Kerberos
compiled with Sun's CC. (Several patches were submitted; thanks to
everyone who did so.)
- Patches from John Myers, including more glob fixes.
- Use the default hash function from DB. Note that this means
that the existing delivered.db and ptscache.db is
NOT compatible with this release. These files should be
removed.
- Provide two debugging programs that dump the databases:
ptdump and dump_deliverdb.
- Multiple changes to ptloader. added a bunch of flags; let it
reauthenticate on its own; added support perl wrapper; added bunch
of debugging information/output; bunch of other cleanups
- The mailboxes file is now closed if it isn't likely to be
referenced, hopefully preventing old mailboxes files from hanging
around in memory as frequently.
- Added a patch from Eric Hagberg to work around a possible
deadlock condition in mboxlist.c where rename isn't atomic.
- Patch from John Myers to get rid of cyrus.seen corruption in
bsearch_mem.
- Patch from John Myers and to allow ISO-8859-1 characters in
mailbox names.
- Makedepend still runs, and still generates warnings, but these
are squirrled away in makedepend.log.
- On mailbox delete, the server will no longer try and unlink
".." and "." as we got a report that it seriously breaks one file
system (even as non-root).
- Added some support for Netscape's very misleading "Administrate
My Mail" menu option in Communicator. Allows for a URL to be set in
imapd.conf for the page to refer users to; needs to be turned on
with --enable-netscapehack at compile time to enable it.
- Bug swap: imtest quotes password with a non-synchronizing
literal in order to allow weird characters like ) in passwords. But
it doesn't look to see if the server supports non-synchronizing
literals.
- If the file "msg/motd" exists, the first line is now
sent to clients upon login.
- Bug fix: to handle BODY[] properly when fetching news articles
(truncation no longer occurs). (thanks to John Prevost)
- The makedepend supplied should now run on Solaris Intel.
(thanks to Chris Newman)
- Added some hacks to pwcheck.c for Linux and Digital Unix where
the default protections on the socket don't allow the cyrus user to
read it. (thanks to Lyndon Nerenberg)
- Bug fix: Flags beginning with \ are system flags and users can
only create the defined flags. The code to do this before was
confused.
- The configure scripts and makefiles have some random
fixes.
- Added a contrib directory for reasons of laziness in collecting
patches, not all of which should be in the distribution.
- ptloader can now renew its AFS authentication by reading from a
srvtab file.
- The configure script now looks for a libcom_err and can use an
installed one if one exists.
- Other small bug fixes.
Changes to the Cyrus IMAP Server Since Version 1.5
- Bug fix: RENAME corrupted mailboxes if they had been EXPUNGEd.
(may have only happened with INBOX, which Pine tickles once a
month.)
- Bug fix: auth_newstate now initializes its structures.
- Bug fix: pop3d.c, a printf was changed to prot_printf.
- Cyrus now sends X-NON-HIERARCHICAL-RENAME to alert clients that
it is not handling RENAME in an IMAP4rev1 compliant manner. This
will be fixed in a subsequent release.
- Bug fix: imclient_autenticate now does resolution on the
hostname before authenticating to it. This caused problems when
authenticating to an address that was a CNAME.
- Bug fix: LIST %.% (and other multiple hierarchy delimiter
matches) works properly. Several other glob.c fixes are included as
well.
- Bug fix: a fetch of exclusively BODY[HEADER.FIELDS...] should
now work properly.
- Bug fix: reconstruct now considers a nonexistant INN news
directory to be empty; this makes reconstruct fix the cyrus.* files
in the imap news partition.
- Added a manpage for imclient.
- Fixed a few other minor bugs.
Changes to the Cyrus IMAP Server Since Version 1.4
- Implemented the "IMAP4rev1" protocol commands. (The
hierarchical behavior of RENAME, which was added late to the
IMAP4rev1 specification, is not implemented.) Changes the minor
version number of the cyrus mailbox database format to 1.
IMPORTANT: it is necessary to run the command
"reconstruct -r" as the cyrus user after upgrading the
Cyrus IMAP software from version 1.4 or earlier.
- If the file "msg/shutdown" exits in the configuration
directory, the IMAP server will issue the first line in the file in
an untagged BYE message and shut down.
- Permit SPACE in mailbox names.
- Permit the "modified UTF-7" internationalized mailbox name
convention.
- "User opened mailbox" messages are now logged at the DEBUG
level instead of the INFO level.
- Added -q (ignore quota) switch to
deliver.
- New "krbck" program for diagnosing common kerberos
problems.
- auth_unix no longer requires users to be in the passwd
file.
- AUTHENTICATE command now reports the protection mechanism in
use in the text of the tagged OK response
- Make MAILBOX_BADFORMAT and MAILBOX_NOTSUPPORTED temporary
errors.
- Use the header cache for SEARCH HEADER
- Use "unspecified-domain" instead of server's hostname to fill
out RFC 822 addresses without the "@domain" part.
- Make "reconstruct -r" with no args reconstruct every
mailbox.
- The configure script now defaults to using unix_pwcheck instead
of unix if the file /etc/shadow exists.
- The location of the pwcheck socket directory now defaults to
"/var/ptclient/". It is controlled by the
"--with-statedir=DIR" option, which defaults to
"/var".
- Bug fix: by using an certain address form, one could deliver to
a user's mailbox bypassing the ACL's.
- Bug fix: un-fold header lines when parsing for the
ENVELOPE.
- Delete quota roots when deleting the last mailbox that uses
them. Doesn't catch all cases, but should get over 99% of
them.
- Implement plaintextloginpause configuration option, imposes
artificial delay on plaintext password logins.
- Implement popminpoll configuration option, limits frequency of
POP3 logins.
- Implement AFS PT server group support.
- Remove persistence of POP3 LAST value and remove Status:
hack
- Support the new ACL command set in the IMAP server.
- Bug fix: Have to initialize reply to 0 in pop3d. Was causing
POP3 server to occasionally drop the connection during
authentication.
- Bug fix: The COPY command wasn't issuing a [TRYCREATE] when
appropriate for sub-mailboxes of INBOX.
- Bug fix: Renaming a mailbox wasn't correctly changing its
UIDVALIDITY.
- Bug fix: Renaming a mailbox to itself, in order to move it to a
different partition, was not working correctly.
- Update the AUTH support in pop3d to conform to the latest draft
specification.
- Update cyradm to use Tcl 7.5 instead of Tcl 7.4
- Re-implement large sections of the netnews support. It no
longer requires modifications to INN, as it now expunges the index
entries for expired/canceled articles upon select of the
newsgroup.
- Implement newsspool configuration option, for separating the
directories for the news spool and the various cyrus.* IMAP server
index files.
- Bug fix: permit empty flag list in APPEND command
- Bug fix: deal with truncated Date: header values.
- Bug fix: memory mapping code, deal better with 0-length maps,
since mmap() appears to crap out on that boundary condition.
- Portability fix: if no strerror, have to define
NEED_SYS_ERRLIST.
- Bug fix: used append instead of lappend in cyradmin, preventing
use of any port other than IMAP.
- When the client is streaming its commands, the IMAP server
attempts to stream its tagged responses.
- Modify zephyr support to compile without Kerberos support.
- Add a bunch of prototype declararations to the code.
- In deliver, change the MULT support to instead use the LMTP
syntax.
- imclient: support tagged intermediate replies and a default
callback.
- Implement some experimental protocol extensions for optimizing
disconnected use resynchronization. Most extensions are disabled by
default. Client authors should contact info-cyrus@andrew.cmu.edu if
they wish to experiment with these.
- In Makefiles, change $(AR) to ar -- HPUX make is
defective.
- In deliver, use HAVE_LIBDB to select use of db over dbm
- Add map_stupidshared mapping module for older versions of
Digital Unix. It's not quite as bad as HPUX, but...
- Bug fix: in imclient.c, don't free NULL pointers and don't call
htons() on the output of getservbyname(). Have to abort sending the
command if you get a tagged response when sending a literal.
- The auth_xxx routines now create/take a state argument instead
of maintaining internal static state.
- Solaris mktime() is buggy in some releases. Create and use
mkgmtime() for parsing date strings.
- Message parsing routines now use memory mapping, though they
still copy data around in line-sized buffers.
Changes to the Cyrus IMAP Server Since Version 1.3
- Implemented the "reconstruct -m" command, for
reconstructing the mailboxes file. IMPORTANT: it is
necessary to run the command "reconstruct -m" as the cyrus
user after upgrading the Cyrus IMAP software from version 1.3 or
earlier. We recommend you make a backup copy of the
mailboxes file in the configuration directory before
performing the conversion.
- Mailbox names are now case sensitive, not case insensitive.
"INBOX" is the exception, and is treated as being
case-insensitive.
- Personal mailboxes now appear to their owners as being under
the "INBOX." hierarchy. For example, the mailbox
"user.bovik.work" appears to the user "bovik" as
"INBOX.work". The user may still refer to the mailbox with
the name "user.bovik.work".
- Previously, the code used "anybody" as the name of the
group that all users are in, but the documentation used the name
"anyone". Changed the code to match the documentation. The
name "anybody" will be canonicalized to the name
"anyone".
- The install document now gives different recommended locations
for the server databases. The recommended location of the
configuration directory changed from "/usr/cyrus" to
"/var/imap" and the recommended location of the default
partition directory changed from "/usr/spool/cyrus" to
"/var/spool/imap". It is NOT necessary to change
the locations of these directories when upgrading from version 1.3
or earlier of the Cyrus IMAP server software. If you do wish to
change the locations of these directories to match the new
recommendations, simply rename the directories and change the
appropriate values in your /etc/imapd.conf file.
- Created a "make install" rule. See the installation document for all the new
corresponding configure options. Note the recommended
location of the "imapd", "pop3d", and
"deliver" programs has changed, this change needs to be
reflected in the "inetd.conf" and "sendmail.cf"
files.
- New "login_unix_pwcheck" module and "pwcheck"
daemon, for improved shadow password support. See the
"pwcheck/README.pwcheck" file in the distribution for
details.
- Renamed the "login_unix_shadow" module to
"login_unix_getspnam".
- Added a mail notification mechanism, using Zephyr.
- Added a feature to automatically create user IMAP accounts.
Controlled by the "autocreatequota" config option.
- Added the "logtimestamps" config option, for putting
timestamp information into protocol telemetry logs.
- Beefed up the Kerberos checks in Configure to ensure the DES
library routines exist.
- On some systems, the "echo" command with no arguments
emits a newline. Changed the installation document to instead use
the "true" command to create the "mailboxes"
file.
- Store a redundant copy of a mailbox's ACL in the
cyrus.header file, so "reconstruct -m" may later
use it as a backup.
- Had to remove the declaration of tcl_RcFileName for
the latest version of Tcl.
- Make much more extensive use of memory mapping. Replace the
binary search module with one that searches a memory mapped
area.
- Replaced the yacc-based RFC822 address parser with a hand-coded
one.
- Replaced the et (error table) libary with a version that
doesn't require lex or yacc. Remove the lex/yacc checking from
Configure.
- Safety feature: most programs now refuse to run as root.
- Bug fix: Issue [TRYCREATE] tag on COPY command when
appropriate.
- Bug fix: The quoted-printable decoder wasn't ignoring trailing
whitespace, as required by MIME.
- Bug fix: Don't spew cascade errors if the server gets an EOF
during/after reading an APPEND literal.
- Bug fix: gmtmoff_gmtime.c was returning results with the wrong
sign.
- Bug fix: imclient_send was appending spaces to %d and %u and
the response parser was not handling responses that did not contain
a space after the keyword.
- Bug fix: rmnews wasn't removing some (un-indexed) article files
correctly.
- Completely disabled the dropoff code for now. It will be
completely replaced when IMSP integration is implemented
- Added workaround for the Linux mkdir() problem.
- In Configure, use a more direct test for a working
shared-memory mmap
- In collectnews, avoid O(n**2) behavior when processing articles
that have already expired.
- Bug fix: append_addseen() would screw up if no messages were
previously seen.
- Added the CMU-specific amssync and cmulocal directories.
- Use memmove instead of bcopy.
- Implemented the first pass of SMTP/MULT support in
deliver.
- Added cacheid parameter to auth_setid(), for AFS PT server
support.
Changes to the Cyrus IMAP Server Since Version 1.2
- Fixed bug in character set code that broke text searches. Sites
which care about searching headers need to reconstruct their
existing mailboxes.
Changes to the Cyrus IMAP Server Since Version 1.1-Beta
- Add support for UIDVALIDITY special information
token.
- Add syncnews and arbitron programs.
- Redo duplicate delivery elimination in deliver.
- Bug fixed: Must re-read files after acquiring a lock. Cannot
trust the mtime of a file to increment when writing the file--file
could be written to multiple times in the same second.
- Bug fixed: EXAMINE command should not affect
\Recent status.
- Update the user's \Recent high-water-mark when we
report new messages.
- Portability changes
- Upgrade to autoconf 2.1
- Allow privacy to be turned off at compile-time with
--disable-privacy configure switch.
- Fix typo in cyradm preventing "all" from
being recognized.
- Include map_private.c memory mapping module for
systems like HPUX which have half-working mmap()
implementations.
- Switch to using UTF-8 for internal search format. Sites which
care about internationalized searching of headers need to
reconstruct all their existing mailboxes.
- Fix some errors in the iso-8859-* tables.
- Add and correct a bunch of case-independence mappings in the
character tables.
- First pass at implementing the STATUS extension;
disabled for release.
- First pass at implementing IMAP/IMSP server integration. Not
ready for general use.
- Add new_cred and free_cred mechanisms to
authentication modules.
- Don't complain when doing "reconstruct -r foo" and
foo isn't a mailbox.
- Add IMAP_QUOTAROOT_NONEXISTENT error code.
- Bug fix: Avoid divide by zero when quota is zero
- Bug fix: In an error case of the ACL handling code, we have to
restore tab before breaking out of loop.
- Fix file descriptor leak in quota system.
- Change a bunch of int variables to unsigned.
- Better error reporting on reads that end up short.
Changes to the Cyrus IMAP Server Since Version 1.0-Beta
- Improved installation document.
- New "
cyradm
"
administrative client.
- Changed the syslog facility from "
local4
" to
"local6".
- Removed the renounce setuid check in "
deliver". The
"deliver" program must now be non-executable by
other.
- Fixed a typo in the parsing of SEARCH DELETED. (This
bug constantly got tripped by newer C-clients.)
- Redesigned the implementation of SEARCH CHARSET.
Sites that wish to search for non-ASCII characters in the headers
of existing mailboxes must run reconstruct on all their
mailboxes after upgrading to this version.
- Added AUTH and KPOP support to the POP3 server.
- Added search support for the ISO-2022-JP character set.
- Replaced the search engine with a partial Boyer-Moore
algorithm.
- Special-case optimized searching US-ASCII text.
- Fixed a bug which caused the message parser to spin-loop on a
particular degenerate invalid-MIME case.
- Fixed a performance bug in the message parser.
- Tracked last-minute changes to the IMAP4 protocol.
- Fixed a bug in UNSUBSCRIBE which caused too many
subscriptions to be removed.
- Added a bunch more "
configure
" options.
- Ported to HPUX.
- Fixed a bug in the LIST/LSUB \Noselect code.
- Fixed bug in the globbing code which caused the "*%"
pattern to work incorrectly.
- Client-side Kerberos support is now conditionalized on
HAVE_ACTE_KRB, which is set by configure.
- Fixed some invalid buffer-alignment assumptions in the Kerberos
code.
- Made the lexers compatible with flex. Configure now looks for
and prefers to use flex and
bison/byacc.
- Made the IMAP server check for the existence of the mailboxes
file upon startup, in order to give a more informative error
message for this common configuration error.
- Fixed other minor bugs.
last modified: $Date: 2003/11/19 16:44:29 $
Return to the Cyrus IMAP Server Home Page
Cyrus IMAP Server: Alternate Namespace
This document describes the alternatives to the standard mailbox presentation
method. These alternatives may be used together or independently.
The namespace options do NOT change the rules governing the behavior of
mailboxes (as described in
overview.html) or how mailboxes are stored on the filesystem. The
mailboxes are ALWAYS stored using the
netnews convention and
internal namespace. When configured to use one (or both) of the
options below, the server simply translates mailbox names between the
internal names and the external names when used by the client in the
IMAP protocol and in Sieve scripts.
This design allows the namespace to be changed at runtime (even on
a running server) without having to reconfigure the server. This also
means that one mailstore can support multiple namespaces if configured
correctly.
NOTE: If you are upgrading an existing server which
uses timsieved to manage Sieve scripts and choose to enable
one of the namespace options, you should run the script
"tools/translatesieve" after configuring the namespace
option(s). This script will translate the folder names in
fileinto actions.
The alternate namespace allows a user's personal mailboxes to
appear as if they reside at the same level as that user's
INBOX as opposed to children of it. For example, if user
"bovik" had a personal "work" mailbox, it would
appear to user "bovik" as "work" instead of
"INBOX.work" as it would in the standard namespace.
This configuration requires that a special prefix be used for
shared folders (to distinguish them from personal folders) and for
accessing other users' folders. By default, the prefix for shared
folders is "Shared Folders" and the prefix for other users
folders is "Other Users". For example, a shared folder
"foo" in the standard
namespace would be presented as "Shared Folders.foo" in
the alternate namespace.
NOTE: All tools for administering the server, including
admins using cyradm, always use the
internal namespace.
To use the alternate namespace, turn on the altnamespace
option in /etc/imapd.conf. The prefixes used for shared
folders and other users folders can be changed from the defaults by
setting the sharedrefix and userprefix options
respectively.
The UNIX hierarchy convention uses the traditional UNIX separator
character ("/") to delimit levels of the mailbox hierarchy instead of
the netnews character ("."). For example, if user
"bovik" had a personal "work" mailbox, it would
appear to user "bovik" as "INBOX/work" in the
standard namespace.
When the UNIX hierarchy convention is used, the "." character MAY
be used in mailbox names, including user names. In order to maintain
backwards compatibility with the internal namespace, all "."
characters are translated to a benign character (currently
"^") before any data is stored to disk. For example, if user
"elmer.fudd" had a personal "rabbit.holes" mailbox,
it would be stored as "user.elmer^fud.rabbit^holes" in the internal namespace. It is
important to remember this phenomenon if/when reverting back to the
netnews hierarchy convention.
To use the UNIX hierarchy separator, turn on the
unixhierarchysep option in /etc/imapd.conf.
Return
Sending Feedback on the Cyrus IMAP Server
Feedback on and fixes for the software or on the document may be
sent to
cyrus-bugs+@andrew.cmu.edu
.
Unfortunately, we can not guarantee a response but we'll try the best
we can. As usual, a high quality and complete message helps us
tremendously.
If you submit a patch, please send unified diffs (-u) if your diff
program supports them, or context diffs (-c) if it doesn't. Plain
diffs are very difficult to evaluate. GNU diff can do this.
When reporting problems, be sure to include the relevant
information. For example, you must include:
- the version of imapd
- the version of libsasl
- your system type (uname -a often provides
the right information.
You should also include:
- the options you passed to ./configure
- the errors from make (if any)
- the config.status file generated by
configure
NOTE: If you are able to connect to the imap server, all of this
information can be gathered by using the version
command in cyradm. If you can not use cyradm
because you are having perl problems, you can connect using
imtest and then run the following IMAP command:
The info-cyrus@andrew.cmu.edu mailing list exists for the
discussion of this server and other Cyrus software; more information
is available in the mailing-list
document. You may get faster/more responses by posting to this
list instead of to cyrus-bugs, as there are more readers here.
last modified: $Date: 2003/08/15 17:37:04 $
Return
Администрирование почтовых ящиков
Команда "cyradm" (смотрите man-страницу cyradm
(8)) создает,
удаляет, управляет ACL и квотами на почтовых ящиках. Для получения краткого обзора команд
наберите "cyradm <host>
". Когда "cyradm" запуститься, Вы войдете в
пользовательский режим и увидите приглашение в виде имени хоста и следующего за ним
символа ">". Наберите "help ".
Будет отображена следующая информация:
createmailbox, cm create a mailbox
deleteaclmailbox, dam delete an ACL on a mailbox
deletemailbox, dm delete a mailbox
help get help on commands
listaclmailbox, lam list the ACL on a mailbox
listmailbox, lm list mailboxes
listquota, lq list quota on root
listquotaroot, lqr, lqm list quota roots on mailbox
quit exit program
renamemailbox, renm rename a mailbox
setaclmailbox, sam set an ACL on a mailbox
setquota, sq set quota limits
Замечание:Необязательно запускать "cyradm" на самом IMAP-сервере, можно и
на другой машине в сети.
Замечание:Если
запустить "cyradm" на системе не использующей для
аутентификации Kerberos, у Вас спросят Ваше имя и пароль до ввода любых команд "cyradm". Используйте
опцию "-u " для указания имени пользователя.
Соглашение об именовании ящиков требует, чтобы главный ящик (inbox) для кого-либо назывался "user.<userid>
". Для создания ящика наберите:
createmailbox user.<userid>
Например, для создания ящика для пользователя "smith", наберите:
createmailbox user.smith
Для ограничения "smith'у " почты до 10,000 kb наберите:
setquota user.smith 10000
После создания inbox'а, пользователь сможет сам создавать дополнительные подъящики из почтовой программы. Если Smith создаст
ящик "work" и ящик "play", полные имена ящиков будут выглядеть как:
user.smith.work
user.smith.play
(Это для админа, а для Smith'а они будут выглядеть, как INBOX.work и INBOX.play
-
Прим.пер.)
Права доступа детально объясняются на man-странице cyradm(1). Помните,
что администратор должен установить для себя права на создание/удаление для ящика
прежде чем он сможет удалить этот ящик:
setaclmailbox <mail_box> <admin_userid> c
deletemailbox <mail_box>
Как только Вы создали почтовые ящики, установку IMAP-сервера можно считать завершенной. Теперь необходимо настроить почтовый интерфейс, такой как Pine или Mulberry, на
работу с IMAP-сервером.
Аутентификация пользователей
Введение
Cyrus IMAP
Server для аутентификации пользователей использует библиотеку Cyrus SASL. Пожалуйста ознакомьтесь с документацией на Cyrus SASL для получения
более детальной информации о SASL.
Аутентификационные механизмы
На момент написания
этого руководства, основная библиотека Cyrus SASL поддерживает такие SASL-механизмы, как CRAM-MD5, DIGEST-MD5, KERBEROS_V4 и GSSAPI. Cyrus IMAP, POP
и LMTP также поддерживают STARTTLS используя сертификаты на стороне клиента и внешние(EXTERNAL)
аутентификационные методы.
GSSAPI - это спецификация Kerberos 5. И еще, STARTTLS-сертификация на
стороне клиента не была должным образом протестирована.
Когда STARTTLS разрешен, PLAIN SASL-механизм (если установлен) также будет доступен. Это нормально, потому что
всеравно нельзя будет передать пароль открытым текстом по шифрованному соединению.
Протокол IMAP также поддерживает аутентификацию пользователей без использования SASL (спецификация). Это
можно осуществить через команду 'LOGIN' (не путать с механизмом LOGIN в SASL). Команда IMAP LOGIN (как с PLAIN) посылает
Ваш пароль серверу открытым текстом. В этом случае пароль все еще проверяется через библиотеку Cyrus SASL, хотя
и никакой SASL-механизм при этом не используется.
POP-сервер может
осуществлять APOP-аутентификацию. В этом случае Cyrus
SASL должна быть собрана с ключем " --with-checkapop"
, а пароли должны храниться в auxprop-базе (например: sasldb, auxprop, plugin).
Рекомендации
- Если Вы делаете почтовый
сервер на одной машине, мы рекомендуем настроить систему на использование CRAM-MD5 или DIGEST-MD5. У нас пока
нет утилит, с помощью которых пользователи могли бы менять свои пароли, но
скоро мы, или кто-нибудь еще обязятельно напишет их.
- Если у Вас более одного
почтового сервера, мы рекомендуем настроить систему на использование GSSAPI или Kerberos5.
- Если Вам нужен какой-либо другой аутентификационный механизм, который требует
пароля в открытом виде(plain-text), вы должны использовать saslauthd.
Saslauthd - это один из компонентов
библиотеки Cyrus SASL. Пока он
распространен не так как PAM, но его проще настраивать. IMAP-сервер просто посылает идентификатор пользователя и
соответствующий пароль по пайпу (Unix domain pipe). Затем, saslauthd берет этот
идентификатор с паролем и пытается его уатентифицировать -- с помощью аутентификации, которую вы используете -- а потом просто
возвращает "yes" или "no", т.е. правильный пароль или нет.
Есть возможность настроить saslauthd
на работу через PAM-механизм, /etc/passwd, или на что-то
другое.
PAM поддерживает встраиваемые аутентификационные модули для обеспечения общего API приложениям, которым
необходимо аутентифицировать пользователей. Можно использовать PAM как дополнительный слой под SASL-слоем. Читайте
http://www.kernel.org/pub/linux/libs/pam/FAQ для
более детальной информации о PAM. При использовании модуля PAM, другие приложения
в Вашей системе тоже могут им пользоваться -- например, login, xlock и т. д.
Имейте в виду, что при
использовании PLAIN или LOGIN появляется необходимость в шифровании потока(канала), т. к. id пользователя и пароль может
быть легко перехвачен сниффером.
Настройка аутентификации
Cyrus SASL имеет множество опций, кторое могут быть настроены через использующее ее(библиотеку) приложение. Для настройки
через imapd.conf, к нужной опции просто добавляется префикс sasl_ (например:
pwcheck_method будет выглядеть как sasl_pwcheck_method).
/etc/sasldb2
Простейший метод аутентификации заключается в использовании аутентификационной
базы libsasl, аккаунты в которой создаются с помощью утилиты
"saslpasswd2". В настройках должно стоять "sasl_pwcheck_method:
auxprop" и
в SASL у sasldb должен быть установлен auxprop-модуль (это ставится по умолчанию). Удостоверьтесь, что Cyrus может прочитать из "/etc/sasldb2":
chown cyrus /etc/sasldb2*
Shadow Passwords(Теневые пароли)
Реализация аутентификации пользователей из "/etc/shadow" более сложна , т. к. cyrus-пользователь не может чиатть файл теневых
паролей. Также, это не полволит использовать механизмы shared secret. Чтобы осуществить это, необходимо настроить libsasl с поддержкой
saslauthd, и прописать в настройках "sasl_pwcheck_method:
saslauthd". Библиотека SASL будет вызывать внешнююутилиту,
запущенную от имени root'а, чтобы аутентифицировать пользователей.
Kerberos
Настройка Kerberos v4
Cyrus IMAP сможет поддерживаеть Kerberos v4 если библиотеку
SASL собрать(откомпилировать) с поддержкой KERBEROS_V4.
Вам потребуется создать для сервера идентификатор Kerberos v4 и добавить ключ сервера
в файл "srvtab". Cyrus-пользователь должен
иметь право на чтение
на этот файл. Сервер убдет иметь идентификатор Kerberos вида "imap.HOST@REALM", где "HOST " - первый компонент имени
хоста сервера, а "REALM " - область Kerberos.
- Вот пример процедуры создания srvtabфайла для
хоста с именем "foobar":
ksrvutil -f /var/imap/srvtab add
Ниже идет информация для запроса "ksrvutil". Необходимо вводить значения или нажимать RETURN(Enter) .
В этом примере имя хоста - "foobar", а имя области
- "ANDREW.CMU.EDU".
Name: imap
Instance: foobar
Realm: ANDREW.CMU.EDU
Version number:
New principal: imap.foobar@ANDREW.CMU.EDU; version 0
Is this correct? (y,n) [y]
Password:
Verifying, please re-enter Password:
Key successfully added.
Would you like to add another key? (y,n) [y] n
-
Если Вы планируете внедрять Kerberized
POP, создайте идентификатор Kerberos "pop.HOST@REALM" и добавте ключ в файл "srvtab". Аналогично, если использовать LMTP через
TCP, создайте Kerberos-идентификатор "lmtp.HOST@REALM" и добавте ключ в
файл "srvtab ".
-
Сделайте cyrus-пользователя владельцем файла "srvtab ":
chown cyrus /var/imap/srvtab
- Добавте поцию srvtab в /etc/imapd.conf:
srvtab: /var/imap/srvtab
- Протестируйте все это командой imtest -m KERBEROS_V4. i mtest попытается авторизовать текущего Unix-пользователя независимо от
текущей авторизации. Этого не бутет при использовании опции " -u" .
Разрешение проблем Kerberos_V4
Запустите программу "krbck"(находится в директории imap) как cyrus-пользователь на IMAP-сервере. Эта программа продиагностирует неготорые конфигурационные ошибки Kerberos v4.
Настройка Kerberos v5
Cyrus IMAP сможет поддерживать Kerberos v5 если
библиотека SASL собрана с поддержкой GSSAPI.
Вам нужно будет создать
идентификатор Kerberos v5 для сервера. Ключи Kerberos v5 хранятся в "/etc/krb5.keytab".
- Добавте ключ "imap/hostname" используя "kadmin".
- Дайте cyrus-пользователю право на чтение "/etc/krb5.keytab
":
chown cyrus /etc/krb5.keytab
- Проверте настройки с помощью imtest -m GSSAPI.
i mtest
попытается авторизовать текущего
Unix-пользователя независимо от текущей авторизации. Этого не бутет при
использовании опции "
-u"
.
Компилирование IMAP Server
После того, как Вы распаковали файлы из
tar-архива, перейдите в директорию "cyrus-imapd-NNNN
",
где NNNN - номер версии. В ней
находятся конфигурационные файлы и различные поддиректории. В директории в которйо находится файл
configure, выполните команду "./configure"(запустите скрипт configure) для настройки софта. Пожалуйста, читайте этот документ доконца,
т. к. у ./configure есть куча опций которые могут Вам пригодиться.
Обзор configure
Shell-скрипт "configure" попытается найти правильные занчения всех
системо-зависимых переменных, которые могут потребоваться при компиляции. Он создает файл "Makefile" в каждой поддиректории пакета. В конце, он создаст: shell-скрипт
"config.status" который Вы потом можете
запустить для изменения текущей конфигурации(пересоздания), файл "config.cache" который хранит результаты всех тестов и позволяет ускорить процесс повторного создания конфигурации и
файл "config.log" содержащий вывод компилятора (полезно, в основном,
при отладке "configure").
Выполнение "configure"
занимает некоторое время. Во время выполнения он
выводит разные сообщения, говорящие о том, что он проверяет в данный момент.
Вы можете собрать пакет в другой директории(не в той, где находяться
исходники). Это может понадобиться, например, при компиляции одновременно на нескольких компьютерах. Чтобы это осуществить, у Вас
должна быть версия "make" которая поддерживает переменную "VPATH
"(например GNU "make").Перейдите в директорию, где Вам нужно создать объектные и исполняемые файлы и запустите
скрипт "configure ". "configure" автоматически проверит наличие исходников в директории, где находиться "configure
" и в ".."(на уровень выше).
По умолчанию, "make install" установит файлы (кроме программ самого сервера) в "/usr/local/bin",
"/usr/local/man ", и т. д.Вы
можете переопределить префикс путей "/usr/local" используя у "configure
" опцию "--prefix=PATH".
Вы можете анзначить разные префиксы путей
для архитектурно-зависимых и назависимых файлов. Для этого нужно
использовать у "configure " опцию
"--exec-prefix=PATH", тогда пакет будет использовать путь PATH как префикс для
установки программ и библиотек. Документация и файлы с другими данными будут
использовать регулярный префикс(configure сам его определит - Прим. пер.).
По умолчанию, "make install " установит
программы самого сервера в "/usr/cyrus/bin". Вы можете определить префикс для этих программ отличный
от "/usr/cyrus" с помощью
опции "--with-cyrus-prefix=PATH".
Опции configure
Ниже приведен список опций, которые могут быть использованы с "
configure
".
-
--help
- Печать всех опций "configure" и выход(процесс настройки не начинается).
-
--with-auth=METHOD
- Определяет аутентификационный (group membership) модуль для использования. Существующие
в данный момент модули аутентификации:
-
unix
- Unix-файлы /etc/passwd и /etc/group
-
krb
- Kerberos (требует библиотеки Kerberos).
По желанию, можно указать где находится Kerberos v4 с помощью "--with-krb=DIR"
ВАЖНО: Для поддержи Kerberos v4 требуется
библиотека DES. Некоторые производители и распространители Kerberos, включая Solaris, не имеют такой поддержки,
поэтому в таких системах это не может быть реализовано.
-
krb_pts
- Доверия Kerberos с группой AFS PTserver'ов (требуется Kerberos и библиотеки AFS). При необходимости можно указать
расположение библиотек AFS с помощью "--with-afs=PATH". Также
требуется поддержка krb, как в вышесказанном случае.
Любой
метод аутентификации с SASL может быть использован с любым
авторизационным модулем.
-
--with-krb=PATH
- Определяет где нахлдятся библиотеки Kerberos.
-
--with-com_err=PATH
- Определяет где найти среду com_err.
-
--with-cyrus-group=USER
- Определяет группу успользуемую для установки guid на программы.
По умолчанию используется "mail".
-
--with-cyrus-prefix=PATH
- Исменяет расположение ПО сервера. По умолчанию,
используется префикс /usr/cyrus.
-
--with-cyrus-user=USER
- Определяет userid, от имени которого Cyrus IMAP
Server будет запускаться. По умолчанию "cyrus".
-
--with-dbdir=PATH
- Определяет, где находятся библиотеки Berkeley DB.
-
--with-duplicate-db=DB
- Определяет БД, которая будет
использоваться как юаза двойной доставки. По умолчанию "db3_nosync"
-
--with-mboxlist-db=DB
- Определяет БД, в которой будет храниться
списой почтовых ящиков. По умолчанию "db3"
-
--with-seen-db=DB
- Определяет БД для
хранения информации о состоянии. По умолчанию "flat"
-
--with-subs-db=DB
- Определяет
БД для хранения списка подписок. По умолчанию "flat"
-
--with-tls-db=DB
- Определяет БД, которая
будет использоваться, как TLS-кэш. По умолчанию "db3_nosync"
-
--with-idle=METHOD
- Определяет используемый метод IMAP IDLE . В
данный момент есть мледующие методы IDLE:
-
idled
-
Используется демон IDLE. Демон IDLE слушает сокет UNIX и ждет сообщения от lmtpd/imapd/pop3d на обновление
почтового ящика. Демон посылает сигнал на обновление соответствующим imapd.
-
poll
- Переодически заставляет ящики обновляться.
-
no
- Отключает IMAP IDLE.
По умолчанию "poll".
-
--with-lock=METHOD
- Определяет используемый метод блокировки. Существуют
следующие методы:
-
flock
-
блокировка flock()
-
fcntl
-
блокировка
fcntl()
По умолчанию используется "fcntl" если функция "fcntl()" существует, усли нет,
то используется "flock ".
-
--with-openssl=PATH
- Определяет, где искать библиотеки OpenSSL.
-
--with-egd-socket=FILE
- Определяет сокет дял соединения с Entropy Gathering
Daemon.
-
--with-perl=PATH
- Определяет, где лежат библиотеки Perl'а (полный путь,
включающий имя бинарника).
-
--with-sasl=PATH
- Определяет путь к директории содержащей
библиотеки (.../lib) и включаемые модули (.../include
) для libsasl.
-
--with-statedir=PATH
- Определяет директорию используемую
для связи с различными демонами. Поумолчанию "/var".
-
--with-libwrap=PATH
- Определяет, где искать библиотеку TCP wrappers.
-
--with-ucdsnmp=PATH
- Определяет, где искать библиотеку SNMP.
-
--with-zephyr=PATH
- Определяет, где искать библиотеку Zephyr(для notifyd).
-
--enable-annotatemore
- Включает поддержку расширения ANNOTATEMORE (mailbox/server
annotations).
-
--enable-fulldirhash
- Включает улучшенную схему хеширования, при которой
хешируется все имя пользователя, вместо только одной первой буквы.
-
--enable-listext
- Включает поддержку расширения LISTEXT.
-
--enable-murder
- Включает поддержку IMAP Murder.
-
--enable-netscapehack
- Включает поддержку для расширения X-NETSCAPE (администраторские URL'ы).
-
--disable-sieve
- По умолчанию, поддержка Sieve включена. Используйте
--disable-sieve для запрещения компилякии
библиотеки Sieve и полного отключения поддержки Sieve.
-
--disable-cyradm
- Не компилировать админского
клиента(программу) cyradm .
-
--disable-server
- Не компилировать программы сервера IMAP.
Запустите
" configure --help" чтобы узнать о дополнительных опциях.
Некоторые системы требуют для компиляции и линковки требуют специфических опций,
о которых скрипт "configure" ничего незнает. Вы можете
указать их "configure
" через установку(задание) значений переменным окружения. Используя Bourne-совместимый шел, Вы можете
сделать это прямо из командной строки:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Или в системе, где имеется программа "env " :
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
"make
" -переменные, которые Вы можете использовать с "configure ":
-
CC
- Компилятор C.
По
умолчанию "cc", или "gcc", если "gcc"
присутствует в
переменной PATH.
(Для "CC", любое значение переменных
окружения перекроет значение, корое
определяет "configure"(Т.е. оно более
приорететно -При. пер.).)
-
CFLAGS
- Отладочные и оптимизационные опции для компилятора C.
-
CPPFLAGS
- Главный файл ищет директорию ("-IDIR") и любые другие опции
препроцессора C и компилятора. Если это значение
не установленно через переменную окружения на момент запуска "configure ", то используется пустое
значение.
-
LDFLAGS
- Исключающие("-s") и
любые другие опции линкера(программа link). Если это значение
не установленно через переменную окружения на момент запуска "configure ", то используется пустое
значение.
-
DEFS
- Конфигурационные опции, в виде "-Dfoo -Dbar ..."
-
LIBS
- Библиотеки для линковки, в виде "-lfoo -lbar ..."
(Для "DEFS" и "LIBS", любое значение взятое
из среды добавляется к значению
определенным
скриптом "configure ")
Если у Вас
есть какие-нибудь мысли по поводу сборки пакета, мы будем благодарны,
если Вы выясните как улучшить "configure
". После этого, пожалушста, пошлите нам
патч! Инструкции по этим вопросам находятся на странице с обратной связью .
Файл "configure.in" используется как шаблон для
создания "configure" с
помощью вызова программы "autoconf". Вым это понадобится только в том случае, если Вы захотите пересоздать "configure" используя более новую версию "autoconf".
После успешного выполнения "configure ", выполните
следующие команды:
make depend
make all CFLAGS=-O
Если нужно, Вы можете переопределить переменные "make "
CFLAGS и LDFLAGS следующим образом :
make all CFLAGS=-O2 LDFLAGS=-s
Настройка IMAP-сервера
Этот раздел описывает запуск
shell-скриптов и изменение конфигурационных файлов после запуска "configure" и "make ".
- Создаются пользователь и группа для Cyrus-подсистемы. В этом документе приведены примеры с использованием пользователя "cyrus" и группы "mail", хотя они могут быть любые
другие. Если
будет использоваться имя пользователя отличное от "cyrus ",
то оно должно быть задано прараметнром "--with-cyrus-user=" скрипта
"configure". Если используемая группа отлична от "mail
", то она должна быть указанна в
параметре "--with-cyrus-group=" скрипта "configure".
- После того, как Вы залогинились под root'ом , можно ставить софт.
make install
Убедитесь, что Вы правильно задали
параметр "--with-cyrus-prefix" (по умолчанию, "/usr/cyrus/bin").
- Cyrus IMAP Server использует 4.3BSD
syslog, который разделяет сообщения на уровни и категории. С помощью "man
syslog" проверьте,
количество аргументов функции "openlog()
". Если нет, замените файлы "syslogd" и
"syslog.conf" файлами расположенными в
директории "syslog ".
mv syslogd /etc/syslogd
mv syslog.conf /etc/syslog.conf
Если Вы не скопируете файл "syslog/syslog.conf" в
директорию "/etc", убедитесь,
что поддерживается "local6.debug ". Файл должен включать такую строку:
local6.debug /var/log/imapd.log
Вероятнее всего, Вы захотите вести журнал сообщений от SASL, тогда должна быть такая строка:
auth.debug /var/log/auth.log
После установки и
тестирования, Вы, возможно, захотите изменить компонент ".debug" на что-нибудь менее звучное. Создайте
log-файлы:
touch /var/log/imapd.log /var/log/auth.log
- Создйте файл "/etc/imapd.conf". Вот
пример "imapd.conf " с минимальным количеством параметров:
configdirectory: /var/imap
partition-default: /var/spool/imap
admins: curtj abell
sasl_pwcheck_method: saslauthd
Для получения описания всех параметров в этом файле, обращайтесь к man-странице
imapd.conf(5)
man page. (Помните, что этот
файл передает(экспортирует) некоторые некоторые значения в libsasl, самый важный из
них - pwcheck_method. В этом примере пользователи аутентифицируются через демон saslauthd, для
которого существует множество различных способов управления
.)
ЧИТАЙТЕ MAN-СТРАНИЦУ imapd.conf(5)
. Есть опции, значания по умолчанию которых
могут Вам не понравиться.
Помните, что каждодневные
пользователя не должны быт администраторами. Админы имеют полномочия,
которых не может быть у простых пользователей и пока сервер
позволяет им получать почту будут возникать некоторые проблемы, если админы используются как простые
пользователи. Вы , как администратор, также не должны
читать почту. У Вас должны быть разные аккаунты для чтения
почты и администрирования. Это особенно важно при использовании опции
altnamespace , т.к. админы всегда представлены в стандартом (внутреннем) именовании.
- Создайте конфигурационную директорию, определяемую опцией
"configdirectory " в "imapd.conf". Конфигурационная директория своей концепцией похожа на
директорию "/usr/lib/news ". Там храниться
информайия о IMAP-сервере в целом.
В примерах этого документа используется конфигурационная директория "/var/imap". Владельцем этой
директории должен быть cyrus-пользователь и cyrus-группа, остальные пользователи не должны иметь никакого доступа.
cd /var
mkdir imap
chown cyrus imap
chgrp mail imap
chmod 750 imap
- Создайте директории раздела по умолчанию, определенного в файле
"/etc/imapd.conf ".
В примерах этого документа используется директория раздела по
умолчанию "/var/spool/imap ":
cd /var/spool
mkdir imap
chown cyrus imap
chgrp mail imap
chmod 750 imap
Концепкия директории раздела похожа на
/var/spool/news
. Там хранатся почтовые ящики. В отличие от большинства
netnews-систем, Cyrus позволяет иметь более одного раздела. Не используйте "news", как имя
раздела, т.к. это имя зарезервированно для теелконференций(netnews).
- Если Вы хотите использовать Sieve, и Вы
не настраивали доставку для
просмотра домашних директорий (читайте man-страницу по imapd.conf
), создайте Sieve-директорию:
cd /usr
mkdir sieve
chown cyrus sieve
chgrp mail sieve
chmod 750 sieve
- Войдите как Cyrus-пользователь(можно и просто от
его имени - Прим. пер.) и воспользуйтесь
утилитой "tools/mkimap" чтобы создать остальную часть директорий (поддиректории директорий, которые Вы уже создали). Помните,
если Вы собрали cyrus с параметром --enable-fulldirhash , то вместо
"tools/mkimap" нужно
использовать "tools/rehash ".
su cyrus
tools/mkimap
exit
Если Perl'нет, то несложно (но
долго) создать эти директории вручную.
-
LINUX-СИСТЕМЫ ИСПОЛЬЗОВАНИЕ ТОЛЬКО EXT2FS:
Заставьте пользователя, квоту и директории раздела обновляться
синхронно. Если этого не сделать это может вызвать повреждение данных и/или потерю
сообщений полсе сбоя. К сожалению, если так поступать, то это
может привести к серьезному падению производительности. Если Вы используете на Linux'е более новую файловую систему
чем ext2fs, этот шаг выполнять необязательно. (Использование ext3 в любом режиме - безопастно.)
cd /var/imap
chattr +S user quota user/* quota/*
chattr +S /var/spool/imap /var/spool/imap/*
Также заставте директорию очереди
почтового демона обновляться синхронно. Следующий пример для sendmail:
chattr +S /var/spool/mqueue
- Для вклбчения поддержки STARTTLS, читайте ниже как настроить OpenSSL .
- Добавте следующие строки в файл "/etc/services ", если
их там нет.
pop3 110/tcp
imap 143/tcp
imsp 406/tcp
acap 674/tcp
imaps 993/tcp
pop3s 995/tcp
kpop 1109/tcp
sieve 2000/tcp
lmtp 2003/tcp
fud 4201/udp
-
Удалите записи в "/etc/[x]inetd.conf ". Любые строки
относящиеся к
imap, imaps, pop3, pop3s,
kpop, lmtp и sieve должны быть
удалены из /etc/[x]inetd.conf и [x]inetd должен быть
перезапущен.
Настройка Master-процесса
- Выбирете конфигурацию из директории master/conf :
-
small.conf
- "голый" вервер с поддержкой IMAP и POP
-
normal.conf
- сервер с
поддержкой IMAP, POP, SSL wrapped-версия и протокол управления скриптами Sieve
-
prefork.conf
- Такой же конфиг, как и предыдущий, но
с некоторым количеством "готовых" дочерних процессов процессами
для повышения производительности. (Т.е. при запуске сервер сразу создает
какое-то число процессов каждый из которых будет ждать подключения клиента.
Один клиент на один процесс. При подключении клиента время на
выполнение fork() не тратиться - Прим. пер.)
-
backend-cmu.conf
- Наша конфигурация (для Murder
Backend / типичного IMAP-сервера)
-
frontend-cmu.conf
- Наша конфигурация (для серверов Murder
Frontend)
Для использования normal.conf, выполните:
cp master/conf/normal.conf /etc/cyrus.conf
По желанию, Вы можете отредактировать /etc/cyrus.conf для разрешения или
запрета определенных сервисов, или
настроить число "готовых" процессов . Убедитесь, что не удалили записи, помеченные как. требуемые
- Сделайте так, что бы "/usr/cyrus/bin/master" запускался от имени
root'а во время запуска всей системы. Это позволит серверу
создать сетевой сокет и получить привилегии root'а. До перезагрузки системы Вы
можете запустить master-процесс вручную:
/usr/cyrus/bin/master &
- Контроль за master-процессом осуществляется через файл
imapd.log. Master-процесс
никогда не должен завершаться самостоятельно, но вы можете остановить почтовую систему посылая соответствующий сигнал через kill.
Настройка Mail Transfer Agent(MTA)
Для того, что бы почта шла
в Cyrus, Вы должны настроить ваш MTA (Sendmail, Postfix, Exim, etc) на использование LMTP.
Сгенирируйте конфигурационный
файл sendmail, который заставит доставлять локальную почту IMAP-серверу. Читайте файл cf/README в дистрибутиве Sendmail о том как создавать
конфигурационные файлы. В этом файле перечислены переменные, которые могут быть использованы для настройки определений
mailer'ов (mailer definition) перечисленных ниже.
Следующие конфигурации предпологают, что вы используете сервис
lmtpunix и однин из конфигов cyrus.conf
обсужденных выше.
- Для Sendmail 8.12.4 и выше, используется определение mail'ера cyrusv2
из дистрибутива Sendmail:
define(`confLOCAL_MAILER', `cyrusv2')
MAILER(`cyrusv2')
Если Вам нужно изменить имя UNIX-сокета или
использовать TCP, определите CYRUSV2_MAILER_ARGS как это описанно в
cf/README.
- Для Sendmail 8.10 - 8.12.3, используйте файл cyrusv2.mc как шаблон для создания
конфига Sendmail.
- Для Sendmail 8.9.x и более ранних, используйте определение cyrus
из дистрибутива Sendmail:
define(`confLOCAL_MAILER', `cyrus')
MAILER(`cyrus')
Отредактируйте /etc/group и добавте
пользователя "daemon" в
группу "mail". Это
разрешит sendmail'у запускать программу "deliver
" (LMTP-клиент) для доставки почты IMAP-серверу.
Исходники Postfix'а распространяются
с файлом "README_FILES/LMTP_README". Даже если Вы используете бинарный(уже собранный) дистрибутив Postfix, былобы нелишним скачать исходники Postfix'а. Вы получите
нетолько вышеупомянутый файл, но и большое количество других файлов "readme" files и
примерных конфигов.
Один важный момент, который Вы
не должны упускать - это UID и GID Postfix'а. Как сказанно в документе Postfix'а "INSTALL" , Вы
должны создать новый аккаунт который не разделяет свой UID и GID с любым другим пользовательским аккаунтом.
Это делается из соображений безопастности. Если Вы установили Postfix с GID "mail", Вам нужно будет выбрать другой GID для Cyrus. Смотрите описание конфигурационных опций Cyrus'а
"--with-cyrus-user" и "--with-cyrus-group". (Это было наиболее
критично когда использовался Cyrus'овский "deliver
", но всеравно было бы неплохо придерживаться этой политики.)
Другой момент заключается в определении местонахождения команды "sendmail". На одних платформах это может быть "/usr/sbin/sendmail",
на других, "/usr/lib/sendmail". Cyrus должен знать где находиться эта
команда. За детелями обращайтесь в Installing Sieve
.
Если Вы пользуетесь сервисом lmtpunix
как в примерах cyrus.conf описанных выше, конфигурационный
файл Postfix "/etc/postfix/main.cf " должен иметь
такую строку:
mailbox_transport = lmtp:unix:/var/imap/socket/lmtp
Естественно, оба, Postfix UID и Cyrus UID,
должны иметь соответствующий доступ к указанному сокету.
Начиная с Postfix snapshot-20010222, Вы можете улучшить эффективность LMTP-доставки через "mailbox_transport", поместив следующие строки в файл "/etc/postfix/main.cf":
local_destination_recipient_limit = 300
local_destination_concurrency_limit = 5
Конечно, Вы должны приспособить эти настройки в соответствии
с вашими аппаратными требования. Ограничение числа получателей может хорошо сочитаться с возможностью Cyrus'а
хранить сообщения в единственном экземпляре. Лимит конкурирующих подключений может быть использован
для контроля количества одновременных LMTP-сессий к хранилищю сообщений в Cyrus'е.
Дополнительные примеры включены в
файл Postfix "README_FILES/LMTP_README".
Сгенерируйте гонфиг Exim'а который позволит осуществлять доставку локальной почты IMAP-серверу. Читайте документацию к Exim'у
о том, как создать конфиг.
Cyrus разработан для
использования как black-box-сервер -- т.е. никаких локальных(системных) пользовательских аккаунтов. Из-за этого, Вы должны будете определить
следующий "router":
localuser:
driver = accept
transport = local_delivery
Следующие "transports" подразумевают их использование их с сервисом
lmtpunix или lmtp из файла
cyrus.conf описанного выше.
Для более продвинутой настройки (такой как верификация адресов
и т.д.), читайте доки по Exim и примеры конфигов.
SSL, TLS и OpenSSL
Transport Layer Security (TLS), является стандартизированной версией стандарта Secure Sockets Layer (SSL
v3). IMAP может использовать две различные версии TLS/SSL: STARTTLS и SSL wrapped сессии.
В STARTTLS, клиент подключается к порту IMAP и
затем посылает STARTTLS-команды, которые инициируют TLS-обмен. В настоящий момент это поддерживается Cyrus IMAP Server'ом, если тот собран с
OpenSSL.
Альтернатива: SSL-wrapped-соединение, клиент подключается к другому порту ("imaps
") и
устанавливает SSL-сессию до начала IMAP-протокола. Это также поддерживается Cyrus IMAP Serve'ом, если тот собран
с OpenSSL.
Оба, TLSи SSL, требуют наличие
серверного ключа и сертификата. По желанию, помимо установки безопастного соединения, TLS
может аутентифицировать клиентов.
Настройка Cyrus с OpenSSL
-
OpenSSL требует сертификата и ключа в PEM-формате. Вы можете
создать закрытый ключ сервера и сертификат с собственной подписью. Далее, мы создаем собственный ключ для
машины " foobar.andrew.cmu.edu", затем помещаем и сертификат
и ключ в файл "/var/imap/server.pem".
Пожалуйста, не используйте следующюю информацию для OpenSSL. Вместо
нее введите нужную информацию для Вашей организации (т.е. НЕ Carnegie Mellon University в имени
организации и т.д.).
openssl req -new -x509 -nodes -out /var/imap/server.pem -keyout /var/imap/server.pem -days 365
Using configuration from /usr/local/lib/openssl/openssl.cnf
Generating a 1024 bit RSA private key
.............+++++
......................+++++
writing new private key to '/var/imap/server.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:Pennsylvania
Locality Name (eg, city) []:Pittsburgh
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Carnegie Mellon University
Organizational Unit Name (eg, section) []:Andrew Systems Group
Common Name (eg, YOUR name) []:foobar.andrew.cmu.edu
Email Address []:
- Будьте уверены, что сделанные файл(ы) с ключами могут быть прочитаны Cyrus-пользователем.
Например: chown cyrus /var/imap/server.pem
- Добавьте следующие строки в файл /etc/imapd.conf, чтобы указать серверу
где имкать файлы ключей и сертификатов
(используется для ВСЕХ сервисов):
tls_cert_file: /var/imap/server.pem
tls_key_file: /var/imap/server.pem
По
желанию, Вы можете использовать разные файлы ключей и сертификаты для каждого
сервиса:
tls_imap_cert_file: /var/imap/imap-server.pem
tls_imap_key_file: /var/imap/imap-server.pem
tls_pop3_cert_file: /var/imap/pop3-server.pem
tls_pop3_key_file: /var/imap/pop3-server.pem
tls_lmtp_cert_file: /var/imap/lmtp-server.pem
tls_lmtp_key_file: /var/imap/lmtp-server.pem
tls_sieve_cert_file: /var/imap/sieve-server.pem
tls_sieve_key_file: /var/imap/sieve-server.pem
Это полезно когда используются различные имена хостов для разных сервисов (например через
виртуальные хосты или DNS CNAME). При отсутствии в любом из сервисов определенной опции, будет
использоваться значение глобальной опции. Значение запрещающие сертификат или ключевой файл для какого-либо сервиса отключит SSL/TLS для этого сервиса.
Если у Вас есть Certificate
Authority (CA), Вы можете сгенерировать запрос на подпись сертификата и послать его на обработку Вашему CA.
По умолчанию, Cyrus будет кэшировать SSL/TLS-сессии до 24 часов. Используя опцию tls_session_timeout в
imapd.conf, кэширование сессии может быть отключено (0) или
сокращен период хранения.
- Вы можете протестировать STARTTLS используя imtest:
imtest -t "" foobar.andrew.cmu.edu
Сертификаты на стороне клиента
Клиентские сертификаты формируются
несколько сложнее, чем сертификаты серверов. Вам нужен CA (certificate authority) и нужно сгенерировать
сертификат подписанный CA. STARTTLS в Sendmail и других MTA have подобные проблемы. С.м. Claus Assman's
page
Вы можете использовать сертификат с собственной подписью как CA
для клиентского сертификата. Чтобы это сделать, попробуйте следующее:
TODO: write me!
К сожалению, нет
стандарта позволяющего конвертировать клиентские аутентификационные DN (distinguished name) в аутентификационные имена
SASL.
Альтернативное именование и соглашение об иерархии
UNIX
Если Вы будите использовать альтернативное именование и/или соглашение об
иерархии UNIX, то прочтите altnamespace.html.
Installing The Cyrus Murder
Note that Cyrus Murder is still relatively young in the grand scheme of
things, and if you choose to deploy you are doing so at your own risk.
Many of the failure modes can be difficult to track without a detailed
understanding of the mupdate protocol and IMAP in general, and thus even
considering a deployment is not for the faint at heart.
At the same time, we are using it successfully in production at Carnegie
Mellon.
Introduction & Assumptions
This document is intended to be a guide to the configuration of a Cyrus
IMAP Aggregator, aka Cyrus Murder. It is recommended that you review
this document to be familliar
with the concepts at work. This document is a work in progress and is at this
point incomplete.
This document assumes that you have successfully been able to setup atleast
one Cyrus IMAP server. This server will become your first backend server.
It also assumes that you are familliar with the administration and day
to day operations of the Cyrus IMAP server and the SASL authentication library.
If you feel uncomfortable with this, please refer to the rest of the
documentation first.
There is a diagram that shows the interactions of
the various components of the Cyrus Murder which may be helpful in
understanding the "big picture".
Installation
You will need to build Cyrus IMAPd with the --enable-murder configure
option. This builds the proxyds and the associated utilities.
Requirements
- Atleast one Cyrus IMAP server. If there are more than one, their name
spaces must not conflict. That is, all the mailbox names must be unique
(or in different namespaces)
- Atleast one machine that will become the first Frontend Server.
- One machine to become the MUPDATE master server. This can be the
same as one of your frontend servers.
Configuring the MUPDATE Master
The mupdate master server needs to be running the mupdate service in master
mode. Note that you can have the MUPDATE master be one of your frontend
machines, just do not configure a slave mupdate process on this machine.
To configure an mupdate master, you will want a cyrus.conf that includes a
line similar to the following in the SERVICES section:
mupdate cmd="/usr/cyrus/bin/mupdate -m" listen=3905 prefork=1
Note the "-m" option to tell mupdate that it should start in master mode.
You will also need to configure atleast a skeleton imapd.conf that defines
the configdirectory, a bogus partition-default and the
admins that can authenticate to the server. Note that slave
mupdate servers as well as the backend servers will need to be able to
authenticate as admins on the master. Here is a very simple imapd.conf for
a master server:
configdirectory: /imap/conf
partition-default: /tmp
admins: mupdateslave1 backend1
You will also need to configure SASL to properly allow authentication in
your enviornment.
Setting up the backends to push changes to the MUPDATE Master
On the backends, configuration to be a part of a murder is easy. You just
need to configure the backend to be a part of the murder. To do this,
set the mupdate_server option in imapd.conf. Depending on what
authentication mechanisms you are using, you may also want to set some
or all of the following:
-
mupdate_username
-
mupdate_authname
-
mupdate_realm
-
mupdate_password
Once these settings are successfully made, any mailbox operation on the
backend will be sent to the mupdate master for confirmation and entry into
the mupdate database.
You will also want to configure atleast one user/group using the
proxyservers imapd.conf option. This user should not
be an administrator, since this means that anyone who can get ahold
of your proxy servers now has full administrative control on your
backend. Example:
admins: cyrus
proxyservers: murder
Keep in mind that you will need to create the proxy user(s) and be sure
that they can authenticate to the backend as well.
Importing the database from the backend
Importing the current mailboxes database is easy, as there is a ctl_mboxlist
option to do so. To do the first synchronization, simply change to the
cyrus user, and issue a ctl_mboxlist -m.
Note that you may wish to issue a ctl_mboxlist -mw first to
be sure you understand all the operations that this command will perform,
sicne it does require tha all mailboxes are unique in the murder namespace.
If everything is configured properly, the
mailbox database of the current host will dump to the mupdate master. If
there are problems, the most likely cause is a misconfiguration of the
authentication settings, or that mupdate might not be running on the master.
Using mupdatetest may be helpful in this case (it establishes
an authenticated connection to the mupdate server, if it can).
It is also useful to have the backends automatically resync the state of
their local mailboxes database with the master on start up. You can
configure this by adding the following to the START section
of cyrus.conf on the backends:
mupdatepush cmd="ctl_mboxlist -m"
This will perform synchronization with the mupdate master each time the backend
restarts, bringing the mupdate database up to date with the contents of the
backend (and performing ACTIVATE and DELETES as needed to do so).
Warning: If somehow a mailbox exists on two (or more) backend servers,
each time one of them synchronizes its database that backend server will
become authoritative. Though this should not happen during normal operation
of the murder (because of the consistancy guarantees of the MUPDATE protocol,
and the fact that mailbox operations are denied if the mupdate master is down),
it is possible when first creating the mupdate database or
when bringing a new backend server into the murder.
Configuring the frontends
Configuring the frontends is a two step process. First, you want to set
mupdate_server (and friends) as you did for the backends above.
However, because the frontends only talk to the mupdate master via a slave
running on the local machine, you will also need to set up a slave on the
same machine, in the SERVICES section of cyrus.conf, like so:
# mupdate database service - must prefork atleast 1
mupdate cmd="mupdate" listen=3905 prefork=1
Note that as this is a threaded service, you must prefork atleast 1 of them
so that the database can be synchronized at startup. Otherwise, the service
will not start running until after you recieve an mupdate client connection
to the slave (which is not a recommended configuration at this point).
You will also want to change all of your imapd entries to be
proxyd, and all of your pop3d entries to be
pop3proxyd. That is, you will probabally have a SERVICES
section that looks more like this now:
mupdate cmd="/usr/cyrus/bin/mupdate" listen=3905 prefork=1
imap cmd="proxyd" listen="imap" prefork=5
imaps cmd="proxyd -s" listen="imaps" prefork=1
pop3 cmd="pop3proxyd" listen="pop3" prefork=0
pop3s cmd="pop3proxyd -s" listen="pop3s" prefork=0
kpop cmd="pop3proxyd -k" listen="kpop" prefork=0
sieve cmd="timsieved" listen="sieve" prefork=0
lmtp cmd="lmtpproxyd" listen="/var/imap/socket/lmtp" prefork=0
Note that timsieved does not need a proxy daemon, the managesieve protocol
deals with the murder with referrals to the backends internally.
Additionally, you will need entries in imapd.conf to indicate the proxy
auth name and passwords (if you are using a SASL mechanism that requires them)
to the backends, for example, if your backends are
mail1.andrew.cmu.edu and mail2.andrew.cmu.edu with passwords
of foo and bar, and an auth name of murder:
mail1_password: foo
mail2_password: bar
proxy_authname: murder
If your SASL mechanism does not require authnames or passwords (e.g.
KERBEROS_V4), then this is not required. Note that we used the same
authname as the configured in the proxyservers line in the backend's
imapd.conf above.
When you start master on the frontend, a local mailboxes database should
automatically synchronize itself with the contents of the mupdate master,
and you should be ready to go. Your clients should connect to the frontends,
and the frontends will proxy or refer as applicable to the blackend servers.
Additional backend configuration
If your authentication system requires usernames, passwords, etc, to
authenticate (e.g. it isn't Kerberos), then you will also need to
specify proxy_authname (and friends) in the backend imapd.confs as well.
This is so that the backends can authenticate to eachother to facilitate
maibox moves. (Backend machines will need to be full admins).
Delivering mail
To deliver mail to your Murder, configure your MTA just as you did
before, but instead of connecting directly to lmtpd, it
should connect to lmtpproxyd. You can connect to the
lmtpproxyd running on the frontend machines, or you can
install master and lmtpproxyd on your SMTP servers.
Administration
Keeping the database synced
Consistancy in the database is maintained by pushing the current status
of the backends to the master, and having the frontends stay up to date with
the master's database. Since the frontends resync themselves entirely
when they startup, downtime should not at all be a problem. (While they
are up they should be continously recieving database updates, as well as
when they lose connection to the master, they will try to reconnect and
resync their database upon reconnection)
Provided that the namespace of the backend servers is kept discrete
(with no mailboxes existing on the same server), it is not a big deal
to resync the mupdate master using ctl_mboxlist -m. If two servers
do have the same mailbox, this will need to be resolved before database
consistancy can be guranteed.
Moving Mailboxes between backends
There is currently no 100% foolproof way to do this, however, if you issue
a rename command to a frontend (as you would to move a mailbox between partitions),
and replace the partition name with the name of the new backend, it will move
the mailbox to the indicated backend. You can also use the format
backend.domain.com!partition to move to a specific partition
(otherwise the default partition will be used). In cyradm, this looks
like:
cyrus.andrew.cmu.edu> rename user.bcyrus user.bcyrus mail2.andrew.cmu.edu!u2
Note that since seen state is stored per-user, it is possible that when
moving a shared mailbox users will have strange effects. The general rule
is that moving an INBOX will move the entire user (including all sub-mailboxes
to the INBOX, and seen state, and subscriptions, and sieve scripts, etc).
The seen state is merged with the seen state on the new backend, so that
no data is lost (seen state is also the only part left behind on the source
backend). In the case of any other mailbox, however, only that individual
mailbox is moved. If it is a quota root, the new quota root is instated
on the new server, but otherwise quotas can appear to be violated,
since each backend only takes care of its own quota.
In general, its better to leave trees of mailboxes on the same server, and
not move submailboxes of inboxes between servers.
Adding additional backend servers
This is very easy to do, simply configure an empty backend server
and set its mupdate_server parameter to point at the mupdate
master. Then, issue mailbox creates to it as you would any other
backend server.
Backups
xxx, need to write stuff. You don't need to really backup the data on
the mupdate master or slaves, since this data can all be generated directly
from the backends quite easily.
Gotchyas
-
Clients dealing with a pool of frontend servers - Some clients may
not be terribly efficient caching connections to a pool of imap servers, this
isn't a problem, per se, but it may mean that you will see many more
authentications than you are used to.
-
Kerberos issues - If you are using kerberos authentication,
you will want to ensure that all your machines are keyed properly, as we
have seen problems with different clients trying to authenticate to
different services (e.g. imap.imap-pool instead of imap.pool-frontend-1), so
test the clients in use in your enviornment and be sure that they work with
whatever keying scheme you use.
-
Clients dealing with referrals - Some clients (we've had particuar
trouble with pine, though most of these issues have now been resolved and
new versions should be OK (that is, pine > 4.44), but as referrals have not
been extensively used by any IMAP server until now, referrals are very likely
to not work correctly or have surprising effects.
-
Clients dealing with getting a NO on LSUB commands - Some clients
(Outlook, for example) may behave poorly if an LSUB command returns a NO, which
may be the case if the backend server with the user's inbox is down. We
have, for example, seen this result in the deletion of the disconnected
message cache.
-
Behavior of cyradm / some mailbox operations - The behavior
of some administrative commands
might be slightly unexpected. For example, you can only issue a SETQUOTA
to a frontend server if the entire mailbox tree underneath where you are
setting the quota exists on the same backend server, otherwise you will need
to connect directly to the backend servers to perform the needed changes.
Similarally, mailboxes will be created on the same backend server
that their parent is in. In order to create them on a different server
(or to create a new top level mailbox) you will need to connect directly to
the desired backend server.
-
Subscriptions - If users want subscribe to a mailbox other than on
their backend home server, they won't be able to, unless you set
"allowallsubscribe: t" in the backend imapd.confs. This essentially
lets any string be subscribed to successfully.
-
Restarting the mupdate master - Because ctl_cyrusdb -r
clears reservations on mailbox, if you restart the mupdate master (and
run recovery), then this could (we suspect, very rarely) lead to inconsistancies
in the mupdate database.
Troubleshooting & when things go wrong
-
Mailbox operations are being denied - This is an indication
that the mupdate master may be down. Restart it.
-
Mailbox operations are not being seen by one or more frontends -
This indicates that the mupdate process on a slave may have died,
you may need to restart master. Alternatively, mupdate will retry connections
every 20 seconds or so for about 20 attempts if the master does go down.
-
A frontend's mailboxes.db is corrupt / out of sync - Restart master
on the frontend, and have the mupdate process resynch the local database.
You may need to remove the local mailboxes database if the corruption is
extreme.
-
A mailbox's location keeps switching between two (or more) backend
hosts. - It probabally actually exists on both hosts. Delete the
mailbox from all but one of the hosts, and run a ctl_mboxlist -m on the one
where you want it to actually live.
-
Databases are never created on the frontends/slaves - Check
to ensure that the mupdate slave process is started, (is prefork=1)
References
last modified: $Date:
Performance Notes
Performance issues for you to consider. If you never expect to have
more than 100 simultaneous users, chances are any hardware you have
will be fine. If you plan on having thousands or more users, please
be sure to review this section.
If your configuration directory is not /var/imap,
adjust accordingly.
-
/var/imap/proc
- After a successful login, the
imapd creates a file in /var/imap/proc that is its unix
process id. It also contains the name of any SELECT'd
mailbox. The file is deleted when the user logs out.
Given the potential load, this is a good candidate to move
elsewhere. This can be done by symlink'ing the directory to another
partition. We symlink it to a directory on a memory/viritual memory
filesystem (specifically Solaris' tmpfs). If you use a tmpfs type
filesystem, make sure that you have sufficient memory/swap to do
this.
Some people don't care about this information and just #ifdef
out the code. We probably should add a configure option to
do this.
-
/var/imap/mailboxes.db
- The mailboxes list is often
the ultimate source of contention between imap processes, especially if
clients are inefficient about their use of the LIST command. For this reason
it is often better to use the skiplist backend which is optimized for
enumeration of the database, as opposed to the default, Berkeley DB
(use --with-mboxlist-db=skiplist).
Mika Iisakkila (mika.iisakkila@pingrid.fi) writes: Nevertheless,
you can also tweak the Berkeley backend if you want to or have to stick
with it. Cyrus doesn't do anything to increase the BDB cache size, and the
default (256 kB) is way too small for any reasonably large site. With some
50000 mailboxes and random operations, I found the hit rate for default
BDB cache to be 70-80%. After growing the cache size to 2M, hit rate
approached 99% and disk traffic was greatly reduced since most of the
operations are reads anyway. Therefore processes could complete their work
and release their locks much more quickly, and the dreaded "DBERROR: xxx
lockers" messages stayed at a comfortable level. You can modify the source
(/lib/cyrusdb_db3.c, the setting is commented out) or you can put
a DB_CONFIG file under /var/imap/db with the appropriate
setting. Read more about this in the Berkeley docs before trying it, typos
and incorrect settings can cause havoc.
-
/var/imap/deliverdb
- Unless you disable
duplicate delivery suppression, each time a mail message is
delivered it needs to lock the database and check to see if the
message-id has been seen already. If you require really high
throughput delivery, you may want to disable this feature.
We run with it enabled and it doesn't significantly impact our
performance.
-
/var/spool/mqueue
- Sendmail can be pretty
harsh on the spool partition. Having this on a separate disk is
usually a good idea. Consider using LMTP and delivering from a
separate machine.
- Unused SASL mechanisms - If you just build the SASL library and
copied all the mechanisms into /usr/lib/sasl2, the imapd
will try to use them and allocate some amount of memory. In
general, the operating system will swap out those pages but you may
be allocating more swap space than you need. So, look in
/usr/lib/sasl2 and if you don't plan on using those mechanisms,
don't leave them there.
- You may want to increase the listen queue value when starting
up the master process. For example, you may want to do this if you
see the Listen queue drop counter increasing quickly. For example,
under Solaris, look at the variable tcpListenDrop (from netstat
-sP tcp).
-
Database recovery. If restarting the server takes a long
time due to the cyrusdb database recovery procedure (this is
usually true if you have a large number of deliveries) you should look
into shortening the interval between checkpoints, controlled by the
cyrusdb event in /etc/cyrus.conf. We run
checkpoints every 5 minutes; the current suggested install interval
is 30 minutes.
- Some filesystems support the noatime mount option. The
server does not use the atime information so you can go ahead and
enable this feature.
- Depending on your syslog configuration and usage volume, Cyrus may
generate thousands of syslog messages. On Linux, syslog
performance can be greatly improved by disabling synchronous
logging (disabling fsync() after each message). Prepending
filenames in /etc/syslog.conf with a "-", e.g., "/var/log/maillog"
becomes "-/var/log/maillog", disables syslog's fsync() call after
each log message. If you log many messages those fsync()s will
kill your I/O throughput. Note that if you do not need the detail provided
by the LOG_DEBUG level, then not logging these messages can significantly
reduces the amount of log entries that cyrus makes.
In general, there's no magic bullet for performance. It depends
on your hardware, your operating system, and how your users use the
system. In general, an imapd process takes up anywhere
from 256 Kbytes of memory to 512 Kbytes when it is first fired up.
CPU has not been a big deal, but it may become more important as
the imap sessions are encrypted and now that searching may be more
frequent. Disk I/O is probably the most important and having a
hardware RAID subsystem with an amount of write-back cache would be
a good thing.
Finally, if you are talking about less than 100 interactive
users it is likely that any relatively modern hardware can support
it. If you are talking about having more than 1000 interactive
users, you should know how to predict your utilization, go
overboard on hardware, be willing to suffer growing pains, or be
able to hire someone that can help.
There are a number of good performance tuning articles out for
Solaris by Adrian Cockcroft. Go to your favorite search engine and
look for his name.
last modified: $Date: 2003/01/02 19:23:11 $
Требования
Требования
Следующие программы и/или пакеты являются необходимыми.
- libsasl, версия 2.1.0 и выше. Libsasl можно
скачать с
ftp.andrew.cmu.edu
. Более ранние
версии SASL работать не будут; пожалуйста, используйте самую последнюю версию. Настройте SASL так чтобы он поддерживал любой аутентификационный
метод, который вы будете использовать. Пожалуйста подойдиет серьезно к настройке SASL.
Это одна из самых больших проблем, которая возникает у людей.
- Berkeley DB, версия 3.0.55 и выше. Berkeley DB можно
скачать с Sleepycat. Настоятельно рекомендуется компилировать libsasl с поддержкой Berkeley DB, используя туже самую версию Berkeley DB. (Если версии Berkeley DB
не сочетаются, то иногда могут происходить падения сервера)
- GNU Make . Скачайте его с Free Software Foundation
. Или через ftp здесь.
Следующие программы и/или пакеты требуются для специальных возможностей. Если у Вас их нет, некоторые
фенкции IMAP-сервера будут недоступны.
- makedepend . Версия включена в
makedepend-директорию
дистрибутива. Выполните
это("make depend" -Прим. пер.) до установки Cyrus IMAPd. Если этого не сделать, конфигурационный скрипт
будет использовать неготовый скрипт, бедьте также уверены, что Вы выполнили команду "make clean" до команды "make all ". Если Вы не хотите долго ждать,
то можно этого не делать и потом просто игнорировать ошибки makedepend(?).
- Perl, версия
5. Чтобы получить Perl идите в comprehensive Perl archive. Он требуется для cyradm (автор Brandon Allbery). Perl также нужен для некоторых установочных скриптов: в принципе это необязательно, но
это может облегчить Вашу жизнь. Мы рекомендуем по крайней мере версию 5.00502.
- OpenSSL, версия
0.9.4 и выше. Требуется для поддержки STARTTLS и для IMAP/POP3 через SSL (порты
imaps/pop3s). Доступен на http://www.openssl.org/.
- libwrap, от Wietse
Venema.
Это позволит осуществлять контроль - кто к какому сервису допщуен, основанный на IP-адресах. Доступен
на ftp://ftp.porcupine.org/pub/security/ в пакете tcp_wrappers .
- Net-SNMP (ранее
UCD-SNMP), версия 4.2 и выше. Требуется для SNMP-мониторинга IMAP-серверов. Доступно на http://www.net-snmp.org/.
- Если Вы используете поддержку AFS PTS для групп,
то Cyrus'у будет нужна
поддержка Kerberos и AFS. Если Вы правильно откомпилировали SASL с библиотекой Kerberos, то все это будет хорошо работать в Cyrus'е.
- Мы рекомендуем использовать MTA (mail transfer
agent) который поддерживает LMTP (local mail transfer protocol). Мы
используем Sendmail и рекомендуем версию 8.10.0 и выше, доступную на http://www.sendmail.org. Другие пользователи сообщают что
Postfix тоже хорошо взаимодействует с Cyrus'ом.
- Если Вы хотите экспортировать телеконференции
используя IMAP, IMAP-сервер должен получать конфы
с INN-серверов. Мы также работаем над проблемой передачи сообщений
от INN-серверов через LMTP.
Следующие программы и/или пакеты рекомендуются:
-
flex -
libsieve имеет два различных лексических анализатора, это трудно реализовать при
существующем законодательстве(?).
-
gcc
- мы компилируем используя компилятор gcc с опциями -O2 -g.
Установка Sieve
Этот раздел описывает как собрать Cyrus с
поддержкой sieve. Если указать " --disable-sieve" при запуске
./configure, Вы НЕ соберете сервер с
поддержкой sieve.
Краткий ввод в Sieve доступен на Cyrusoft
International.
Настройка исходящей почты
Некоторые действия Sieve (перенаправление, vacation) могут посылать исходящюю почту.
Вы должны быть уверенны, что "lmtpd" может посылать исходящие сообщения. По умолчанию для
отправки сообщений используется используется "/usr/lib/sendmail
". Это можно изменить добавив такую строку:
sendmail: /usr/sbin/sendmail
в Ваш "/etc/imapd.conf". Если Вы
используете Postfix или другой MTA, имейте в виду, что sendmail, указанный
в "/etc/imapd.conf" должен
быть Sendmail-совместимым.
Управление Sieve-скриптами
Т.к.
Cyrus базируется на понятии закрытого сервера, обычные пользователи могут управлять Sieve-скриптами только через
утилиту "sieveshell ".
Если, по каким-то причинам, Вы храните домашние
каталоги пользователей на сервере, Вы можете использовать опцию "sieveusehomedir
" и хранить sieve-скрипт в домашнем каталоге пользователя
в "~/.sieve".
Тестирование sieve-сервера
- Sieve-сервер "timsieved" испольузется для
транпортировки пользовательских Sieve-скриптов в закрытый IMAP-сервер. Это несовместимо
с опцией "sieveusehomedir". Демон назван в честь
одного из авторов, Тима Мартина, который очень хотел, чтобы что-нибудь в
дистрибутиве Cyrus было названо в честь него.
- Из вашего "нормального" аккаунта подключитесь через telnet к sieve-порту
сервера который Вы настраиваете:
telnet foobar sieve
Если сервер запущен, Вы получите сообщение наподобие следующего:
Trying 128.2.10.192...
Connected to foobar.andrew.cmu.edu.
Escape character is '^]'.
"IMPLEMENTATION" "Cyrus timsieved v1.1.0"
"SASL" "ANONYMOUS PLAIN KERBEROS_V4 GSSAPI"
"SIEVE" "fileinto reject envelope vacation imapflags notify subaddress regex"
OK
Любое сообщение
не похожее на это будет говорить о проблеме. Удостоверьтесь, что все
аутентификационные методы, которые Вам нужны, перечисленны. Этот список должен быть идентичен тому списку, который
выдавал "imapd"
ранее(в придыдущем разделе - Прим.пер.). Затем разорвите соединение,
набрав "logout".
- Далее тестируется аутентификация на sieve-сервере. Для этого запустите
утилиту "sieveshell
". Вы должны указать сервер. Если Вы запускаете утилиту с другой
машину без записи "sieve" в "/etc/services", будет использоваться 2000 порт.
"sieveshell foobar"
Please
enter your password: ****** >
quit
В случае проблемы появилось бы сообщение "Authentication failed
" с описанием.
- Далее Вы должны
попробывать поместить на сервер sieve-скрипт. Для этого создайте файл с именем "myscript.script" с нижеследующими строками. Замените "foo@example.org" на
email-адрес с которого Вы можете отправлять почту, но не тот с которым Вы работаете
в данный момент.
require ["reject","fileinto"];
if address :is :all "From" "foo@example.org"
{
reject "testing";
}
Для того чтобы поместить этот скрипт на сервер выполните следующюю команду:
"sieveshell foobar"
Please enter your
password: ****** > put myscript.script
> activate
myscript >
quit
Ваш скрипт будет помещен на сервер и станет активным.
-
Протестируйте сам скрипт. Отправте сообщение на адрес на адрес с
которым Вы работаете с адреса указанного в sieve-скрипте. Сообщение должно быть отклонено.
SNMP-Мониторинг
TODO:
конец этого раздела. Большая чать этого раздела перемещена во
внешнюю доку по CySNIIP.
Cyrus использует вспомогательный процесс под названием "tugowar", названный так потому
что он использует модель push-pull. Различные компоненты почтовой системы Cyrus помещают(push) данные в tugowar, tugowar, в свою
очередь, слушает SNMP-запросы (удаленные клиенты бурут у него
данные(pull)).
Настройка tugowar
Тестирование демона tugowar
Экспорт данных SNMP
Тестирование IMAP-сервера
Для
тестирования IMAP-сервера, перезагрузитесь и и выполните
следующие шаги (все примеры используют имя "foobar" как имя
IMAP-сервера). Перечень рекомендаций по
решению распространенных проблем возникающих при инсталляции можно прочитать на http://asg.web.cmu.edu/cyrus/imapd/install-FAQ.
- Из Вашего "нормального" аккаунта, подключитесь с помощью telnet'а к IMAP-порту на
сервере где все настраивалось:
telnet foobar imap
Если сервер запущен, Вы получите такое сообщение:
Trying 128.2.232.95...
Connected to foobar.andrew.cmu.edu.
Escape character is '^]'.
* OK foobar.andrew.cmu.edu Cyrus IMAP4 v2.0.0 server ready
Любое сообщение, которое не начинается с "* OK" говорит о наличии какой-либо проблемы. Для закрытия соединения напечатайте
". logout".
Естественно, номер версии должен соответствовать номеру версии сервера, который Вы
установили.
- Используйте "imtest"
для проверки входа с использованием пароля в открытом виде(plain):
/usr/local/bin/imtest -m login foobar
Если Вы хотите сделать это под другим именем пользователя, то:
/usr/local/bin/imtest -m login -a USER foobar
Если Ваш сервер запущен, Вы увидите следующие сообщение:
% /usr/local/bin/imtest -m login foobar
S: * OK mail1.andrew.cmu.edu Cyrus IMAP4 v2.0.0 server ready
C: C01 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS
X-NON-HIERARCHICAL-RENAME NO_ATOMIC_RENAME AUTH=GSSAPI AUTH=ANONYMOUS
AUTH=KERBEROS_V4 UNSELECT
S: C01 OK Completed
Password:
+ go ahead
L01 OK User logged in
Authenticated.
Security strength factor: 0
Любое сообщение, которое не начинается с "L01 OK
" говорит о проблеме. Если проверка неудачна, сообщения об
ошибках будут записанны
через syslog в серверные логи. Для
закрытия соединения наберите ". logout".
- Теперь нужно протестировать различные аутентификационные механизмы, которые Вы установили на
сервер. Поддерживаемые аутентификационные механизмы перечислены в строке CAPABILITY:
* CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS
X-NON-HIERARCHICAL-RENAME NO_ATOMIC_RENAME AUTH=ANONYMOUS
AUTH=KERBEROS_V4 AUTH=DIGEST-MD5 AUTH=CRAM-MD5 UNSELECT
. OK Completed
Каждому названию механизма предшествует 'AUTH=
'. В этом примере доступны механизмы ANONYMOUS, KERBEROS_V4, DIGEST-MD5
и CRAM-MD5. Если там нет механизма, который Вы собирались использовать, то проверьте логи libsasl.
Вообще, если механизм не пресутствует в списке, то это значит, что его
не удалось инициализировать. (Например, если у сервера нет доступа к файлу srvtab, механизм KERBEROS_V4
не будет загружен.)
Plaintext login - особый сулчай: SASL-механизм PLAIN
объявляется только при зашифрованном подключении. Однако, plaintext logins доступны (пока Вы не
отключите plaintext) при использовании -m login(как выше).
Для закрытия соединения наберите ". logout".
Если Вы удовлетворены
списком механизмов, ножно попытаться залогиниться с использованием каждого из этих маханизмов. Запустите imtest
указывая механизм для проверки.
/usr/local/bin/imtest -m KERBEROS_V4 foobar
C: C01 CAPABILITY
S: * OK foobar.andrew.cmu.edu Cyrus IMAP4 v2.0.0 server ready
S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE
UIDPLUS X-NON-HIERARCHICAL-RENAME NO_ATOMIC_RENAME AUTH=ANONYMOUS
AUTH=GSSAPI AUTH=KERBEROS_V4 UNSELECT
S: C01 OK Completed
C: A01 AUTHENTICATE KERBEROS_V4
S: + wYcDAA==
C: BAYBQU5EUkVXLkNNVS5FRFUAOCAm7F/Y+HabCzJ
/UMtVcvWRjTohuq/USaCV6gYdkAU5DOcADAq
S: + 0aAsUGQZhgQ=
C: ADMe/cVivAYYzy1yd4Vojg==
S: A01 OK Success (privacy protection)
Authenticated.
Security strength factor: 56
Сообщения, которые не начинаются с "A01 OK" говорят о наличии проблемы. Если тест не пройден, сообщения с ошибками подут записанны
через syslog в серверные логи. Для закрытия соединения наберите ". logout".
Для
полного описания всех механизмов обратитесь к документации libsasl. Она может поддеривать "security
layers" (защита секретности и целостности соединения). По умолчанию,
imtest использует самый сильный механизм
из доступных; используйте "-l " для выбора альтернативы.
Апгрейд предыдущих версий
Upgrading from 2.1.13 or earlier
- We are now more forgiving of MIME boundry headers generated by earlier
versions of eudora. However, if you have messages already in the mailstore
that you want to fix you will need to reconstruct the affected mailboxes
to regenerate the cached bodystructure data to take this into account.
Nothing needs to be done for new messages to be treated in this way.
Upgrading from 2.1.12 or earlier
- timsieved was corrected to behave properly in the altnamespace configuration.
However, this means that it was previously looking for sieve scripts in
"user.name" format instead of the (correct) "user^name"
format. A sample script to do this (which should be run in the top level of
the sieve directory) is in tools/convert-sieve.pl. Note that this
is only needed if you are running with altnamespace turned on.
Upgrading from 2.1.3 or earlier
- If you use notifications (previously notify_zephyr or
notify_unix) this functionality has been seperated out to
notifyd. See the notifyd manpage and example
entries in master/conf.
Upgrading from 2.1.2 or earlier
- Sieve has been updated to be compliant with RFC 3028 and
draft-martin-sieve-notify-01. All notify actions and any
fileinto and/or redirect actions using stringlists
will have to be updated/changed.
Upgrading from 2.1.1 or 2.1.0
nothing known
Upgrading from 2.0.16 or earlier
Upgrading from 2.0.6, 2.0.7, 2.0.8, or 2.0.9 or earlier
- If you use timsieved to manage Sieve scripts, run the
script "tools/upgradesieve". timsieved now uses
symlinks instead of hard links.
Upgrading from a previous 2.0 version to 2.0.6
Warning: You do not need to follow these instructions if you're
upgrading from version 1.6.
- You can now pick whether to use Berkeley db to store seen state,
the subscription files, and the mailboxes file or a flat text file, at
compile time only. (Look in imap/seen_db.c and
imap/mboxlist.h.)
- The format of the mailboxes file and seen state has changed. It is
not possible to preserve seen state, but upgrade the mailboxes file as
follows:
- Run ctl_mboxlist -d > mboxlist.temp to dump existing
mailboxes.
- Remove old database files: rm mailboxes.db db/*
user/*/*.seen
- With the new version of ctl_mboxlist, run ctl_mboxlist -u <
mboxlist.temp.
Upgrading from 1.6.22 or 1.6.24
Warning: Cyrus imapd 2.0 will automatically convert on-disk
file formats as the server is used. It is not possible to run 1.6
after 2.0 has been used on a mail spool without reconstructing every
mailbox.
Upgrading from 1.6.13
- Upgrading from the Cyrus IMAP server version 1.6.13 or earlier:
if you use Sieve, you should run the "tools/upgradesieve"
script, as the format of the "/usr/sieve" directory has
changed slightly.
timsieved, included in this release, will handle maintenance of Sieve
scripts.
- Upgrading from the Cyrus IMAP server version 1.6.10 or earlier:
if you export news via the IMAP server, you'll have to change your
"newsfeeds" file to contain
collectnews!:*:Tf,WR:collectnews
The format of the
input to collectnews has changed.
Duplicate delivery suppression is now required for Sieve.
- Upgrading from the Cyrus IMAP server version 1.6.1 or earlier
(including 1.5.x!): the quota and user directories are now hashed by
the first character of the username. This is to reduce the number of
entries in any given directory. It doesn't do a great job (and in some
cases it will do a really poor job) but as a quick hack it shouldn't
make things worse. Optionally, the data partitions can also be hashed
by enabling the "hashimapspool" option.
You must hash your directories using the "dohash" script
in the tools subdirectory. (If you want to hash your mail spool, be
sure to set "hashimapspool" before running "dohash".) This
must be run as the Cyrus user. Be sure to stop mail service while
converting. Doing this in single user mode is probably the safest.
Upgrading from 1.5
- Upgrading from the Cyrus IMAP server version 1.5 or earlier:
libsasl is now required. Configuring SASL to work may be a chore,
especially if you use shadow passwords.
- An ANSI C compiler is now required. gcc should work fine and can
be acquired from
http://www.gnu.org/software/gcc/gcc.html.
- Make sure to read the upgrading instructions under 1.6 above.
- Upgrading from 1.5.14 or earlier requires deleting the delivered
database. Remove the file delivered.db in the configdirectory and make a
directory called "deliverdb" in the configdirectory. This may cause some
duplicates to get through.
- Upgrading from 1.5.14 or earlier requires removing the PTS cache
database (if the AFS PTS group support is used, which is not the
default). The PTS cache is in /var/ptclient/ptscache.db, and you
should remove it. This is because the format for the PTS cache for
IMSP has changed. If you use AFS ACLs, IMSPd, and IMAPd on the same
machine, make sure you have version 1.5a5 of the IMSP server for this
version of the IMAP server. (If you don't have IMSP, or AFS, don't
worry about it.)
Установка и настройка Cyrus IMAP Server
Internet Message Access Protocol (IMAP) является стандартным
протоколом Internet для доступа к сообщениям (почта, новости и т.
д.). IMAP хранит сообщения и обеспечивет к ним доступ.
Файл doc/questions.html содержит список вопросов которых анм не задают, но на которые мы хотели бы ответить; doc/faq.html содержит
некоторые ответы, над которыми нам пришлось задуматься.
Пожалуйста, обращайтесь к Sending Feedback
если вы хотите узнать о багах, особенностях или патчах.
Для уточнения конкретных изменений смотрите файл
doc/changes
в дистрибутиве.
Содержание
Другие материалы
Вот некоторое ПО, которое может работать вместе
с Cyrus'ом. Этот софт либо поддерживается либо не поддерживается CMU, это Вы можете
уточнить у распространителей(?).
-
Websieve, основаный на WWW интерфейс для управления скриптами Sieve.
-
Sendmail, самый распространенный и популярный MTA.
-
Postfix, главный конкурент предыдущего MTA.
last modified: $Date: 2002/11/14 16:23:04 $
Назад
info-cyrus mailing list
We run a mailing list for users of Project Cyrus software.
The
info-cyrus@andrew.cmu.edu mailing list exists for the
discussion of this server and other Cyrus software. Please do
NOT send subscription requests to the list.
To subscribe: Send mail to
majordomo@lists.andrew.cmu.edu
to subscribe with the body of 'subscribe info-cyrus' (or just click
the link above and that should just work).
An archive is availible via anonymous IMAP at
imap://cyrus.andrew.cmu.edu/archive.info-cyrus.
A web archive is also available at
http://asg.web.cmu.edu/archive/mailbox.php3?mailbox=archive.info-cyrus
If you are not subscribed to the list (or you are sending the
message from a different address than the one which you are subscribed
under), your message is directed to a human for
approval. Unfortunately, the human does not always promptly process
the message.
There is also a developers list available at cyrus-devel@lists.andrew.cmu.edu.
with similar subscription
methods and
archive location
Detailed contact information can be found at
http://asg.web.cmu.edu/cyrus/contacts.html
last modified: $Date: 2003/02/24 23:56:23 $
Return
Cyrus IMAP Server Офицальная информация
IMAP (Internet
Message
Access
Protocol) является
стандартным протоколом Internet
для
доступа к сообщениям (почта, доски объявлений, новости и т.д.). Сервер Cyrus
IMAP
отличается от других IMAP-серверов тем, что он может быть
использован в системах, где обычным пользователям не разрешен вход(login). Почтовая база данных
размещена в файловой системе и доступна только из Cyrus
IMAP. Пользователи могут
получать сообщения по IMAP, POP3, или KPOP-протоколу.
Почтовая
база данных разработана с учетом эффективности, масштабируемости и эффективности
администрирования. Возможно несколько конкурирующих соединений в режиме
чтения/записи к одному и тому же почтовому ящику. Сервер поддерживает списки
контроля доступа(
ACL
)
и квотирование.
Особенности
Cyrus
поддерживает протокол IMAP4rev1 описанный в RFC 3501. IMAP4rev1 был одобрен как рекомендованный
стандарт.
Кодировки, поддерживаемые для поиска: us-ascii, iso-8859-1, iso-8859-2, iso-8859-3, iso-8859-4, iso-8859-5, iso-8859-6, iso-8859-7, iso-8859-8, iso-8859-9, koi8-r, iso-2022-jp, iso-2022-kr, gb2312, big5, iso-8859-15, windows-1252, windows-1256. Очень может быть, что в
данной реализации таблицы символов содержат ошибки!
Сервер поддерживает любые аутентификационные механизмы, доступные из
библиотеки SASL. На
данный момент это: KERBEROS_V4, GSSAPI, CRAM-MD5, DIGEST-MD5, OTP, PLAIN, и STARTTLS.
Сервер поддерживает imaps/pop3s (IMAP/POP3 + SSL).
Сервер попытается сделать одну копию сообщения в БД адресованного нескольким
пользователям.
На данный момент поддерживаются следующие особенности IMAP:
IMAP4 IMAP4rev1 ACL
QUOTA LITERAL+ NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN
MULTIAPPEND SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES IDLE
STARTTLS
.
Есть
поддержка
SIEVE
,
для фильтрации сообщений на стороне сервера.
Upgrade Caveats
Эта секция зарезервирована.
Краткий обзор установки
Этот пакет распространяется только в виде исходного текста. Это означает, что
Вы должны скомпилировать и сконфигурировать все сами. Инструкции по установке
есть в
install.html
. Пожалуйста прочтите этот
документ.
Более детальный обзор сервера доступен в
overview.html
.
Этот
сервер нормально встает на
Unix
-системы.
Мы запускаем его на
SPARC
Solaris
2.7. Пожалуйста посмотрите
os.html
для решения проблем, связанных
с операционными системами.
Примечания
Формат именен почтовых ящиков соответствует netnews--иерархическим именам
разделенными символом "
.
". Ящики не имеющие "родителей" могут быть
созданы только администратором. Ящики имеющие "родителей" могут быть созданы в
соответствии с
ACL (Access
Control
List)
родительского ящика.
Персональные
почтовые ящики пользователей располагаются в иерархии "
user
".
Имена для всех персональных ящиков
для пользователя "
bovik
"
начинаются с префикса "
user
.
bovik
.
".
Ящик
"
user.bovik
"
является
для
пользователя
"
bovik
"
аналогом
"
INBOX
".
Создание
ящика "
user
.
bovik
"
эквивалентно созданию аккаунта для пользователя "
bovik
"-с
разрешениями "
bovik
"
для получения почты, создания персональных почтовых ящиков и подписки на ящики.
Удаление ящика "
user
.
bovik
"
удаляет все ящики начинающиеся с "
user
.
bovik
.
"
и удаляет подписку для "
bovik
".
Licensing Information
The following copyright applies to the code:
* Copyright (c) 1994-2000 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
If you find this software useful and valuable in your work, we
would welcome any support you can offer toward continuing this work.
We gratefully accept contributions, whether intellectual or monetary.
Intellectual contributions in the form of code or constructive
collaboration can be directed via the feedback
page.
If you wish to provide financial support to the Cyrus Project,
send a check payable to "Carnegie Mellon University" to
Project Cyrus
Computing Services
Carnegie Mellon University
5000 Forbes Ave
Pittsburgh, PA 15213
USA
Заключение
Если вы хотите инсталлировать сервер, то прочтите инструкцию по установке
install.html
.
Более подробная информация о сервере здесь.
Пожалуйста, прочтите
Sending
Feedback
если вы хотите оформить подписку на рассылку о багах и получать патчи.
Это майлинг-лист. Более подробно смотрите тут.
Список большинства известных проблем можно найти в
bugs
.html
.
У
O'Reilly
есть книга под названием
Managing
IMAP
. Там дохрена всего
полезного.
last modified: 2001/08/03 21:18:05
Return to the Cyrus IMAP Server Home Page
Cyrus IMAP Server Man Pages
User Commands
Subroutines
File Formats
System Administration
Замечания связанные с особенностями операционных систем
Все
- Теневые пароли
В любой
системе с теневыми паролями (включая Solaris 2.5 с
Unix-аутентификацией), прочтите тщательно документацию по SASL чтобы
удостовериться, что все настроенно правильно.
Solaris
- Современные системы Solaris имеют несколько полезных утилит в
/usr/proc/bin, среди
них есть pmap. Она может быть
использована для подсчета incremental cost (число не выделенных страниц) процесса
imapd, это может быть
полезно.
HP-UX
- Memory mapping support (mmap(2)
) в HP-UX не имеет правильной семантики для сервера Cyrus IMAP в
9.0 и 10.0 релизе операционной системы. Кажется, это связанно с использованием аппаратных средств. При
крупномасштабной системе почты рекомендуется выбрать другую платформу.
- HP-UX 9.0.4: Коментарии тестеров
C, который поставляется с HP-UX абсолютно не
подходит для unix-пакетов. Или HP-UX ANSI C developers kit должен
быть куплен отдельно от HP или GNU компилятор gcc (который может
собрать себя с помощью основного HP C) должен быть собран на целевой
системе.
Linux
- Синхронизирование обновления файловой системы.
Включая
синхронные обновления ext2fs, все обновления становятся синхронными. Это хорошо для надежности. Плохо
для производительности.
Была большая проблема с файлом ящиков. В
релизе2.0 и более поздних эта проблема решается с помощью размещения содержимого этого
файла в базе данных Berkerley DB.
Обратите внимание, что это только
для ext2fs. Если Вы используете более новую файловую
систему (такую как xfs, jfs или reiserfs) проблемы с
синхронизацией метаданных быть не должно. Хотя мы не смотрели как
работает сервер с другими файловыми системами linux. (Похоже, что разные
файловые системы поддерживают немного разную симантику, и нельзя сразу сказать
с какой системой все заработает, а скакой нет.)
Cyrus IMAP Server: Обзор и Концепции
Этот документ содержит обзор Cyrus IMAP server. Cyrus IMAP (Internet Message Access
Protocol) Server предоставляет доступ к почте и доскам объявлений посредствам протокола IMAP. Cyrus IMAP server является
масштабируемой почтовой системой разработанной для использования на предприятиях любого масштаба
с использованием основных стандартов
и технологий.
Cyrus IMAP позволяет создать несвязанную почтовую
систему настроенную через множество серверов (?). От
других IMAP-серверов Cyrus отличает то , что он
является "запечатанным" сервером, на котором пользователям не разрешено
логиниться. Почтовая база данных размещена в файловой системе и доступна
только из Cyrus
IMAP
. Пользователи могут
получать сообщения по IMAP, IMAPS, POP3, POP3S, или KPOP -протоколам.
Почтовая
база данных разработана с учетом эффективности, масштабируемости и эффективности
администрирования. Возможно несколько конкурирующих соединений в режиме
чтения/записи к одному и тому же почтовому ящику. Сервер поддерживает списки
контроля доступа(
ACL
)
и квотирование.
Этот документ организован следующим образом:
Имена
почтовых ящиков
По умолчанию, Cyrus IMAP Server для именования ящиков использует соглашение имен
netnews
. Именя ящиков чувствительны к регистру. Именя не могут начинаться с
символа "." , и не может содержать два подряд идущих символа ".".
Не
ASCII символы и метасимволы shell не допускаются.
По желанию, вы можете использовать соглашение об иерархии UNIX.
Все персональные ящики пользователя "bovik" начинаются
со строки "user.bovik.". Например, если пользователь "bovik" имеет ящик "work", то этот ящик будет иметь
имя "user.bovik.work". Для пользователя "bovik ",
однако, префикс "user.bovik." будет виден как "INBOX.". Т.е. "user.bovik.work" будет выглядеть
как "INBOX.work". Если ACL этого ящика разрешает другим пользователям просматривать этот ящик, то
они будут видеть его как "user.bovik.work".
Почтовый ящик "user.bovik" - это нечто, где
пользователь "bovik " получает новую почту и это
нечто пользователь "bovik" видит,
как "INBOX". В этом документе ящик
"user.bovik " есть INBOX для пользователя
"bovik".
Администраторы создают и удаляют пользователей посредствам создания и уделения
пользовательских INBOX-ов. Если пользователь имеет INBOX, значит ему разрешено подписываться на этот ящик. Только пользователи
без точек в своем имени могут иметь INBOX. (Пользователи с точками в имени смогут логиниться, но не смогут получать почту.
Но если Вы используете в качестве разделителя UNIX-иерархический разделитель(как правило '/'), то любой пользователь
может именть точку в имени и все будет работать.)
Когда админ удаляет пользовательский INBOX, то
все персональные почтовые ящики этого пользователя удаляются..
В контексте, где разрешены относительные имена ящиков, именование
осуществляется следующим образом:
- Имена, которые НЕ начинаются с "." являются абсолютными.
- Имена которые начинаются с "." являются
относительными.
Таким образом, если Вы работаете с папкой, у
которой самая верхняя родительская папка "cmu. ", имя "comp.infosystems.www"
преобразуется в "comp.infosystems.www",
а имя ".comp.infosystems.www" преобразуется
"cmu.comp.infosystems.www".
Cyrus IMAP Server может использовать альтернативное именование
которое позволяет пользователям видеть их личные ящики
на одном уровне с INBOX
. При этом может оказаться, что
несколько пользователей используют одно и тоже имя ящика (2 разных пользователя могут иметь ящик
"work"), но внутренне представление всеравно остается вида: user.name.work.
Т.е. иерархия папок сохраняется, но пользователи видят все это, как будто
никакой иерархиинет и все папки всех пользователей лежат в корне сервера. -Прим.
пер.
Доступ к каждому ящику контролируется с помощью списка контроля доступа конкретного ящика (ACL). Access
Control Lists (ACL)
обеспечивает мощный механизм для определения пользователей и групп пользователей, которые имеют доступ к конкретному ящику. ACL может
состоять из нуля или больше записей. Каждая запись состоит из идентификатора и разрешений. Идентификатор определяет
пользователя или группу пользователей к которым применяется данная запись. Разрешения состоят из одной или
больше буквы или цифры, каждая буква или цифра дает определенную привелегию.
-
l
- lookup
- Пользователь может видеть, что ящик существует.
-
r
- read
- Пользователь может
читать из ящика. Пользователь может выбрать ящик, получить данные, произвести
поиск и скопироватиь данные из ящика.
-
s
- seen
- Удержание состояния пользователя. "Seen" и "Recent" флаги для пользователя устанавливаются.(?)
-
w
- write
- Пользователь может менять флаги
ки ключевые слова кроме "Seen" and "Deleted" (последние управляются др. правами доступа).
-
i
- insert
-Пользователь может помещать в ящик новое сообщение.
-
p
- post
- Пользователь может посылать почту на
адрес данного ящика. Это право отличается от права "i" тем, что в
данном случае система доставки добавляет к письму служебную
информацию.
-
c
- create
- Пользователи могут создавать подъящики от
этого ящика, а так же удалять или переименовывать этот ящик.
-
d
- delete
- Пользователь может хранить флаг "Deleted"
и производить вычеркивание.
-
a
- administer
- Пользователь может
минять ACL ящика.
Вы можете комбинировать права. Например:
-
lrs
-
- Пользователь может читать из ящика.
-
lrsp
- Пользователь может читать из ящика и может
посылать почту через систему доставки. Большинство систем доставки не
обеспечивают аутентификации, так что разрешение "p" обычно имеет значение только для пользователя "anonymous".
-
lr
- Пользователь может видеть ящик и может из него читать, но сервере не сохраняет флаги "Seen" и "Recent". Этот набор прав
прежде всего необходим пользователю "anonymous IMAP."
-
rs
-
Пользователь может читать из ящика и сервер выставляет флаги "Seen" и "Recent", но
пользователь ен может увидеть ящик с помощью команд для просмотра списка ящиков. Чтобы
получить доступ к ящику пользователь должен знать его имя.
-
lrsip
- Пользователь может читать или писать в ящик
через IMAP или через систему доставки ссобщений.
Идентификатор определяет пользователя или группу пользователей
к которым применяется данная запись.
Существует два специальных идентификатора, "anonymous"
и "anyone". Значение других идентификаторов зависит от используемого механизма авторизации(механизм .авторизации
определяется параметром --with-auth во время компиляции, поумолчанию используется Kerberos).
Не зависимо
от используемого авторизационного механизма определены
два идентификатора. Идентификатор "anonymous"
представляет анонимного
или неавторизированного пользователя. Идентификатор "anyone" представляет всех пользователей, включая
анонимного пользователя.
Cyrus IMAP Server поставляется с тремя аутентификационными
механизмами: один совместим с Unix-авторизацией("/etc/passwd"), один для использования с Kerberos и один для использования с Kerberos и группами AFS.
Помните авторизация это не
аутентификация. Аутентификация это процесс определяющий кто Вы.
Авторизация это прцесс определяющий Ваши права. Аутентификация обсуждается в разделе
Login Authentication
. Если хотите узнать больше о разнице между авторизацией
и аутентификацией - читайте FAQ.
В аворизационном механизме Unix идентификаторы
являются или действительными пользователями или группой, которая описанна в файле "/etc/group".
Так же можно использовать группы Unix аутентифицированные
через НЕ-/etc/passwd механизм. Помните, использование групп, не ассоциированных с пользователями в /etc/passwd, не рекомендуется.
При использование авторизационного механизма Kerberos, идентификаторы имеют следующий
вид:
principal.instance@realm
Если ".instance
" опущен, то
поумолчанию принимается как
пустая строка. Если "@realm
" опущен, то поумолчанию принимается
как локальная область.
"
Principal
", "
instance
" или
"
realm
" могут быть заменены на "*
".
- "*" в
идентификаторе пердставляет всех пользователей с
пустым экземпляром в локальной области.
- "*.*@FOO.COM" представляет
всех пользователей во всех экземплярах в FOO.COM.
- "*.*@*" в идентификаторе представляет всех Kerberos-аутентификцированных.
Все из вышесказанного не относиться к анонимному пользователю.
Файл "/etc/krb.equiv" содержит соответствия между пользователями
Kerberos. Файл содержит ноль или более строк, каждая из которых состоит из
двух полей. Идентификатор в первом поле строки канонизируется в идентификатор
во втором поле. Например, следующая срока в файле "/etc/krb.equiv ":
bovik@REMOTE.COM bovik
обозначает, что "bovik@REMOTE.COM" будет восприниматься как локальный идентификатор "bovik".
Отрицательные
права.
Любой из вышеописанных идентификаторов может быть с символом "-
". В этом случае
связанные права этого идентификатора будут удалены. "отрицательные права".
Определяяя набора прав назначенных пользователю, сервер сначала
подсчитывает все права пользователя и группы, которой он принадлежит. Затем сервер подсчитывает и
удаляет все отрицательные права права пользователя и его группы.
Например возмем ACL:
anyone lrsp
fred lwi
-anonymous s
Пользователю "fred" будут назначены права "lrswip
" и анонимному пользователю права "lrp".
Неявные права
администраторов для почтовых ящиков
Независимо от ACL
почтовых ящиков, пользователи перечисленные в опции "admins" в файле "/etc/imapd.conf
" имеют права "l" и "a" на все почтовые ящики. Пользователи
также имеют неявные права "l" и "a
" на свои INBOX'ы и все свои персональные ящики.
Когда создается новый ящик, его ACL копируется из ACL самого близкого родительского ящика. Когда создается
пользователь, ACL его INBOX содержит все права для этого
пользователя . Когда создается не пользовательский почтовый ящик не имеющий родителей, его ACL устанавливается равный
опции "defaultacl" в "/etc/imapd.conf"
Заметьте, что некоторые права устанавливаются
неявно, например 'anonymous' всегда имеет право 'p' на пользовательские INBOX'ы, а пользователи всегда
имеют права на ящики в пределах иерархии своих INBOX'ов.
В этом разделе обсуждаются различные типы методов аутентификации
(способы залогиниться), которые могут быть использованы в Cyrus IMAP.
Для аутентификации
Cyrus IMAP Server использует библиотеку Cyrus SASL. В этом разделе написанно, как
настроить SASL для использования совместно с Cyrus imapd. Пожалуйста изучите Cyrus SASL
System Administrator's Guide для более точной информации.
Независимо от механизма SASL, используемого для
индивидуальных подключений, сервер может поддерживать анонимный вход. Если
опция "allowanonymouslogin " в "/etc/imapd.conf" присутствует, то сервер разрешит логиниться с открытым
текстом(plaintext) для пользователя "anonymous", для которого может быть
указан любой
пароль. Также, сервере будет разрешать любые механизмы SASL которые позволяют осуществить
анонимный вход.
Библиотека SASL может осуществлять
верификацию plaintext-паролем несколькими путями. Plaintext-пароли передаются либо командой IMAP LOGIN, либо механизмом SASL PLAIN (ниже уровня TLS).
- PAM
-
Kerberos v4 Plaintext-пароли верифицируются
с помощью получения билета от сервера Kerberos, что защищает
сервер Kerberosот spoofing-атак.
-
/etc/passwd
-
/etc/shadow
- etc.
Метод верификации с помощью plaintext-паролей всегда осуществляется
через библиотеку SASL, даже в случае использования внутренней команды LOGIN. Это позволяет только библиотеке SASL
быть источником аутентификационной информации. Почитайте про опцию sasl_pwcheck_method
в документации на SASL, чтобы понять, как настроить
верификацию plaintext-паролем в вашей системе.
Для отключения аутентификации по plaitext-паролям Вы можете
установить 'a llowplaintext:no' в
imapd.conf. При этом PLAIN под TLS
все еще будет работать, но команда IMAP LOGIN работать не будет.
Механизм SASL Kerberos поддерживает механизм аутентификации KERBEROS_V4
. Механизм требует, чтобы файл
srvtab существовал там, куда указывает конфигурационная
опция "srvtab ". Файл srvtab должен быть доступен для чтения Cyrus'у и должен содержать служебный ключ
"imap.<host>
@<realm>
", где
<host>
- это первый компонент имени хоста сервера, а
<realm>
- это область сервера Kerberos.
Сервер будет разрешать имена пользователей идентифицируя
их в локальной области и в областях перечисленных в опции "loginrealms
" в "/etc/imapd.conf".
Файл "/etc/krb.equiv" содержит соответствия между пользователями Kerberos. Вайл содержит ноль
или более строк, каждая из которых состоит из двух полей. Идентификатор
в первом поле может быть залогинен, как будто это идентификатор из второго поля.
Если конфигурационная опция"loginuseacl
" включена, то любому идентификатору Kerberos, у которого есть право "a "
на пользовательский INBOX, будет разрешено логиниться как будто это пользователь этого ящика.
Некоторые механизмы требуют чтобы
пользоваетли и сервер имели разделяемый секрет который может быть использован для проверки пароля без
передачи последнего открытым текстом по сети. Для таких механизмов (например CRAM-MD5 и DIGEST-MD5), Вы должны
обеспечить источник паролей, такой как sasldb (более подробно все это описано в документации на Cyrus
SASL)
Квоты
приминяются системными администраторами для ограничения использования
ресурсов иерархией почтовых ящиков на сервере.
Cyrus
IMAP Server поддерживает квотирование на хранилище, которое определяется как число байт в сообщении RFC-822,
in kilobytes. Каждая копия сообщения подсчитывается независимо, даже если сервер использует жеский
ссылки на копии для уменьшения используемого дискового пространства.Дополнительное дисковое пространство, используемое
индексными файлами и файлами кеша, не учитывается.
Квота примененная к корню, может быть применена на любом
уровне иерархии. Квота корня не может быть квотой на ящик.
Квота корня применяется к сумме объема использованного
ящиком и всеми его подъящиками у которых нет своей квоты. Это означает, что у
ящика может быть только одна корневая квота.
Например, если ящики
user.bovik
user.bovik.list.imap
user.bovik.list.info-cyrus
user.bovik.saved
user.bovik.todo
существуют, и есть квоты на ящики
user.bovik
user.bovik.list
user.bovik.saved,
то корневая квота "user.bovik" применяется
к ящикам "user.bovik" и "user.bovik.todo"; корневая квота "user.bovik.list" применяется к
ящикам "user.bovik.list.imap" и
"user.bovik.list.info-cyrus"; коренвая
квота "user.bovik.saved " применяется к ящику
"user.bovik.saved".
Корневая
квота создается автоматически при выполнении
команды "setquota". Корневые квоты не могут быть удалены
через протокол, читайте Удаление корневых квот
чтобы узнать, как удалить их.
Обычно, когда сообщение должно быть помещено в ящик, корневая квота
должна иметь достаточно неиспользованного места, иначе помещение сообщения в ящик будет заблокированно из-за превышения квоты.
Доставка почты - особый случай. При доставки сообщения в
ящик, корневая квота этого ящика не должна быть превышена. Если квота не
превышена, то только одно сообщение может быть доставлено независимо от его
размера. Это вызывает превышение квоты данным ящиком,
поставив в известность пользователя и дав ему возможность исправить ситуацию(?). Еслиб в
таком случае доставка не разрешалась, то пользователь не узнал бы, что была почта которую нельзя доставить.
-- Прим. пер.
Т.е. наверное хотели сказать, что при доставки
сообщения проверяется не превышена ли
квота в данный момент, без учета размера поступающего сообщения. После доставки ящик проверяется
еще раз(с учетом нового сообщения) на превышение, и если квота превышена, то пользователю высылается уведомление.
---
Если квота
превышена,
то доставка будет неудачной с временной ошибкой. Это заставит систему доставки в течении нескольких
дней пытаться заново доставить сообщение, (давая пользователю возможность исправить проблему) а затем вернуть его отправителю.
Предупреждение при превышении квоты для пользователя
имеющего право "d "
Когда пользователь выбирает ящик,
корневая квота которого превышена или близка к этому, и пользователь имеет право "d
" на этот ящик, сервер выдаст пользователю предупреждение о
превышении квоты. Порог после которого выдается предупреждение устанавливаетя конфигурационной опцией "quotawarn ".
Сервер выдает такое предупреждение только если пользователь имеет право "d" на ящик,
т.к. только пользователи с правом "d" могут решить проблему превышения квоты
в конкретном ящике.
Корневые квоты независимы от разделов. Одна корневая квота
может быть применена к ящикам находящимся в разных разделах.
Cyrus IMAP server содержит демона уведомлений, который поддерживает
множественные уведомления о новой почте. Уведомления могут быть настроенны для отправки посредствам нормальной
оставки (класс"MAIL" ) и/или как запрос к скрипту Sieve (класс"SIEVE" ).
По умолчанию оба
типа отключены. Уведомления включаются спомощью использования одной из следующих опций(могут быть использованны
одновременно обе):
-
"mailnotifier" устанавливает для notifyd метод используемый для
класса "MAIL "
-
"sievenotifier" устанавливает для notifyd метод используемый для класса
"SIEVE " (когда метод
не оперделет самим Sieve)
Разделы
Разделы ползволяют администраторам
хранить почтовые ящики в разных частях файловой системы Unix. Это сделано для того,
чтобы можно было распределить всю иерархию почтовых ящиков по нескольким дискам.
Когда
администратор создает новых ящик, имя раздела для этого ящика может быть задано вторым
аргументом команды "create
". Не-администраторам не разрешается определять разделы для
ящиков. Если раздел не определен, то ящик наследует раздел от
самого близкостоящего к нему по иерархии родителя. Если ящик не имеет родителей, то раздел
для него задается конфигурационной опцией "defaultpartition
".
Дополнительный второй аргумент к команде "create
" могут использовать только предопределенные в настройках администраторы,
например такие как cyradm.
Администратор может изменять раздел ящика при
помощи команды "rename" с дополнительным третьим аргументом. Когда указан третий аргумент, первый
и второй аргументы могут быть одинаковыми - в этом случае
ящик не переименовывается, а только меняется его раздел. Если третий аргумент не задан,
а первый аргумент не "INBOX
", то раздел ящика не изменится. Если третий аргумент не задан, а первый аргумент
равен "INBOX ", то раздел
будет такой же, как после команды "create" для
этого ящика.
Раздел содержит обзор
концепций для реализации экспорта новостных групп(телеконф.) черех IMAP-сервер.
Раздел "news"
Раздел с именем "news" зарезервирован
для netnews(конференции) и
неможет быть использован для других целей.
IMAP-сервер может экспортировать конференции как почтовые ящики IMAP. Это
делается с помощью создания раздела с именем "news" который указывает на буферную
директорию новостей (news spool) в которой создается вспомогательная база данных для IMAP-сервера. В данном
сервере есть необходимый софт для интеграции с INN-сервером(Internet Net
News). Следующая информация предпологает наличие практических знаний по работе INN-сервера.
Программа "collectnews" получает на входе
список путей статей(тем) относительно spool-директории. Таким образом
все сообщения помещаются во вспомогательную БД. Если collectnews
сталкивается с конференцией у которой нет передающего ящика
IMAP перечисленного в файле почтовых ящиков (описанно ниже), то такой
ящик создается.
Т.е. на каждую конфу создается отдельный ящик, все(или не все) пользователи
имеют доступ к этим ящикам. -Прим. пер.
Программа "collectnews" обычно запускается cron'ом от имени cyrus-пользователя. Т. к.
collectnews должна будет осуществлять запись во вспомогательную
БД расположенную spool-директории, cyrus-пользователь должен входить в новостную группу, а
новостная группа должна иметь право на запись в spool-директорию.
Программа "rmnews" получает на входе список
путей статей(тем) относительно spool-директории. Она удаляет любые ссылки(т.е. все экземпляры
сообщений -Прим. пер.) сообщений во вспомогательной базе и отсоединяет файлы
статей. Программа "rmnews" используется для
удаления устаревших и закрытых статей(тем).
У "Rmnews" такой же
формат вводимых данных как и у программы "fastrm". Обычно "Rmnews
" запускают для очистки после устаривания
вызыва news.daily с аргументом "delayrm
" и с RMPROC в expirerm измененным с
"fastrm" до "rmnews".
Rmnews также можно запускать из cron'а от имени cyrus-пользователя для remove завуршенных и
отмененных статей(тем).
Поскольку деятельность "rmnews" связана с изменениями во вспомогательной
базе, то она должна быть установленна(запущена -Прим. пер.) с
uid таким же как у user-пользователя и gid таким же, как у
новостной группы.
Программа "syncnews" получает в качестве аргумента имя файла активных новостей. Она сравнивает список новостных ящиков IMAP с файлом активных новостей. Новостные
ящики не перечисленные в файле активных новостей удаляются. Для конференций перечисленных в этм файле, но не
имеющих ящиков IMAP создаются новые ящики.
Конференция должна иметь статус ``y'',
``m'', или ``n'' указанный в файле активных
новостей. Программа "syncnews " должна запускаться от имени
cyrus-пользователя через cron хотябы раз в день.
Сервер POP3
В Cyrus IMAP Server имеется POP3-сервер. Из-за ограничений в протоколе POP3, сервер может предоставить доступ только к
пользовательскому INBOX'у и в одну
единицу времени POP3-сервер может работать только с одним пользователем. Пока POP3-сервером открыт пользовательский INBOX, любые другие конкурирующие
IMAP-сессии будут неудачными.
Короче говоря - конкурирующие подключения(и к POP3 и к IMAP) в случае
использования POP3-сервера не поддерживаются.
Когда используется вход с Kerberos-аутентификацией, пользователи POP3-сервера будут иметь
идентификаторы "pop.host@realm
" вместо
imap.host@realm
, где
"
host
" первый компонент имени
хоста сервера, а "
realm
" облать Kerberos. Когда POP3-сервер запускается с ключем "-k", он будет экспортировать протокол MIT
KPOP вместо обычного POP3.
Cyrus IMAP Server пишет сообщения в логи через средство(фасилити, facility) "local6
" syslog'а. Используются следующие уровни важности:
-
CRIT - Критическая
ошибка требующая вмешательства администратора в работу сервера
-
ERR -
I/O-ошибка, включая отказ в обновлении квоты. Сообщение syslog'а включает файл и Unix-ошибку(системную)
-
WARNING - Срабатывания механизма защиты, таймауты клиентской
НЕактивности
-
NOTICE - Аутентификация, обе - удачная и неудачная
-
INFO -
Открытия ящиков, подавление двойной доставки
Этот раздел описывает различные базы данных используемые сервером Cyrus IMAP и что
можно сделать при несовместимости этих баз.
Самая
большая база -
это директории почтовых ящиков. Каждая директоря (у каждого
ящика своя директория -Прим. пер.) соедржит:
- файлы сообщений
- Это один файл на сообщение,
содержащий сообщение в формате RFC 822. Строки в сообщении разделены символами CRLF, а не LF. Имя файла
каждого сообщения является UID сообщения следующим за точкой (.).
В новостных конференциях,
соответствуют формату и соглашеню о именовании которое определяется новостным софтом .
-
cyrus.header
- Файл
содкржит системные коды и информацию нефиксированного размера о ящике.
-
cyrus.index
- Файл
содержит информацию фиксированного размера о ящике и каждом сообщении в ящике.
-
cyrus.cache
- Содержит информацию нефиксированного
размера о каждом сообщении в ящике.
-
cyrus.seen
- Этот файл содержит информацию
нефиксированного размера о состоянии каждого пользователя, который имеет право "s" на этот
ящик.
Программа "reconstruct" может быть использованна
для восстановления поврежденных директорий ящиков. Если "reconstruct" сможет найти существующий
заголовок и
индексные файлы, то она попытается сохранить любые данные которые неудается получить непосредственно из файлов
сообещний. Режим "reconstruct" будет пытаться
сохранить имена флагов, состояние
флагов и внутреннюю дату. Всю остальную информацию "reconstruct
" получает из файлов сообщений.
Администратор может восстановить информацию в резельтате повреждения диска восстановив сообщения из бэкапа и запустив reconstruct для
генерирования директорий из других файлов.
Программа "reconstruct" не регулирует квотирование описанное в любых файлах
корневых квот. После запуска reconstruct, будет нелишним запустить "quota -f " (описанно ниже) для
исправления файлов корневых квот.
ЗАМЕЧАНИЕ: В ДАННЫЙ
МОМЕНТ НЕПОДДЕРЖИВАЕТСЯ
Файл ящиков в конфигурационной
директории - самый критический во
всей системе Cyrus IMAP. Он содержит упорядоченный список всех ящиков в системе, вместе
с
ящиками содержится корневыя квота и ACL. Для реконструирования поврежденного файла ящиков, необходимо запустить команду "reconstruct
-m " .Программа "reconstruct
", когда получит ключ "-m", очистит и
откорректирует всю информацию, которую сможет найти в файле ящиков. Она просканирует все разделы
перечисленные в файле imapd.conf file чтобы добавить их в файл ящиков
все расположенные там директории ящиков.
Файл cyrus.header в каждой директории каждого ящика содержит резервную копию ACL этого ящика, эта копия используется как бэкап
при перестроении файла ящиков.
Поддиректория "quota" конфигурационной
директории (определяется
конфигурационной опцией "configdirectory") содержит один файл на одну корневую квоту, с именем файла таким же, как
имя корневой квоты. Эти файлы содержат информацию об использовании квоты и лимитах на каждую корневую квоту.
Программа "quota " с ключем "-f", пересчитает корневые квоты для всех ящиков и использование
квоты для каждой корневой квоты.
Для удаления коренвых квот нужно файл корневых квот. Затем
запустить "quota -f " чтобы создать файл корневых квот заново.
Поддиректория "user" конфигурационной директории содержит пользовательские подписки. Это один файл на пользователя, в качестве имени
файла идентификатор пользователя + ".sub ". Каждый файл содержит упорядоченный список
подписанных ящиков.
Программы для
восстановления поврежденного файла подписок нет. Файл подпискок можно восстановить из бэкапа.
Конфигурационная директория
Большая часть объектов конфигурационной директории
описана в разделе восстановления Mail Directory. Этот раздел
документирует две другие поддиректории расположенные в конфигурационной директории.
Поддиректория "log
" в конфигурационной директории позволяет администраторам осуществлять протоколирование пользовательских сессий.
Если в директории "log"
существует поддиректория именем таким
же, как имя какого-либо пользователя, то IMAP и POP3-сервера будут вести логи этого
пользователя. Логи будут расположены в файлах с именами равными идентификатору процесса сервера и будут начинаться
с первой команды следующей после аутентификации.
Директория "proc"
Поддиректория "proc" в конфигурационной директории содержит по одному файлу на каждый процесс сервера. Имена файлов -
это представленные в ASCII идентификаторы процессов сервера, а содержимо состоит из двух разделенных
табом(tab) полей:
- имя хоста клиента
- login-имя пользователя, если тот залогинен
- выбранный ящик, если какой-либо ящик выбран
Файл может содержать произвольные символы после символа новой
строки.
Поддиректория "proc " обычно
очищается при перезагрузки сервера.
Доставка сообщений
MTA, такие как Sendmail, Postfix, или
Exim взаимодействуют с Cyrus'ом через LMTP (Local Mail Transport
Protocol) с помощью демона LMTP. Это может быть реализовано
либо напрямую от MTA (это наиболее предпочтительно из соображений о
скорости передачи) или через LMTP-клиента.
Local Mail Transfer Protocol
LMTP, Local Mail Transfer Protocol, является
версией(вариантом) SMTP разработанной для доставки сообщений до конечной
точки хранения. LMTP позволяет MTAs доставлять "local"-почту через сеть. Такой механизм легко оптимизируется, т. к. IMAP-сервер не должен
обслуживать очередь сообщений или быть совместимым с MTA. (короче говоря - это просто протокол(типа SMTP) для
передачи сообщений от MTA к почтовику, в нашем случае к Cyrus'у - Прим.
пер.)
Сервер Cyrus работает по LMTP через демон lmtpd. LMTP можно пользоваться либо
через сеть посредствам TCP, либо либо локально через сокеты UNIX(доменные гнезда).
Между этими двумя альтернативами есть разница в безопастности; читайте об
этом ниже.
Для конечной доставки по LMTP через TCP-сокет
необходимо оспользовать LMTP AUTH. Это можно осуществить используя SASL аутентификации пользователя доставки. Если Ваш почтовый сервер осуществляет
доставку через LMTP AUTH (т. е., используя механизм SASL), Вам нужно будет сделать так, чтобы Ваш аутентификационный идентификатор
был LMTP-админом (указан в опции admins в imapd.conf или в опции
lmtp_admins ).
Альтернативный способ заключается в
доставке по LMTP через сокет unix от имени пользователя с правами адинистратора(?) (контроль
доступа осуществляется на основании прав доступа к этому сокету).
Заметьте, если у пользователя есть скрипт
sieve, то этот скрипт запускается с правами *этогоt* пользователя
и права отправляющего(post user) пользователя игнорируются с целью определения результата sieve-скрипта.
Хранение в единственном экземпляре
Если осуществляется доставка нескольким получателям (возможно только если MTA использует LMTP через lmtpd
), сервер попытается сохранить несколько копий сообщениий, если это возможно.
Будет создана одна копия на раздел, и созданы жестские связи(не символьные) на
сообщение для всех получателей.
Хранение в единственном экземпляре может быть выключено с
помощью использования флага "singleinstancestore" в конфигурационном файле.
Подавление двойной доставки
Сообщение считается продублированным если две
копии собщения имеют одинаковый идентификатор (message-id) и
одного и того же получателя. Cyrus использует для хранения информации
о дубликатах специальную базу данных, информация в базе храниться поумолчанию 3 дня. (Т.е.
все записи старше трех дней вытераются из базы - Прим. пер.)
Подавление двойной доставки можно отключить
с помощью флага "duplicatesuppression" в конфигурационном файле.
Sieve, Mail Filtering Language(язык фильтрации сообщений)
Sieve является языком
фильтрации сообщений который
может фильтровать сообщения в указанных почтовых ящиках IMAP во время доставки по lmtp. Для подробностей жми
сюда.
Cyrus Murder, IMAP Aggregator
Теперь Cyrus поддерживает
распределение ящиков по нескольким IMAP-серверам,
таким образом достигается горизонтальная масштабируемость. За полее детальной информацией по
настройке такой сисьемы жмите сюда.
Вернуться на Cyrus IMAP Server Home Page
- why is it so hard to get imapd working with redhat's
shadow password implementation?
- When does imapd advertise PLAIN? when does it accept
plaintext logins?
- What are the advantages of LMTP?
- How do I configure Sendmail to use LMTP?
- How do I configure Postfix to work with Cyrus? To use LMTP?
- How can I run LMTP over TCP? Why should I want to?
- What are the performance implications of single-instance store?
(in effect as of 1.6.22) How should I configure partitions to deal
with a large number of users?
Sieve: A mail filtering language
Sieve is a Internet standards-track protocol for filtering messages on
delivery. The Cyrus Sieve implementation supports filing messages
into specific folders, forwarding messages, rejecting messages, and
the standard vacation function. It can reply to messages based on
headers or envelope information.
Cyrus Sieve
Some simple sample Sieve scripts
Cyrus IMAP Server Protocol Specifications