Summary: high-performance mail store with imap and pop3, with authentication through SQL, virtual domain support and admin CGIs Name: cyrus-imapd-sql Version: 1.6.24 Release: 7 Copyright: academic/research Group: System Environment/Daemons URL: http://asg.web.cmu.edu/cyrus/imapd/ Packager: Vladimir Ivaschenko #Icon: cyrus.gif Source0: cyrus-imapd-sql-1.6.24.tar.gz Source1: cyrus-README Source2: cyrus-procmailrc Source3: cyrus-deliver-wrapper.c Source4: cyrus-user-procmailrc.template Source5: cyrus-redhat-procmail+cyrus.mc Source6: sendmail.cyrus.mc Source7: sql-auth.tar.gz Patch0: hzd-timsieved.patch Patch1: hzd-auth_plain.patch Buildroot: /var/tmp/cyrus-imapd-root Requires: cyrus-sasl >= 1.5.3 %description The Cyrus IMAP server is a scaleable enterprise mail system designed for use from small to large enterprise environments using standards-based technologies. A full Cyrus IMAP implementation allows a seamless mail and bulletin board environment to be set up across multiple servers. It differs from other IMAP server implementations in that it is run on "sealed" servers, where users are not normally permitted to log in. The mailbox database is stored in parts of the filesystem that are private to the Cyrus IMAP system. All user access to mail is through software using the IMAP, POP3, or KPOP protocols. Note that this package can be used by ISPs and other to provide mail services, but it may not be distributed as part of a commercial product. This package also comes with authcheck daemon which permits authentication of users through SQL, as well as other things. Look at the documentation directory for details. %prep rm -rf $RPM_BUILD_ROOT %setup -q -n cyrus-imapd-sql-%{version} %setup -a 7 %patch0 -p0 %patch1 -p0 %build #if [ ! -d /usr/lib/sendmail-cf/cf ] ; then # echo Need full sendmail-cf installation # exit -1 #fi (ln -s /usr/lib/libtclx8.0.4.a /usr/lib/libtcl.a) # prepare a makedepend cd makedepend ./configure make export PATH=$PATH:`pwd` cd .. # now go ahead # I hope one day there is --with-login=pam :-) cp $RPM_BUILD_DIR/cyrus-imapd-sql-1.6.24/et/com_err.h \ $RPM_BUILD_DIR/cyrus-imapd-sql-1.6.24/imap ./configure --with-tcl=/usr --prefix=/usr --with-auth=plain --without-krb make gcc -Wall -o deliver-wrapper $RPM_SOURCE_DIR/cyrus-deliver-wrapper.c %install rm -rf $RPM_BUILD_ROOT # First create the 'cyrus' user if it doesn't exist grep ^cyrus: /etc/passwd >/dev/null || { echo 'cyrus:*:76:12:cyrus:/var/imap:/bin/bash' >>/etc/passwd } cp -p $RPM_SOURCE_DIR/cyrus-README $RPM_BUILD_DIR/cyrus-imapd-sql-%{version}/README.RPM make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/cyrus/bin install -g mail -m 2755 -s deliver-wrapper $RPM_BUILD_ROOT/usr/cyrus/bin/deliver-wrapper mkdir -p $RPM_BUILD_ROOT/etc cat <$RPM_BUILD_ROOT/etc/imapd.conf configdirectory: /var/imap partition-default: /var/spool/imap admins: admin sasl_pwcheck_method: pwcheck allowanonymouslogin: no END mkdir $RPM_BUILD_ROOT/usr/sbin cp $RPM_BUILD_DIR/cyrus-imapd-sql-1.6.24/sql-auth/authcheck.conf.sample $RPM_BUILD_ROOT/etc/authcheck.conf cp $RPM_BUILD_DIR/cyrus-imapd-sql-1.6.24/sql-auth/authcheck.pl $RPM_BUILD_ROOT/usr/sbin/authcheck.pl chmod a+x $RPM_BUILD_ROOT/usr/sbin/authcheck.pl cp -p $RPM_SOURCE_DIR/cyrus-procmailrc $RPM_BUILD_ROOT/etc/procmailrc.cyrus mkdir -p $RPM_BUILD_ROOT/usr/cyrus/etc cp -p $RPM_SOURCE_DIR/cyrus-user-procmailrc.template $RPM_BUILD_ROOT/usr/cyrus/etc/user-procmailrc.template mkdir $RPM_BUILD_ROOT/etc/logrotate.d cat <$RPM_BUILD_ROOT/etc/logrotate.d/cyrus-imapd /var/log/imapd.log { nocompress } END mkdir $RPM_BUILD_ROOT/etc/cron.daily cat <$RPM_BUILD_ROOT/etc/cron.daily/cyrus-imapd #!/bin/bash su cyrus -s /bin/bash -c '/usr/cyrus/bin/deliver -E 3' END chmod +x $RPM_BUILD_ROOT/etc/cron.daily/cyrus-imapd mkdir -p $RPM_BUILD_ROOT/var cd $RPM_BUILD_ROOT/var mkdir -p imap chown cyrus:mail imap chmod 750 imap cd imap if [ ! -f mailboxes ] ; then true >> mailboxes fi mkdir user quota proc log msg deliverdb chown cyrus:mail * mkdir -p $RPM_BUILD_ROOT/var/spool cd $RPM_BUILD_ROOT/var/spool mkdir -p imap chown cyrus:mail imap chmod 750 imap mkdir -p $RPM_BUILD_ROOT/usr/sbin ln -s ../cyrus/bin/imapd $RPM_BUILD_ROOT/usr/sbin/imapd ln -s ../cyrus/bin/pop3d $RPM_BUILD_ROOT/usr/sbin/ipop3d mkdir -p $RPM_BUILD_ROOT/usr/lib/sendmail-cf/cf cp -p $RPM_SOURCE_DIR/cyrus-redhat-procmail+cyrus.mc $RPM_BUILD_ROOT/usr/lib/sendmail-cf/cf/redhat-procmail+cyrus.mc mkdir -p $RPM_BUILD_ROOT/usr/cyrus/etc install -m 644 $RPM_SOURCE_DIR/sendmail.cyrus.mc $RPM_BUILD_ROOT/etc/sendmail.cyrus.mc %clean rm -rf $RPM_BUILD_ROOT %pre # create the 'cyrus' user if it doesn't exist grep ^cyrus: /etc/passwd >/dev/null || { echo 'cyrus:*:76:12:cyrus:/var/imap:/bin/bash' >>/etc/passwd } %post # update syslog grep ^local6 /etc/syslog.conf >/dev/null || { echo "local6.debug /var/log/imapd.log" >>/etc/syslog.conf killall -1 syslogd 2>/dev/null } touch /var/log/imapd.log chmod 640 /var/log/imapd.log # update inetd to run as user 'cyrus' sed '/^imap/s/root/cyrus/;/^pop-3/s/root/cyrus/' /etc/inetd.conf.tmp && mv /etc/inetd.conf.tmp /etc/inetd.conf && killall -1 inetd 2>/dev/null # force synchronous updates cd /var/imap chattr +S . user quota 2>/dev/null chattr +S /var/spool/imap 2>/dev/null chown -R cyrus /var/spool/imap chown -R cyrus /var/imap chown cyrus /usr/cyrus/bin/deliver chmod go-rwx /usr/cyrus/bin/deliver mkdir /var/pwcheck chown cyrus /var/pwcheck chmod go-rwx /var/pwcheck echo Please consider running mkimap from tools/ to setup your IMAP directories. #cd /etc # make backup copy of sendmail.cf if we've got a pre-cyrus cf file #if grep -q cyrus /etc/sendmail.cf ; then # echo not updating cyrus-aware sendmail.cf #else # cp sendmail.cf mail/sendmail-pre-cyrus-backup.cf # echo made backup of sendmail.cf in mail/sendmail-pre-cyrus-backup.cf # cp /usr/lib/sendmail-cf/cf/redhat-procmail+cyrus.cf /etc/sendmail.cf # echo installed cyrus-aware sendmail.cf # signal sendmail # if [ -f /var/run/sendmail.pid ]; then # /etc/rc.d/init.d/sendmail restart # fi #fi #echo Please read the comments in /etc/sendmail.cyrus.mc for what to do next. %preun # try to revert to pre-cyrus sendmail.cf if [ -f /etc/mail/sendmail-pre-cyrus-backup.cf ] ; then cd /etc cp sendmail.cf mail/sendmail-post-cyrus-backup.cf # echo made backup of sendmail.cf in mail/sendmail-post-cyrus-backup.cf mv mail/sendmail-pre-cyrus-backup.cf sendmail.cf # echo reverted to pre-cyrus sendmail.cf grep -q ^cyrus: /etc/passwd >/dev/null && \ grep -v ^cyrus: /etc/passwd >/etc/passwd.tmp && \ mv /etc/passwd.tmp /etc/passwd # signal sendmail if [ -f /var/run/sendmail.pid ]; then /etc/rc.d/init.d/sendmail restart fi #else # echo No pre-cyrus sendmail.cf backup available. # echo You will have to install a new sendmail.cf and # echo remove the cyrus-user manually. fi # put the inetd config file back to normal sed '/^imap/s/cyrus/root/;/^pop-3/s/cyrus/root/' /etc/inetd.conf.tmp && mv /etc/inetd.conf.tmp /etc/inetd.conf && killall -1 inetd 2>/dev/null %files %doc tools/ sql-auth/ COPYRIGHT README.RPM README.Y2K %defattr(-,root,root) # build roots are your friend - if only they would exclude /usr/doc! %config /etc/imapd.conf %config /etc/authcheck.conf %config /etc/procmailrc.cyrus /etc/logrotate.d /etc/sendmail.cyrus.mc /etc/cron.daily /usr/bin /usr/cyrus /usr/include /usr/lib /usr/man /usr/sbin /var %changelog * Mon Jul 10 2000 Vladimir Ivaschenko - updates for new version of authcheck * Wed Jul 05 2000 Vladimir Ivaschenko - update to 1.6.24 * Mon Jan 03 2000 Vladimir Ivaschenko - put authcheck daemon for authenticating through SQL - include administration CGIs as well - its better to chown deliver to cyrus - create /var/pwcheck directory during installation - rename to cyrus-imapd-sql * Wed Dec 28 1999 Vladimir Ivaschenko - put tools/ in distrubition and print notice about it in postinstall - do not overwrite mailboxes file - chown deliver to group mail * Sun Dec 26 1999 Vladimir Ivaschenko - compile with "new" auth_plain method - which does not restrict ":" chars - useful when pwcheck authorizes through SQL * Tue Dec 21 1999 Vladimir Ivaschenko - update to 1.6.20 - put com_err.h header for timsieved into its place - set owner/group to cyrus to /var/spool/imap and /var/imap * Fri Aug 13 1999 Tim Powers - updated source - quiet setup - updated URL - changed spec file so that sendmail.cf is not generated. - now requires cyrus-sasl to build - moved changelog to the bottom - first build for Powertools * Wed Feb 24 1999 Brian Candler - Implemented the deliver-wrapper; now users can securely manage their own .procmailrc * Tue Feb 16 1999 Brian Candler - Removed 'Packager:' line. It is annoying when someone changes what you've done but leaves you in to take the blame :-) - Updated to 1.5.19 - Fixed sendmail.cf handling * Sun Aug 16 1998 joerg@cogito.de - procmail/sendmail configuration added, based on http://www.ncworldmag.com/ncw-05-1998/ncw-05-imap.html