the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: dovecot
Version: 1.0.rel0
Revision: 1
Source: http://www.dovecot.org/releases/%n-1.0.0.tar.gz
Source-MD5: 65ccc71e66c495c536d8fb8a7ae39bb3
Maintainer: Michael Richmond
HomePage: http://www.dovecot.org
License: OSI-Approved
Description: Secure open source IMAP and POP3 server
DescDetail: <<
Dovecot is an open source IMAP and POP3 server for Linux/UNIX-like
systems, written with security primarily in mind. Dovecot can work
with standard mbox and Maildir formats and it's fully compatible
with UW-IMAP and Courier IMAP servers' implementation of them, as
well as mail clients accessing the mailboxes directly.
<<
DescUsage: <<
Dovecot can use PAM (Plugable Authentication Modules) to authenticate
IMAP and POP user accounts. To allow dovecot to use PAM (RECOMMENDED),
copy %p/etc/pam.d/dovecot (or whereever you instaled Fink) to
/etc/pam.d/dovecot using the command:
sudo cp %p/etc/pam.d/dovecot /etc/pam.d
To use SSL connections for IMAP and POP connections (RECOMMENDED), you will
need to generate an SSL certificate. To generate the certificate:
sudo cp %p/share/doc/dovecot/dovecot-openssl.cnf %p/etc
edit %p/etc/dovecot-openssl.cnf to suit your organization
sudo sh %p/share/doc/dovecot/mkcert.sh
edit %p/etc/dovecot.conf to uncomment the ssl_cert_file and ssl_key_file
lines.
The dovecot server has been installed to start when you boot the machine.
To disable the server, run 'daemonic disable dovecot' as root. This will
not kill a running dovecot server, but will prevent the server from
automatically starting when you boot the machine.
Ensure that you configure dovecot for you system by editing
%p/etc/dovecot.conf as appropriate. You can then start up the dovecot
server using 'sudo daemonic enable dovecot' or by rebooting your machine.
<<
BuildDepends: pkgconfig, system-openssl-dev, libiconv-dev
Depends: daemonic, libiconv, passwd (>= 20070118-1)
SetCPPFLAGS: -I%p/lib/system-openssl/include
SetLDFLAGS: -L%p/lib/system-openssl/lib
ConfigureParams: --disable-dependency-tracking --libexecdir=%p/lib/%n/libexec --localstatedir=%p/var --with-ssl=openssl --with-ssl-dir=%p/etc/ssl
ConfFiles: %p/etc/%n.conf
PatchScript: sed 's|@PREFIX@|%p|' < %a/%n.patch | patch -p1
InstallScript: <<
make install DESTDIR=%d
#
# Copy additional document files into share/doc/dovecot
cp %b/INSTALL %i/share/doc/%n
cp %b/ChangeLog %i/share/doc/%n
cp %b/COPYING.LGPL %i/share/doc/%n
cp %b/AUTHORS %i/share/doc/%n
cp %b/COPYING %i/share/doc/%n
cp %b/TODO %i/share/doc/%n
cp %b/README %i/share/doc/%n
#
# Copy the sample config files and mkcert.sh into share/doc/dovecot
mkdir -p %i/share/doc/%n
cp %b/doc/dovecot-*.c*nf %i/share/doc/%n
cp %b/doc/mkcert.sh %i/share/doc/%n
#
# Copy default dovecot.conf file into %p/etc
cp %b/dovecot.conf %i/etc
#
# Create PAM definition file
mkdir -p %i/etc/pam.d
echo "auth required pam_nologin.so" > %i/etc/pam.d/dovecot
echo "auth sufficient pam_securityserver.so" >> %i/etc/pam.d/dovecot
echo "auth sufficient pam_unix.so" >> %i/etc/pam.d/dovecot
echo "auth required pam_deny.so" >> %i/etc/pam.d/dovecot
echo "account required pam_permit.so" >> %i/etc/pam.d/dovecot
echo "password required pam_deny.so" >> %i/etc/pam.d/dovecot
echo "session required pam_uwtmp.so" >> %i/etc/pam.d/dovecot
#
# Create logrotate task file
mkdir -p %i/etc/logrotate.d
echo "%p/var/log/dovecot.log {" >> %i/etc/logrotate.d/dovecot
echo " weekly" >> %i/etc/logrotate.d/dovecot
echo " missingok" >> %i/etc/logrotate.d/dovecot
echo " rotate 7" >> %i/etc/logrotate.d/dovecot
echo " compress" >> %i/etc/logrotate.d/dovecot
echo " delaycompress" >> %i/etc/logrotate.d/dovecot
echo " notifempty" >> %i/etc/logrotate.d/dovecot
echo " create 640 root admin" >> %i/etc/logrotate.d/dovecot
echo " sharedscripts" >> %i/etc/logrotate.d/dovecot
echo " postrotate" >> %i/etc/logrotate.d/dovecot
echo " if [ -f %p/var/run/dovecot/master.pid ]; then" >> %i/etc/logrotate.d/dovecot
echo " kill -USR1 \`cat %p/var/run/dovecot/master.pid\`" >> %i/etc/logrotate.d/dovecot
echo " fi" >> %i/etc/logrotate.d/dovecot
echo " endscript" >> %i/etc/logrotate.d/dovecot
echo "}" >> %i/etc/logrotate.d/dovecot
<<
PostInstScript: <<
#
# update daemonic script if necessary
daemonic update %n
<<
PreRmScript: <<
#
# halt the dovecot server before removing or updating the package
[ -f %p/var/run/%n/master.pid ] && kill -TERM `cat %p/var/run/%n/master.pid`
#
# remove daemonic script if necessary
if [ $1 != "upgrade" ]; then
daemonic remove %n
fi
<<
DaemonicName: dovecot
DaemonicFile: <<
<<