Configuring Postfix to work with piped scripts: Difference between revisions
(changed to make the transport_maps work - not sure how else to do this) |
(Adding Article Footer, Categories, and Unsupported template) |
||
Line 1: | Line 1: | ||
{{Unsupported}} | |||
== Background == | == Background == | ||
Line 48: | Line 50: | ||
Now, you should be able to email rt@example.com and receive a message back. grep for RT in /var/log/messages as well as tail /var/log/mail to watch for errors. | Now, you should be able to email rt@example.com and receive a message back. grep for RT in /var/log/messages as well as tail /var/log/mail to watch for errors. | ||
{{Article Footer|Unknown|8/1/2008}} | |||
[[Category:MTA]] | |||
[[Category:Customizing ZCS]] |
Revision as of 21:05, 26 September 2008
Background
Many users of Zimbra may want to integrate Request Tracker (RT) or Mailman, both of which are typically configured by executing scripts from /etc/aliases. With Zimbra 5, /etc/aliases appears to be mostly ignored and therefore cannot be used. This wiki entry is based on a trick that was figured out in this forum post.
Steps for integrating RT
1. Configure the Postfix main.cf to handle an additional transport map Execute the following command:
zmlocalconfig -e postfix_transport_maps=' hash:/opt/zimbra/postfix/conf/transport,ldap:/opt/zimbra/conf/ldap-transport.cf'
This will add /opt/zimbra/postfix/conf/transport as an additional transport map.
2. Create the transport map
Edit /opt/zimbra/postfix/conf/transport and place the following lines at the top:
# Pipe transports for RT queues # YOU HAVE TO ADD THE PIPES TO /opt/zimbra/postfix/conf/master.cf if you want them to work!!! rt@example.com rt-pipe rt-comment@example.com rt-comment-pipe
And then create the transport db by executing (as zimbra)
postmap /opt/zimbra/postfix/conf/transport
3. Define the pipe transports
The transport definitions 'rt-pipe' and 'rt-comment-pipe' must now be defined. Edit /opt/zimbra/postfix/conf/master.cf and add the following lines to the end of the file:
rt-pipe unix - n n - - pipe flags= user=www argv=/opt/rt3/bin/rt-mailgate --queue general --action correspond --url http://rt.example.com/ rt-comment-pipe unix - n n - - pipe flags= user=www argv=/opt/rt3/bin/rt-mailgate --queue general --action comment --url https://rt.example.com/
Note that the 2nd line needs to be right under the first and must start with whitespace. Also make sure the user= line is pointing to a valid user with permissions to execute the script.
4. Restart Postfix and test
Execute the following commands:
zmmtactl stop ; zmmtactl start
Now, you should be able to email rt@example.com and receive a message back. grep for RT in /var/log/messages as well as tail /var/log/mail to watch for errors.