Debianhelp.co.uk


Perdition imap proxy configuration in Debian

What is Perdition?

Perdition is a fully featured POP3 and IMAP4 proxy server. It is able to handle both SSL and non-SSL connections and redirect users to a real-server based on a database lookup. Perdition supports modular based database access. ODBC, MySQL, PostgreSQL, GDBM, POSIX Regular Expression and NIS modules ship with the distribution. The API for modules is open allowing arbitrary modules to be written to allow access to any data store.

When to use Perdition

Including, creating large mail systems where an end-user's mailbox may be stored on one of several hosts, integrating different mail systems together, migrating between different email infrastructures, and bridging plain-text, SSL and TLS services

When to use imapproxy

you want to keep persistant imap connections for a web app which would otherwise create and destory a new connection on every page request

Download Perdition

http://www.vergenet.net/linux/perdition/download/

Perdition Documentation

http://www.vergenet.net/linux/perdition/docs.shtml

Perdition FAQ

http://www.vergenet.net/linux/perdition/faq.shtml

Supported Modules

perditiondb - Perdition database map modules
makebdb - Utility to manipulate Berkely DB maps
makegdbm - Utility to manipulate GDBM maps
perditiondb_ldap_makedb - Utility to initialise LDAP map
perditiondb_mysql_makedb - Utility to initialise MySQL map
perditiondb_odbc_makedb - Utility to initialise ODBC map
perditiondb_postgresql_makedb - Utility to initialise PostgreSQL map

Install Perdition in Debian

#apt-get install perdition

This will install all files located in /etc/perdition and your configuration files located in this

Configuring Perdition in debian

Perdition Configuration Files

perdition
perdition.pop3
perdition.pop3s
perdition.imap4
perdition.imap4s
perdition.imaps

If you want to know more abou each file click here

List of ports 

110 -- pop3

995 -- pop3s

143 -- imap4

993 -- imap4s

Sample configuration files as follows

NOTE: hostnames do not work in perdition configuration files. It must be an IP address and ssl_key_file is private keys

/etc/perdition/perdition.imap4.conf

outgoing_server 172.18.0.2
log_facility local5
no_lookup
timeout 40
imap_capability "IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA ACL ACL2=UNION
STARTTLS"
ssl_mode tls_listen
ssl_cert_file /key/certs/mail.test.org/cert.pem
ssl_key_file /key/certs/mail.test.org/key.pem

/etc/perdition/perdition.imap4s.conf

outgoing_server 172.18.0.2
log_facility local5
no_lookup
timeout 40
imap_capability "IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA ACL ACL2=UNION
STARTTLS"
outgoing_port 143
ssl_mode ssl_listen
ssl_cert_file /key/certs/mail.test.org/cert.pem
ssl_key_file /key/certs/mail.test.org/key.pem

/etc/perdition/perdition.pop3.conf

outgoing_server 172.18.0.2
log_facility local5
no_lookup
timeout 40
ssl_mode tls_listen
ssl_cert_file /key/certs/mail.test.org/cert.pem
ssl_key_file /key/certs/mail.test.org/key.pem

/etc/perdition/perdition.pop3s.conf

outgoing_server 192.168.0.2
log_facility local5
no_lookup
timeout 40
outgoing_port 110
ssl_mode ssl_listen
ssl_cert_file /etc/certs/mail.riseup.net/cert.pem
ssl_key_file /etc/certs/mail.riseup.net/key.pem

If you want to check for more options and how to use these files syntax click here

If you want Configure Perdition Proxy Software to Use an Existing LDAP Server click here