SquidGuard is a URL redirector used to use blacklists with the proxysoftware Squid. There are two big advantages to squidguard: it is fast and it is free.
Revision of Dovecot from Sat, 07/11/2009 - 22:58
Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.
Installation
Download the latest tarball of the Dovecot source:
cd /extra/src
wgethttp://dovecot.org/releases/1.1/dovecot-1.1.17.tar.gz
tar zxf dovecot-1.1.17.tar.gz
cd dovecot-1.1.17Configure Dovecot with support for vpopmail, compile and install it. If you want POP3 as well as IMAP, you need to specify it in the configure options.
./configure --with-vpopmail --with-pop3d
make
make installCreate a user and group for Dovecot to run as:
groupadd dovecot
useradd -g dovecot -s /bin/false -c "Dovecot Mail Server" dovecotConfiguration
Dovecot has installed a /usr/local/etc/dovecot-example.conf file, which you'll have to rename to /usr/local/etc/dovecot.conf:
cp /usr/local/etc/dovecot-example.conf /usr/local/etc/dovecot.confAuthentication
To enable authentication with vpopmail, edit /usr/local/etc/dovecot.conf and uncomment:
# vpopmail authentication <doc/wiki/AuthDatabase.VPopMail.txt>
passdb vpopmail {
# [cache_key=<key>] - See cache_key in PAM for explanation.
#args =
}
# vpopmail <doc/wiki/AuthDatabase.VPopMail.txt>
userdb vpopmail {
}
You'll also want to make sure that pam is disabled in /usr/local/etc/dovecot.conf:
# passdb pam {
....
#}Since the vpopmail user is uid 89, we need to adjust a few more settings in /usr/local/etc/dovecot.conf:
first_valid_uid = 89
last_valid_uid = 89Courier by default uses "INBOX." as the IMAP namespace for private mailboxes. Configuring Dovecot the same way can make things easier when configuring clients and also when switching existing Maildirs from Courier to Dovecot. There are two ways to accomplish this:
- Using the same
INBOX.namespace as Courier. With this method, Mail.app (at least in OS X 10.3) required that you specifyINBOXas the IMAP Path Prefix when configuring the account.
namespace private {
separator = .
prefix = INBOX.
inbox = yes
} - Create the
INBOX.as a compatibility name, so old clients can continue using it while new clients will use the empty prefix namespace.
namespace private {
separator = .
prefix = INBOX.
inbox = yes
}namespace private {
separator = .
prefix = INBOX.
inbox = no
hidden = yes
list = no # for v1.1+
}
Self-Signed SSL Certificate
Dovecot by default does not allow plain-text logins so you'll need to have an SSL certificate for it use. You can use Dovecot's instructions or you can create a self-signed certificate using the Apache SSL instructions. If you do it the Apache way, copy the certificates to a location where we'll configure Dovecot to read it from:
cd ~/cert
cat server.key server.crt > /usr/local/etc/dovecot.pemThen modify /usr/local/etc/dovecot.conf to find the files:
ssl_cert_file = /usr/local/etc/dovecot.pem
ssl_key_file = /usr/local/etc/dovecot.pemHowever, if you did need to use plaintext auth with Dovecot, you can modify /usr/local/etc/dovecot.conf to allow it. Please, don't let users connect over the Internet like this though!
disable_plaintext_auth = noDaemontools Startup
The DJB Way website has a page on running Dovecot through daemontools. These instructions are adapted from that.
Firstly, create a directory to hold the service:
mkdir -m 1755 /var/service/dovecot-imapd
mkdir -m 755 /var/service/dovecot-imapd/log
cd /var/service/dovecot-imapdThen create the /var/service/dovecot-imapd/run file with the following contents:
#!/bin/sh
# dovecot-imapd/run
# daemontools run script for dovecot-imapd service
# ===
exec 2>&1
echo "*** Starting dovecot-imapd service..."
exec envuidgid dovecot \
/usr/local/sbin/dovecot \
-F \
-c /usr/local/etc/dovecot.confMake the run script executable and then set up the logging service:
chmod 755 run
cd log
wget http://qmail.jms1.net/scripts/service-any-log-run
mv service-any-log-run run
chmod 755 runEdit /usr/local/etc/dovecot.conf so that it sends log messages to /dev/stderr where multilog can catch them.
log_path = /dev/stderrMake the symbolic link in /service to start Dovecot:
ln -s /var/service/dovecot-imapd /service/dovecot-imapdAfter about 10 seconds, confirm that it is running:
svstat /service/dovecot-imapd /service/dovecot-imapd/logCourier to Dovecot migration
In general, there's not really much you need to do to migrate existing Maildirs from Couier-IMAP to Dovecot. However, one thing I did notice was that folder subscriptions do not copy from Courier's Maildir/courierimapsubscribed file to Dovecot's Maildir/subscriptions file. Depending on your mail client, this might not be an issue. Mail.app, for instance, picked up the new folders even though they weren't listed in Maildir/subscriptions. On the other hand, SquirrelMail didn't see them unless you manually subscribed to them.
The Dovecot wiki has a wiki Courier migration page has some migration details that have an impact for POP3 users and has a Courier-to-Dovecot migration script to take of some POP3 UIDL issues. The script also can convert Courier's Maildir/courierimapsubscribed file to Dovecot's Maildir/subscriptions format (basically removing "INBOX." from the entries).
cd /usr/local/bin
wget http://www.dovecot.org/tools/courier-dovecot-migrate.pl
chmod ugo+x courier-dovecot-migrate.pl
cd /home/vpopmail/domains/<domain>
/usr/local/bin/courier-dovecot-migrate.pl --recursive --convert --overwrite- Log in to post comments