[rt-devel] rt-mailgate extension options and qmail

Jesse Vincent jesse at bestpractical.com
Thu Feb 7 14:03:43 EST 2002


It might be better if the code for finding out what the ENV{'EXTwhatever} got 
pulled out into its own sub and then called once before we get into
the switching on options bit...

	-j


On Thu, Feb 07, 2002 at 01:56:42PM -0500, Rich Lafferty wrote:
> 
> 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 -----------+-----------------------------------------------

> --- 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;


-- 
http://www.bestpractical.com/products/rt  -- Trouble Ticketing. Free.




More information about the Rt-devel mailing list