Dovecot imapc proxy =================== Using Dovecot as a secure IMAP Proxy in front of Exchange, using Exchange Authentication and IMAPC. This requires Dovecot 2.1.rc1 or newer. Many thanks to Timo on the Dovecot mailing list for all his help! This " " is based on already having Dovecot already compiled and installed. 1. Create an unprivileged, non-system account user and group for the proxy, with a home directory. This needs to have a writable home directory, but no other privileges. ---%<--------------------------------------------------------------------- [root@localhost]# useradd imapproxy ---%<--------------------------------------------------------------------- 2. Verify that the user can not login: ---%<--------------------------------------------------------------------- [root@localhost]# grep imapproxy /etc/shadow ---%<--------------------------------------------------------------------- You should see something like: ---%<--------------------------------------------------------------------- imapproxy:!!:nnnn:0:nn:n::: ---%<--------------------------------------------------------------------- The important part is the "!!". This indicates that the account is locked. If you don't see this, lockout the account (check man passwd) 3. Create '/etc/dovecot/dovecot.conf' or ('/usr/local/etc/dovecot/dovecot.conf') as appropriate: ---%<--------------------------------------------------------------------- ## Dovecot configuration file mail_uid = imapproxy mail_gid = imapproxy protocols = imap listen = *, :: mail_location = imapc:~/imapc # Change the line below to reflect the IP address of your Exchange Server. imapc_host = 10.1.2.3 imapc_port = 143 passdb { driver = imap # Change the line below to reflect the IP address of your Exchange Server. args = host=10.1.2.3 default_fields = userdb_imapc_user=%u userdb_imapc_password=%w } userdb { driver = prefetch } # /home/imapproxy is the home directory for the imapproxy user, and # %u is a subdir that will be automatically created for each IMAP user when they connect mail_home = /home/imapproxy/%u auth_mechanisms = plain login # This is the auth service used by Postfix to do dovecot auth. service auth { unix_listener auth-userdb { } inet_listener { port = 12345 } } ## ## SSL settings ## # These will need to ba adjusted to point to *your* certificates, not mine 8-) # The ssl_ca line refers to the intermediate certificate bundle which may or may not be required by your SSL provider ssl_cert =