Contents

Delivery of email

To deliver an email into a user's inbox, you need to use the zarafa-dagent program. The
zarafa-dagent will read an SMTP email message from the standard input or a file. A
parameter to the zarafa-dagent is needed to select the store to deliver the incoming
message to. A few examples are given for different email servers.

Postfix

Modify your /etc/postfix/main.cf file, and set the mailbox_command to:

mailbox_command = /usr/bin/zarafa-dagent "$USER"

For this configuration to work, the users need to be present in both unix and Zarafa
databases. If you are using virtual users, please consult our Postfix/LDAP documentation.
An alternative configuration is as follows, where users do not need to be in the unix database.
Modify your /etc/postfix/main.cf file, and set the mailbox_transport to:

The vmail user should be added as a local user to the Linux system: adduser vmail

Change the following option in the /etc/zarafa/server.cfg file:

local_admin_users = root vmail

This makes sure that vmail can login to any store without a password, which is required for email delivery.

Please also note that in this setup, the ${user} part will be "guessed" by postfix, using the first part of the email address.
Aliases need to be setup in the postfix' aliases hash map or via virtual alias maps in LDAP.

Qmail

Place in your $HOME/.qmail file a line containing:

| /usr/bin/zarafa-dagent -q [user name]

The [user name] tag needs to be replaced with the name of the user to correctly deliver
the email. The -q switch is to notify the zarafa-dagent program to return qmail style
error codes. When an email can temporarily not be delivered, it will stay in the qmail
queue, which will try to deliver the email again later.

Procmail

Create a file called .procmailrc in the users home directory. If you have virtual users,
you can create a global /etc/procmailrc file. Please read the email delivery section in
the Advanced configurations chapter on more procmail details and setups. This chapter can be found in the Linux installation documentation from the main site.

A simple procmailrc file should contain the following lines:

:0 w
| /usr/bin/zarafa-dagent [user name]
EXITCODE=$?

The w after the :0 tells procmail to wait for the zarafa-dagent to finish. You can also
type the c flag to make a 'carbon copy' of the email. This way, your email will be
delivered to Zarafa as well as your normal Mailbox or Maildir. Again, [user name] needs
to be replaced with the name of the user.
If you have a system wide /etc/procmailrc file and unix login names are the same as
Zarafa user names, you can replace [user name] with $LOGNAME.

Exim4-Integration with Spam-Detection

The following setup works fine with our company-mailserver which is a Debian Lenny running Zarafa 6.20.

Prerequisites:

Debian-Server (or compatible)

Exim4-Server with split configuration and working spamchecker (which sets the header "X-Spam-Flag: Yes")