$NetBSD: patch-ah,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $

--- courier/module.local/deliver.c.orig	2005-02-03 21:44:59.000000000 -0500
+++ courier/module.local/deliver.c
@@ -633,7 +633,7 @@ static int docommand(const char *extensi
 		const char *defaultmail,
 		int recursion_level)
 {
-char	*envs[19];
+char	*envs[20];
 const char *p;
 const char *hostp;
 pid_t	pid;
@@ -725,7 +725,9 @@ const char *shell=getenv("SHELL");
 	envs[17]=courier_malloc(strlen(shell)
 				+sizeof("SHELL="));
 	strcat(strcpy(envs[17], "SHELL="), shell);
-	envs[18]=0;
+	envs[18]=courier_malloc(sizeof("COURIER_MTA="));
+	strcpy(envs[18], "COURIER_MTA=");
+	envs[19]=0;
 
 	if (*command == '|')
 	{
