Did you ever come up with at good solution for the RELAYCLIENT not being set (as ENV) after a succesfully authentication ?
My problem is that qmail-dk (patched with auth) is not importing DKSIGN because RELAYCLIENT is not set.
My solution was to change the dk-auth patch to include:
---
diff -uN qmail-1.03.dk/qmail-smtpd.c qmail-1.03.dk-auth/qmail-smtpd.c
--- qmail-1.03.dk/qmail-smtpd.c 2005-11-29 10:00:00.000000000 +0100
+++ qmail-1.03.dk-auth/qmail-smtpd.c 2005-11-29 10:03:14.000000000 +0100
@@ -851,8 +851,10 @@
}
/* check if we are authenticated, if yes enable relaying */
- if (flagauthok && relayclient == 0)
+ if (flagauthok && relayclient == 0) {
relayclient = "";
+ if (!env_put("RELAYCLIENT=")) die_nomem();
+ }
/* smtp size check */
if (databytes && !sizelimit(arg))
---
This allows qmail-dk to sign the messages.
Don't know if there is any problems with that ?
Bye
Mikkel Kruse Johnsen Linet Ørholmgade 6 st tv 2200 København N Tlf: +45 2128 7793 email: [EMAIL PROTECTED] www: http://www.linet.dk |
diff -uN qmail-1.03.dk/qmail-dk.8 qmail-1.03.dk-auth/qmail-dk.8 --- qmail-1.03.dk/qmail-dk.8 2005-11-29 10:00:08.000000000 +0100 +++ qmail-1.03.dk-auth/qmail-dk.8 2005-11-29 10:00:47.000000000 +0100 @@ -16,6 +16,14 @@ For another way, you can rename qmail-queue to qmail-queue.orig, and set DKQUEUE=bin/qmail-queue.orig. .B qmail-dk +has been patched with +.BR qmail-dk-0.53-auth.patch , +which sets up a bit of automatic behavior. If RELAYCLIENT is found in +the environment, qmail-dk imports the DKSIGN environment variable and +tries to sign the mail. If RELAYCLIENT is not found in the environment, +DKVERIFY is imported, and we attempt to verify the mail. + +.B qmail-dk supports DomainKey signing and verification. It uses the libdomainkey and OpenSSL libraries. To sign a message, set the .B DKSIGN diff -uN qmail-1.03.dk/qmail-dk.c qmail-1.03.dk-auth/qmail-dk.c --- qmail-1.03.dk/qmail-dk.c 2005-11-29 10:00:08.000000000 +0100 +++ qmail-1.03.dk-auth/qmail-dk.c 2005-11-29 10:00:47.000000000 +0100 @@ -95,6 +95,7 @@ char tmp[FMT_ULONG]; +char *relayclient; char *dksign = 0; stralloc dksignature = {0}; stralloc dkoutput = {0}; @@ -169,10 +170,14 @@ sig_blocknone(); umask(033); - dksign = env_get("DKSIGN"); - dkverify = env_get("DKVERIFY"); - if (!dksign && !dkverify) + relayclient = env_get("RELAYCLIENT"); + if(relayclient){ + dksign = env_get("DKSIGN"); + if(! dksign) dksign = "/etc/domainkeys/%/default"; + }else{ + dkverify = env_get("DKVERIFY"); + } dkqueue = env_get("DKQUEUE"); if (dkqueue && *dkqueue) binqqargs[0] = dkqueue; diff -uN qmail-1.03.dk/qmail-smtpd.c qmail-1.03.dk-auth/qmail-smtpd.c --- qmail-1.03.dk/qmail-smtpd.c 2005-11-29 10:00:00.000000000 +0100 +++ qmail-1.03.dk-auth/qmail-smtpd.c 2005-11-29 10:03:14.000000000 +0100 @@ -851,8 +851,10 @@ } /* check if we are authenticated, if yes enable relaying */ - if (flagauthok && relayclient == 0) + if (flagauthok && relayclient == 0) { relayclient = ""; + if (!env_put("RELAYCLIENT=")) die_nomem(); + } /* smtp size check */ if (databytes && !sizelimit(arg))