Opened 22 years ago
Last modified 9 years ago
#272 closed enhancement
authorized sendmail should be in ports — at Initial Version
Reported by: | eric@… | Owned by: | kevin@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.0 |
Keywords: | Cc: | ||
Port: |
Description
It would be nice to be able to enable authorized sendmail from ports. This is probably best by first completing a sendmail port, then adding a sasl variant, but it could be done any number of ways.
Here are the instructions for building the software. Hopefully patching dlcompat is not needed, if it is then it should either be verified that the patch is compatible with everything else that uses dlcompat or a custom version should be installed with a different name. Hopefully authorization can also be enabled for a released version of sendmail as well as sendmail from cvs.
$ cvs -d cvs.opendarwin.org:/cvs/od co dlcompat $ cd dlcompat; sudo make install
$ curl -O ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus- sasl-1.5.27.tar.gz $ tar xzf cyrus-sasl-1.5.27.tar.gz $ cd cyrus-sasl-1.5.27/config/ $ cp /usr/libexec/config* ./ $ curl -O http://fink.sourceforge.net/files/ltconfig $ curl -O http://fink.sourceforge.net/files/ltmain.sh $ cd .. $ ./configure --with-plugindir=/usr/local/lib/sasl --libdir=/usr/local/lib --mandir=/usr/share/man --disable-krb4 --disable-gssapi --enable-login
$ vi plugins/Makefile -- -plugins/Makefile: LDFLAGS = -L/usr/local/lib -export-dynamic -rpath $(plugindir) +plugins/Makefile: LDFLAGS = -L/usr/local/lib -export-dynamic -module -rpath $(plugindir) --
$ vi lib/dlopen.c lib/saslutil.c
--- cyrus-sasl-1.5.27/lib/dlopen.c Sun Aug 13 18:44:02 2000 +++ cyrus-sasl-1.5.27-modified/lib/dlopen.c Mon May 13 16:06:01 2002 @@ -158,7 +158,7 @@
int flag; void *library; void *entry_point;
-#if OpenBSD
+#if OpenBSD APPLE char adj_entryname[1024];
#else #define adj_entryname entryname
@@ -179,7 +179,7 @@
return SASL_FAIL;
}
-#if OpenBSD
+#if OpenBSD APPLE snprintf(adj_entryname, sizeof adj_entryname, "_%s", entryname);
#endif
--- cyrus-sasl-1.5.27/lib/saslutil.c Wed Dec 20 22:03:43 2000 +++ cyrus-sasl-1.5.27-modified/lib/saslutil.c Mon May 13 16:18:12 2002 @@ -358,6 +358,12 @@
if (!rpool->initialized) {
getranddata(rpool->pool); rpool->initialized = 1;
+#ifdef APPLE + { + long *foo = (long *)rpool->pool; + srandom(*foo); + } +#endif /* APPLE */
}
}
@@ -370,6 +376,11 @@
/* init if necessary */ randinit(rpool);
+#ifdef APPLE + for (lup=0;lup<len;lup++) { + buf[lup] = (char) (random() >> 8); + } +#else /* APPLE */
#ifdef WIN32
for (lup=0;lup<len;lup++)
buf[lup] = (char) (rand() >> 8);
@@ -377,6 +388,7 @@
for (lup=0; lup<len; lup++)
buf[lup] = (char) (jrand48(rpool->pool) >> 8);
#endif /* WIN32 */
+#endif /* APPLE */
}
/* this function is just a bad idea all around, since we're not
trying to
$ sudo make install $ vi /usr/local/lib/sasl/Sendmail.conf
pwcheck_method: passwd
$ cvs -d cvs.opendarwin.org:/cvs/Apple co sendmail
$ vi sendmail/devtools/Site/site.config.m4
APPENDDEF(
confENVDEF',
-DSASL') APPENDDEF(conf_sendmail_LIBS',
-lsasl -ldl')
$ mkdir /tmp/sendmail.obj $ mkdir /tmp/sendmail.dst $ sudo make DSTROOT=/tmp/sendmail.dst OBJROOT=/tmp/sendmail.obj RC_ARCHS=ppc install
$ cp -Rp /tmp/sendmail.dst/* /
-- edit sendmail.cf m4 -- trust authenticated users for relaying define(
confAUTH_MECHANISMS',
PLAIN LOGIN') TRUST_AUTH_MECH(`PLAIN LOGIN')[references] http://www.sendmail.org/~ca/email/auth.html http://asg.web.cmu.edu/archive/message.php?mailbox=archive.cyrus- sasl&msg=1001