diff options
Diffstat (limited to 'mail/qmail/patches/patch-ap')
-rw-r--r-- | mail/qmail/patches/patch-ap | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/mail/qmail/patches/patch-ap b/mail/qmail/patches/patch-ap new file mode 100644 index 00000000000..d81694906d3 --- /dev/null +++ b/mail/qmail/patches/patch-ap @@ -0,0 +1,51 @@ +$NetBSD: patch-ap,v 1.1 2004/04/10 05:30:06 schmonz Exp $ + +--- sendmail.c.orig 1998-06-15 06:53:16.000000000 -0400 ++++ sendmail.c +@@ -45,6 +45,38 @@ void mailq() + _exit(111); + } + ++void do_sender(s) ++const char *s; ++{ ++ char *x; ++ int n; ++ int a; ++ int i; ++ ++ env_unset("QMAILNAME"); ++ env_unset("MAILNAME"); ++ env_unset("NAME"); ++ env_unset("QMAILHOST"); ++ env_unset("MAILHOST"); ++ ++ n = str_len(s); ++ a = str_rchr(s, '@'); ++ if (a == n) ++ { ++ env_put2("QMAILUSER", s); ++ return; ++ } ++ env_put2("QMAILHOST", s + a + 1); ++ ++ x = (char *) alloc((a + 1) * sizeof(char)); ++ if (!x) nomem(); ++ for (i = 0; i < a; i++) ++ x[i] = s[i]; ++ x[i] = 0; ++ env_put2("QMAILUSER", x); ++ alloc_free(x); ++} ++ + int flagh; + char *sender; + +@@ -118,6 +150,7 @@ char **argv; + if (sender) { + *arg++ = "-f"; + *arg++ = sender; ++ do_sender(sender); + } + *arg++ = "--"; + for (i = 0;i < argc;++i) *arg++ = argv[i]; |