The answer for microsoft exchange in linux.
Configuration
davmail.server=true
davmail.mode=Auto
davmail.url=https://mail.domain.com/EWS/Exchange.asmx
davmail.defaultDomain=DOMAIN
davmail.ssl.nosecurecaldav=false
davmail.ssl.nosecureimap=false
davmail.ssl.nosecureldap=false
davmail.ssl.nosecurepop=false
davmail.ssl.nosecuresmtp=false
davmail.caldavPort=1081
davmail.imapPort=1144
davmail.ldapPort=1390
davmail.popPort=1111
davmail.smtpPort=1026
davmail.imapAutoExpunge=true
davmail.allowRemote=false
davmail.logFilePath=/tmp/davmail-mkn.log
davmail.logFileSize=1MB
davmail.disableGuiNotifications=true
davmail.disableTrayActivitySwitch=true
davmail.showStartupBanner=false
davmail.enableKerberos=false
Systemd user unit
most linux distro uses systemd anyway.
# /usr/lib/systemd/user/davmail@.service
[Unit]
Description=DavMail for %i
[Service]
ExecStart=/usr/bin/davmail %h/.config/davmail/%i.properties
Restart=on-failure
[Install]
WantedBy=default.target
DefaultInstance=davmail