Nethence Newdoc Olddoc Lab Your IP BBDock  

Warning: those guides are mostly obsolete, please have a look at the new documentation.


Setting up DavMail as standalone server (MS Exchange proxy) with SSL enabled
I only need DavMail to access Exchange calendar service from Thunderbird/Lightning. Everything else works directly:
SMTP & IMAP --> Exchange directly
LDAP addressbook --> AD directly on port 3268 (need to switch to LDAPS 3269)
Make sure Java is installed (using java-1.8.0-openjdk),
yum -y install java
you will probably need X11 forwarding too (enabled by default on CentOS),
yum -y install xauth
Disable listen on port 25 to free that port,
cd /etc/postfix/
#smtp inet n - n - - smtpd
service postfix restart
If you need SSL, upload you java keystore or your apache pem to the server.
Fetch the latest tarball and extract,
tar xzf davmail-linux-x86_64-4.7.1-2416.tgz
mv davmail-linux-x86_64-4.7.1-2416/ /usr/local/
mv svrkeystore.jks /usr/local/davmail-linux-x86_64-4.7.1-2416/
ls -l /usr/local/davmail/svrkeystore.jks
cd /usr/local/
ln -s davmail-linux-x86_64-4.7.1-2416 davmail
Test that the tool is working normally in graphical mode and proceed with its setup,
/usr/local/davmail/ ==> DavMail Gateway Settings
Main tab / OWA URL: https://mailexchange-server.domain.tld/owa/
Main tab / Caldav HTTP 443 (keep ssl enabled)
Network tab / Allow Remote Connections
Encryption tab / store type: JKS
Encryption tab / keystore: /usr/local/davmail/svrkeystore.jks
Encryption tab / keystore pass: ...
Encryption tab / key pass: ...
==> save do some CalDav testing with Thunderbird/Lightning.
Once everything works fine, save the configuration and enable server mode,
cd ~/
ls -l
mv /usr/local/davmail/
cd /usr/local/davmail/
sed 's/davmail.server=false/davmail.server=true/' >
grep -i url
grep Port
Ready to go
You can now run the tool as a deaemon,
cd /usr/local/davmail/
ps ax | grep davmail
nohup ./ > davmail.more.log 2> davmail.more-err.log &
Check that it's now listeing on the desired ports,
netstat -an --inet --inet6 | grep 443
Start/stop scripts,
mkdir -p ~/bin/
cd ~/bin/
vi start_davmail.ksh
print Starting DavMail:
cd /usr/local/davmail/
nohup ./ > davmail.more.log 2> davmail.more-err.log &
ps aux | grep davmail | grep -v grep
vi stop_davmail.ksh
print Shuting down DavMail... \\c
pid=`ps ax | grep davmail | grep -v grep | awk '{print $1}'`
[[ -z $pid ]] && print no pid found && exit 1
kill $pid && print Done
sleep 1
ps aux | grep davmail | grep -v grep
vi status_davmail.ksh
ps aux | grep davmail | grep -v grep
chmod +x start_davmail.ksh status_davmail.ksh stop_davmail.ksh
Thunderbird configuration
with SSL enabled on the server
For Calendar (lightning),
click on the little calendar icon on the top right corner
File > New > Calendar
on the network
offline ok
Email: select the mail account
Note. the https address needs to point to the SSL enabled FQDN, otherwise it won't work.
Wait for a second and your corporate calendar will show up. Eventually uncheck your persoan Calendar to let the corporate one enabled only.
Additional notes
To LDAP search only users,
Advanced / (&(objectclass=user)(msexchuserAccountcontrol=0))
DavMail Setup as a standalone server:
DavMail : la passerelle Exchange:
Understanding LDAP Search Filters:
Integrate Thunderbird with Active Directory:

(obsolete, see the new doc)