[rt-devel] rt-mailgate extension options and qmail
Rich Lafferty
rich+rt at lafferty.ca
Thu Feb 7 13:56:42 EST 2002
Right now, --ticket-id-from-extension and --queue-from-extension
don't work with qmail. This patch fixes that.
Those two options should probably be made mutually exclusive; this
patch *doesn't* fix that.
(Attached.)
-Rich
--
Rich Lafferty --------------+-----------------------------------------------
Ottawa, Ontario, Canada | Save the Pacific Northwest Tree Octopus!
http://www.lafferty.ca/ | http://zapatopi.net/treeoctopus.html
rich at lafferty.ca -----------+-----------------------------------------------
-------------- next part --------------
--- rt-mailgate.old Thu Feb 7 13:12:26 2002
+++ rt-mailgate Thu Feb 7 13:50:05 2002
@@ -76,10 +76,22 @@
$Queue = shift @ARGV;
}
if ($flag eq '--ticket-id-from-extension') {
- $TicketId = $ENV{'EXTENSION'};
+ if (exists $ENV{'EXT'}) { # qmail
+ $TicketId = $ENV{'EXT4'} || $ENV{'EXT3'} ||
+ $ENV{'EXT2'} || $ENV{'EXT'};
+ }
+ else { # postfix, others?
+ $TicketId = $ENV{'EXTENSION'};
+ }
}
if ($flag eq '--queue-from-extension') {
- $Queue = $ENV{'EXTENSION'};
+ if (exists $ENV{'EXT'}) { # qmail
+ $Queue = $ENV{'EXT4'} || $ENV{'EXT3'} ||
+ $ENV{'EXT2'} || $ENV{'EXT'};
+ }
+ else { # postfix, others?
+ $Queue = $ENV{'EXTENSION'};
+ }
}
if (($flag eq '-a') or ($flag eq '--action')) {
$Action = shift @ARGV;
More information about the Rt-devel
mailing list