MTA integration
From Zarafa wiki
Ddebyttere (Talk | contribs) m (Reverted edits by Alorovyzyw (talk) to last revision by Elentirmo) |
|||
| Line 8: | Line 8: | ||
=== Postfix === | === Postfix === | ||
| - | + | Zarafa recommends to use Postfix as integrated MTA. | |
| - | + | Please check the Postfix section in the [http://doc.zarafa.com/7.1/Administrator_Manual/en-US/html-single/#_MTAIntegration Zarafa Administrator Manual] for the integration settings. | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
=== Qmail === | === Qmail === | ||
Latest revision as of 11:20, 14 November 2012
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
Zarafa recommends to use Postfix as integrated MTA. Please check the Postfix section in the Zarafa Administrator Manual for the integration settings.
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")
- Zarafa 6.20 with the db-plugin (other plugins might need other settings for verifying users)
- Create a basic setup using
dpkg-reconfigure plow exim4
- Create the file
/etc/exim4/conf.d/transport/30_exim4-config_zarafa_pipe
with the following content.
zarafa_pipe:
debug_print = "T: zarafa_pipe for $local_part@$domain"
driver = pipe
path = "/bin:/usr/bin:/usr/local/bin"
command = "/usr/bin/zarafa-dagent $local_part"
return_path_add
delivery_date_add
envelope_to_add
zarafa_pipe_junk:
debug_print = "T: zarafa_pipe for $local_part@$domain"
driver = pipe
path = "/bin:/usr/bin:/usr/local/bin"
command = "/usr/bin/zarafa-dagent -j $local_part"
return_path_add
delivery_date_add
envelope_to_add
- Then create
/etc/exim4/conf.d/router/700_exim4-config_zarafa
with this content.
zarafa_junk:
debug_print = "R: zarafa junk for $local_part@$domain"
driver = accept
domains = +local_domains
check_local_user
transport = zarafa_pipe_junk
require_files = +/usr/bin/zarafa-dagent
no_verify
no_expn
condition = "${if def:header_X-Spam-Flag: }"
zarafa:
debug_print = "R: zarafa for $local_part@$domain"
driver = accept
domains = +local_domains
check_local_user
transport = zarafa_pipe
require_files = +/usr/bin/zarafa-dagent
no_verify
no_expn
- Continue with editing
/etc/exim4/update-exim4.conf
Change the line
dc_localdelivery=<something>
to
dc_localdelivery=zarafa_pipe
- Activate the new config with
#> update-exim4.conf #> /etc/init.d/exim4 restart
XMailServer
The XMailServer as MTA can also be integrated (community contribution).