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.
Dovecot
Primary tabs
Credits
Various bits of code, scripts, and procedures were put together with information from John Simpson's qmail.jms1.net website. It's an excellent resource on managing and setting up a Qmail server.
Installation
Download the latest tarball of the Dovecot source:
cd /extra/src
wget http://dovecot.org/releases/2.3/dovecot-2.3.10.tar.gz
tar zxf dovecot-2.3.10.tar.gz
cd dovecot-2.3.10Configure 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
make
make installCreate the necessary users and group for Dovecot to run as:
groupadd dovecot
useradd -g dovecot -s /bin/false -c "Dovecot Mail Server" dovecot
useradd -g dovecot -s /bin/false -c "Dovecot Mail Server" dovenullConfiguration
Dovecot includes a set of config files that you can copy into /usr/local/etc:
cp -r /usr/local/share/doc/dovecot/example-config/* /usr/local/etc/dovecot/Authentication
To enable authentication with vpopmail, edit /usr/local/etc/dovecot/conf.d/10-auth.conf and uncomment:
!include auth-vpopmail.conf.extYou'll also want to make sure that pam is disabled, so comment out:
#!include auth-system.conf.extSince the vpopmail user is uid 89, we need to adjust a few settings in /usr/local/etc/dovecot/conf.d/10-mail.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.
mail_location = maildir:~/Maildirnamespace {
separator = .
prefix =
inbox = yes
}# INBOX. as a compatibility name so old clients can continue using it
namespace {
separator = .
prefix = INBOX.
inbox = no
hidden = yes
list = no
alias_for =
}
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:
mkdir -p /etc/ssl/certs
mkdir -p /etc/ssl/private
cd /extra/src/dovecot-2.2.18/doc/Edit
/extra/src/dovecot-2.2.18/doc/dovecot-openssl.cnfto suite your organization then:sh mkcert.shThe files created are already configured in the defaul Dovecot conf files.
- 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.d/10-ssl.confto find the files:ssl_cert = </usr/local/etc/dovecot.pem
ssl_key = </usr/local/etc/dovecot.pem
However, 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/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.d/10-logging.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/logCentOS 7 Firewall settings:
firewall-cmd --permanent --zone=public --add-service=imaps
firewall-cmd --reloadCourier 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 --overwriteResources
Install Dovecot and sieve on a vpopmail + qmail server
- Log in to post comments