1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
$NetBSD: patch-ai,v 1.3 2007/10/17 13:50:30 jlam Exp $
--- courier/module.local/local.c.orig Sun Oct 7 16:37:52 2007
+++ courier/module.local/local.c
@@ -391,8 +391,6 @@ toalias:
}
not_found:
- if (hostdomain) free(hostdomain);
-
/*
** When submit is being called by the sendmail command line,
** don't reject unknown addresses, instead accept them (and bounce
@@ -407,6 +405,8 @@ not_found:
{
free(addr);
(*delfunc)(rwi, rwi->ptr, rwi->ptr);
+ if (hostdomain) free(hostdomain);
+
return;
}
@@ -420,6 +420,8 @@ not_found:
snprintf(buf, 255, "User <%s> unknown",
orig_addr ? orig_addr:"");
free(addr);
+ if (hostdomain) free(hostdomain);
+
if (orig_addr)
free(orig_addr);
(*rwi->err_func)(550, buf, rwi);
@@ -745,6 +747,8 @@ const char *quota;
strlen(argv[7])), "SENDER="),
argv[7]));
+ putenv(strcpy(courier_malloc(sizeof("COURIER_MTA=")),
+ "COURIER_MTA="));
putenv(strcat(strcpy(courier_malloc(sizeof("HOME=")+
strlen(homedir)), "HOME="), homedir));
putenv(strcat(strcpy(courier_malloc(sizeof("DEFAULT=")+
|