|
Aliases to Scripts We utilize RT at our site and I am curious how do I configure my aliases that run scripts. Currently, the alias looks something like (in /etc/aliases): rt: "|/usr/bin/rt-mailgate --queue General --action correspond --url http://fileserver/rt" How would I configure the same alias in Zimbra? Thanks, Justin |
We currently don't support procmail or scripts that can run against an alias. One idea would be to forward these to a separate process to be processed by procmail. |
If you think it's something you need then please file it in bugzilla. |
I will file it in Bugzilla and try to figure a workaround in the interim. Thank you for the quick response. I have to say, you guys rock! Justin Quote:
|
RT and Zimbra I added my servers IP to the mynetworks section of the master.cf and then sent to rt@servername.domain.org and it works. I did have problems when server IP was first in list but when I put -o mynetworks=127.0.0.0/8,serverIP and commented out -o mynetworks_style=host ticket creation works great. |
Would be great if you can document this and post it to the wiki for others. |
Through a search I found this thread. I also need to send a mail using pipe/alias like so: support: root,|/path/to/automail.pl I'm using something similar to RT called eTicket. This lets the ticket system receive incoming mail and create new tickets. I believe it is identical to RT. Anyway, I did not quite understand the solution. Can someone tell me which master.cf file I need to update and a more detailed explanation on how to get this to work? I was looking in /opt/zimbra/postfix-2.2.9/conf/master.cf and did not want to screw this file up in the middle of the day on an active mail server. I just don't understand the complete solution. I've tried simply adding my alias to /opt/zimbra/postfix-2.2.9/conf/aliases and running /opt/zimbra/postfix-2.2.9/sbin/newaliases but when sending the mail to my alias it gets returned. Anyway I'd appreciate it if anyone could provide some more detail on this for someone who has never had to mess with sendmail/postfix configurations before. EDIT: My Zimbra on an RHEL 4 server: Release 4.0.5_GA_518.RHEL4_20061218051343 RHEL4 FOSS edition |
Okay I think I"m going to add this to the wiki since this really helped me. Mike's solution works. I'll update with the full solution sometime today or tomorrow. Scratch that, here ya go: http://wiki.zimbra.com/index.php?tit...lias_To_Script |
Hi, I'd like to reopen this as the solution doesn't take into account multiple domains (you'd have to send a message to user@mail.domain.com (the zimbra server hostname) to get it to work). Now, on my test setup I'm trying to have RT (request tracker) and ZCS co-exist on the same server. Messages sent into RT would go into rt_test1@domain-x.com's mailbox, and I would run fetchmail on a 1-minute cronjob to pull them into rt-mailgate. This 1-minute delay isn't too acceptable, especially with a pipe/alias option being so much better. Messages coming from RT would pipe so the Zimbra Postfix sendmail compatibility program, which is /opt/zimbra/postfix/sbin/sendmail in my environment. With this situation, I was only able to hit the aliases file for non-virtual (postfix terminology) domains, meaning localhost. For virtual aliases, it's a different story in postfix, and this variable is used: virtual_alias_maps = ldap:/opt/zimbra/conf/ldap-vam.cf That's a lookup to the zimbra alias database, naturally. However since we can't add pipes to this database through the admin UI (and the postfix virtual alias table format doesn't support pipes either), we're pretty much stuck...unless we do this: transport_maps = hash:/opt/zimbra/postfix/conf/transport,ldap:/opt/zimbra/conf/ldap-transport.cf with the transport file containing: rt_trans@domain-x.com rt-pipe and don't forget to run postmap on the transport file to compile it. OK, so far we've created an "alias" which will point to a postfix named pipe transport, in this case 'rt-pipe'. We need to define that transport now. Open up master.cf and add: rt-pipe unix - n n - - pipe flags= user=rt argv=/opt/rt3/bin/rt-mailgate --url http://zimrtdev:8001 --queue General --action correspond note 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. now save the file and run postfix reload: /opt/zimbra/postfix/sbin/postfix reload and tail -f /var/log/maillog to watch for errors as you test the first address. NOTE: if you are using multiple queues with RT you may want to look into either a) creating multiple transports (messy) or b) using pipe macros (man 8 pipe) in the transport options for queue, sourced from the local-part of the email address (say, support-asia@domain-x.com goes to support-asia queue by using the ${user} macro). ---- This probably isn't as clear and coherent as it could be, but it works for me. |
Hurray, drj33's response seems to be the first solution that works nicely with Zimbra 5. I'm sure you'll void your warranty by doing this, but voiding your warranty is *SO MUCH FUN* However, it is missing one step: the changes specified below to main.cf would be lost at the next mta restart. The correct way to make the 'transport_maps' changes to stick is like so: Code: zmlocalconfig -e postfix_transport_maps='hash:${zimbra_home}/postfix/conf/transport,ldap:${zimbra_home}/conf/ldap-transport.cf'Code: zmmtactl stop ; zmmtactl startZimbra developers: It would be awesome if we could have a permament and supported solution for custom transport maps, at minimum. Going the extra mile, easy integration of Request Tracker and Mailman seem like something that a lot of people want. |
| All times are GMT -7. The time now is 09:19 PM. |
|