I have a freebsd 5.3 machine and I'm attempting to setup sendmail so that it
will do SMTP Auth.
I installed Cyrus-sasl from the FreeBSD ports. Before installing it, I
edited the makefile to include --enable-login as a configuration option. I
made sure /usr/local/lib/sasl/Sendmail.conf looks like so:
pwcheck_method: passwd
I edited /etc/make.conf and added the following lines:
SENDMAIL_CFLAGS=-I/usr/local/include/sasl1 -DSASL
SENDMAIL_LDFLAGS=-L/usr/local/lib
SENDMAIL_LDADD=-lsasl
My ..cf/cf/sendmail.mc contains the following lines:
define(`confAUTH_OPTIONS', `A')dnl
TRUST_AUTH_MECH(`LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', ` LOGIN PLAIN')dnl
define(`confDEF_AUTH_INFO', `/etc/mail/auth-info')dnl
dnl TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl define(`confAUTH_MECHANISMS', `DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
(I'm going for login plain as my auth mechanism).
I needed to upgrade Sendmail anyway. So I downloaded Sendmail 8.13.6 and
installed it in the normal way.
Somehow something isn't working. When I restart sendmail, it starts up and
runs OK but gives me the following warnings:
Warning: Option: AuthMechanisms requires SASL support (-DSASL)
Warning: Option: DefaultAuthInfo requires SASL support (-DSASL)
Warning: Option: AuthOptions requires SASL support (-DSASL)
If I telnet to port 25 and do a ehlo, I do not get AUTH LOGIN PLAIN in the
response:
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE 5000000
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
What have I overlooked? I've gone over and over this.
Thanks,
Lisa
mech_list: login plain (it's needed with sasl2?)
> I edited /etc/make.conf and added the following lines:
>
> SENDMAIL_CFLAGS=-I/usr/local/include/sasl1 -DSASL
> SENDMAIL_LDFLAGS=-L/usr/local/lib
> SENDMAIL_LDADD=-lsasl
This looks ok, but it seems that sasl support wasn't compiled.(?)
sasl or sasl2, shoud be added.
> Somehow something isn't working. When I restart sendmail, it starts up and
> runs OK but gives me the following warnings:
>
> Warning: Option: AuthMechanisms requires SASL support (-DSASL)
> Warning: Option: DefaultAuthInfo requires SASL support (-DSASL)
> Warning: Option: AuthOptions requires SASL support (-DSASL)
Do a "ldd /path/to/binary/sendmial" , see if it links to sasl libraries.
ldd works in linux :]
ML
"Martin Latos" <is...@sct.org> wrote in message
news:ed12hc$iqf$1...@mx1.internetia.pl...
> Do a "ldd /path/to/binary/sendmial" , see if it links to sasl libraries.
> ldd works in linux :]
OK, that was interesting and I think it tells me something, I'm just not
sure what.
On the FreeBSD box where auth is NOT working:
ldd /usr/sbin/sendmail
/usr/sbin/sendmail:
libutil.so.4 => /lib/libutil.so.4 (0x280f9000)
libc.so.5 => /lib/libc.so.5 (0x28105000)
On this box, my sasl libraries are in /usr/local/lib
On a Redhat box I have where auth IS working:
ldd /usr/sbin/sendmail
libsasl.so.7 => /usr/lib/libsasl.so.7 (0x4001d000)
libdb-3.2.so => /lib/libdb-3.2.so (0x40028000)
libresolv.so.2 => /lib/libresolv.so.2 (0x400cf000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x400e1000)
libnsl.so.1 => /lib/libnsl.so.1 (0x4010e000)
libdl.so.2 => /lib/libdl.so.2 (0x40124000)
libc.so.6 => /lib/i686/libc.so.6 (0x40128000)
libpam.so.0 => /lib/libpam.so.0 (0x40264000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Like I said, I'm not sure what this is telling me. Do I need to recompile
cyrus-sasl on the FreeBSD and tell it to put it's libraries elsewhere
(/lib?) or do I need to recompile sendmail and tell it to look for libraries
elsewhere (/usr/local/lib?)?
Lisa
> Like I said, I'm not sure what this is telling me. Do I need to recompile
> cyrus-sasl on the FreeBSD and tell it to put it's libraries elsewhere
> (/lib?) or do I need to recompile sendmail and tell it to look for libraries
> elsewhere (/usr/local/lib?)?
Recompile sendmail (tweak siteconfig.m4 to add support for libcrypt and
libsasl). Make sure you compile with -DSASL ;]
I have no experience compiling on FreeBSD but I guess there should be no
problems.
ML
> Recompile sendmail (tweak siteconfig.m4 to add support for libcrypt and
> libsasl). Make sure you compile with -DSASL ;]
> I have no experience compiling on FreeBSD but I guess there should be no
> problems.
I'll give this a try this morning. I appreciate your time and help.
Lisa
> > On the FreeBSD box where auth is NOT working:
> >
> > ldd /usr/sbin/sendmail
> > /usr/sbin/sendmail:
> > libutil.so.4 => /lib/libutil.so.4 (0x280f9000)
> > libc.so.5 => /lib/libc.so.5 (0x28105000)
> >
> > On this box, my sasl libraries are in /usr/local/lib
> Obviously Sendmail wasn't compiled to look into /usr/local/lib.
>
/usr/sbin/sendmail is a small utility that spawn the real mailer based
on a configuration file. That way a system update or rebuild does not
affect postfix, qmail or exim installations.
See mailwrapper(8). I beleive the 3 main BSD use it.
The real sendmail binary should be elsewhere, the OP should look at
/etc/mailer.conf. (probably /usr/libexec/sendmail/sendmail)
"sendmail -bt -d0.1" will give you the option sendmail was compiled with
too.
I can't help much more the OP cause I never done SASL on FreeBSD.
--
Hugo Villeneuve <hu...@EINTR.net>
I don't know what's causing my troubles here, but this is driving me nuts. I
modified ../devtools/Site/site.config.m4 to look like this:
dnl cyrus-sasl for smtp auth
APPENDDEF(`conf_sendmail_ENVDEF', `-DSASL')
APPENDDEF(`conf_sendmail_LIBS', `-lsasl')
dnl APPENDDEF(`confLIBDIRS', `-L/usr/local/lib/sasl')
dnl APPENDDEF(`confINCDIRS', `-I/usr/local/include')
Then I rebuilt sendmail using the -c option to Build so it would pull in the
modified site.config.m4 file (and it did, I saw that happen), but the Build
stopped with errors. I then modified site.config.m4 again as so:
dnl cyrus-sasl for smtp auth
APPENDDEF(`conf_sendmail_ENVDEF', `-DSASL')
APPENDDEF(`conf_sendmail_LIBS', `-lsasl')
and rebuilt sendmail with the -c option but again the build failed. The
Build goes along OK until it errors out. The errors are this:
In file included from main.c:15:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from alias.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from arpadate.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from bf.c:31:
sendmail.h:137:20: sasl.h: No such file or directory
sendmail.h:138:24: saslutil.h: No such file or directory
In file included from collect.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from conf.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from control.c:11:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from convtime.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from daemon.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from deliver.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from domain.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from envelope.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from err.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from headers.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from macro.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from map.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from mci.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from milter.c:11:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from mime.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from parseaddr.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from queue.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from ratectrl.c:47:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from readcf.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from recipient.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from sasl.c:16:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from savemail.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from sfsasl.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from sm_resolve.c:44:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from srvrsmtp.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from stab.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from stats.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from sysexits.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from tls.c:11:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from trace.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from udb.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from usersmtp.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from util.c:14:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
mkdep: compile failed
*** Error code 1
Stop in /usr/src/sendmail-8.13.6/obj.FreeBSD.5.3-RELEASE.i386/sendmail.
Making in /usr/src/sendmail-8.13.6/obj.FreeBSD.5.3-RELEASE.i386/sendmail
cp /dev/null statistics
cc -O -I. -I../../include -I/usr/local/include -DNEWDB -DNIS -DMAP_REGEX -DMAP_REGEX
-DSASL -c main.c
In file included from main.c:15:
./sendmail.h:137:20: sasl.h: No such file or directory
./sendmail.h:138:24: saslutil.h: No such file or directory
In file included from main.c:15:
./sendmail.h:153: error: syntax error before "README"
./sendmail.h:591: error: syntax error before ':' token
./sendmail.h:675: error: syntax error before "sasl_conn_t"
main.c:109: error: syntax error before "srvcallbacks"
main.c:111: warning: braces around scalar initializer
main.c:111: warning: (near initialization for `srvcallbacks[0]')
main.c:111: error: `SASL_CB_VERIFYFILE' undeclared here (not in a function)
main.c:111: error: initializer element is not constant
main.c:111: error: (near initialization for `srvcallbacks[0]')
main.c:111: warning: excess elements in scalar initializer
main.c:111: warning: (near initialization for `srvcallbacks[0]')
main.c:111: warning: excess elements in scalar initializer
main.c:111: warning: (near initialization for `srvcallbacks[0]')
main.c:111: error: initializer element is not constant
main.c:111: error: (near initialization for `srvcallbacks[0]')
main.c:112: warning: braces around scalar initializer
main.c:112: warning: (near initialization for `srvcallbacks[1]')
main.c:112: error: `SASL_CB_PROXY_POLICY' undeclared here (not in a
function)
main.c:112: error: initializer element is not constant
main.c:112: error: (near initialization for `srvcallbacks[1]')
main.c:112: warning: excess elements in scalar initializer
main.c:112: warning: (near initialization for `srvcallbacks[1]')
main.c:112: warning: excess elements in scalar initializer
main.c:112: warning: (near initialization for `srvcallbacks[1]')
main.c:112: error: initializer element is not constant
main.c:112: error: (near initialization for `srvcallbacks[1]')
main.c:113: warning: braces around scalar initializer
main.c:113: warning: (near initialization for `srvcallbacks[2]')
main.c:113: error: `SASL_CB_LIST_END' undeclared here (not in a function)
main.c:113: error: initializer element is not constant
main.c:113: error: (near initialization for `srvcallbacks[2]')
main.c:113: warning: excess elements in scalar initializer
main.c:113: warning: (near initialization for `srvcallbacks[2]')
main.c:113: warning: excess elements in scalar initializer
main.c:113: warning: (near initialization for `srvcallbacks[2]')
main.c:113: error: initializer element is not constant
main.c:113: error: (near initialization for `srvcallbacks[2]')
main.c:114: warning: data definition has no type or storage class
main.c: In function `main':
main.c:2262: error: `SASL_OK' undeclared (first use in this function)
main.c:2262: error: (Each undeclared identifier is reported only once
main.c:2262: error: for each function it appears in.)
*** Error code 1
Stop in /usr/src/sendmail-8.13.6/obj.FreeBSD.5.3-RELEASE.i386/sendmail.
*** Error code 1
Anyone??? Thanks,
Lisa
Did you install cyrus-sasl from ports or are you using the FreeBSD system
libs?
> Then I rebuilt sendmail using the -c option to Build so it would pull in
> the modified site.config.m4 file (and it did, I saw that happen), but
> the Build stopped with errors. I then modified site.config.m4 again as
> so:
>
> dnl cyrus-sasl for smtp auth
> APPENDDEF(`conf_sendmail_ENVDEF', `-DSASL')
> APPENDDEF(`conf_sendmail_LIBS', `-lsasl')
>
> and rebuilt sendmail with the -c option but again the build failed. The
> Build goes along OK until it errors out. The errors are this:
>
> In file included from main.c:15:
> ./sendmail.h:137:20: sasl.h: No such file or directory
> ./sendmail.h:138:24: saslutil.h: No such file or directory In file
> included from alias.c:14:
The SASL header files can't be found. In site.config.m4 tell the build
process where to find the libs and includes.
Any special reason why you want to compile against the old SASL v1?
> Anyone??? Thanks,
>
> Lisa
Alexander
--
Alexander Dalloz | Löhne, Germany | GPG http://pgp.mit.edu 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora Core 2 GNU/Linux on Athlon with kernel 2.6.11-1.35_FC2smp
Serendipity 18:47:38 up 2 days, 16:56, load average: 0.30, 0.37, 0.37
From the ports: /usr/ports/security/cyrus-sasl
> Did you install cyrus-sasl from ports or are you using the FreeBSD system
> libs?
>
>
> The SASL header files can't be found. In site.config.m4 tell the build
> process where to find the libs and includes.
I thought that was what I was putting
SENDMAIL_CFLAGS=-I/usr/local/include/sasl1 -DSASL
SENDMAIL_LDFLAGS=-L/usr/local/lib
SENDMAIL_LDADD=-lsasl
in /etc/make.conf and
APPENDDEF(`confLIBDIRS', `-L/usr/local/lib/sasl')
APPENDDEF(`confINCDIRS', `-I/usr/local/include/sasl1')
in site.config.m4
Won't that tell sendmail where to pull in the libraries from?
> Any special reason why you want to compile against the old SASL v1?
The only reason, really is that I'm using SASL v1 on the red hat box where
SMTP Auth works.
Lisa
I'm making progress here, but I'm not there yet. When I rebuild sendmail
now, it finds the sasl.c and sasl.h that it was complaining about earlier. I
did this by changing
APPENDDEF(`confINCDIRS', `-I/usr/local/include') to
APPENDDEF(`confINCDIRS', `-I/usr/local/include/sasl1')
in site.config.m4 (the sasl1 subdirectory is where sasl.h is).
Now when I rebuild sendmail, I'm getting one error:
/usr/bin/ld: cannot find -lsasl
*** Error code 1
Stop in /usr/src/sendmail-8.13.6/obj.FreeBSD.5.3-RELEASE.i386/sendmail.
*** Error code 1
Stop in /usr/src/sendmail-8.13.6.
As a reminder, my site.config.m4 looks like this:
dnl cyrus-sasl for smtp auth
APPENDDEF(`conf_sendmail_ENVDEF', `-DSASL')
APPENDDEF(`conf_sendmail_LIBS', `-lsasl')
APPENDDEF(`confLIBDIRS', `-L/usr/local/lib/sasl')
APPENDDEF(`confINCDIRS', `-I/usr/local/include/sasl1')
dnl map REGEX
APPENDDEF(`confMAPDEF', `-DMAP_REGEX')
and /etc/make.conf looks like this:
# -- use.perl generated deltas -- #
# Created: Thu Oct 27 10:25:32 2005
# Setting to use base perl from ports:
PERL_VER=5.8.5
PERL_VERSION=5.8.5
PERL_ARCH=mach
NOPERL=yo
NO_PERL=yo
NO_PERL_WRAPPER=yo
SENDMAIL_CFLAGS=-I/usr/local/include/sasl1 -DSASL
SENDMAIL_LDFLAGS=-L/usr/local/lib/sasl
SENDMAIL_LDADD=-lsasl
Lisa
Ok, so the path is definitely in /usr/local.
>> Did you install cyrus-sasl from ports or are you using the FreeBSD system
>> libs?
>>
>>
>> The SASL header files can't be found. In site.config.m4 tell the build
>> process where to find the libs and includes.
>
> I thought that was what I was putting
>
> SENDMAIL_CFLAGS=-I/usr/local/include/sasl1 -DSASL
That first line is wrong IMHO. You shouldn't append the "sasl1".
> SENDMAIL_LDFLAGS=-L/usr/local/lib
> SENDMAIL_LDADD=-lsasl
> in /etc/make.conf and
For use with SASLv2:
# SASL (cyrus-sasl v2) sendmail build flags...
SENDMAIL_CFLAGS=-I/usr/local/include -DSASL=2
SENDMAIL_LDFLAGS=-L/usr/local/lib
SENDMAIL_LDADD=-lsasl2
> APPENDDEF(`confLIBDIRS', `-L/usr/local/lib/sasl')
> APPENDDEF(`confINCDIRS', `-I/usr/local/include/sasl1')
>
> in site.config.m4
>
> Won't that tell sendmail where to pull in the libraries from?
But in your previous posting you showed
dnl APPENDDEF(`confLIBDIRS', `-L/usr/local/lib/sasl')
dnl APPENDDEF(`confINCDIRS', `-I/usr/local/include')
-> commented settings. Anyway, you don't need that when setting compile
switches by make.conf. At least if you are neither bypassing the FreeBSD
sys nor ports.
>> Any special reason why you want to compile against the old SASL v1?
>
> The only reason, really is that I'm using SASL v1 on the red hat box
> where SMTP Auth works.
But that RHL 7.2 is dead since years and smells like dead fish. I
encourage you to use SASLv2; from ports "security/cyrus-sasl2".
> Lisa
Alexander
--
Alexander Dalloz | Löhne, Germany | GPG http://pgp.mit.edu 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora Core 2 GNU/Linux on Athlon with kernel 2.6.11-1.35_FC2smp
Serendipity 20:20:19 up 2 days, 18:28, load average: 0.26, 0.26, 0.27
>> SENDMAIL_CFLAGS=-I/usr/local/include/sasl1 -DSASL
>
> That first line is wrong IMHO. You shouldn't append the "sasl1".
See my post just under this one. I appended the "sasl1" and the sendmail
build found sasl.c and sasl.h
If I don't append this, I get bunches of errors re sasl.c and sasl.h not
being found. If I do append this, I don't get that, I just get the one error
regarding lsasl If I could get past this one error, I think I'll have it
licked.
Lisa
According to /usr/ports/security/cyrus-sasl/pkg-plist it should install
libsasl.so* and libsasl.a into /usr/local/lib on a standard port
build/install, i.e. try
APPENDDEF(`confLIBDIRS', `-L/usr/local/lib')
instead (there are no libsasl.* files in /usr/local/lib/sasl, right?).
>and /etc/make.conf looks like this:
>
># -- use.perl generated deltas -- #
># Created: Thu Oct 27 10:25:32 2005
># Setting to use base perl from ports:
>PERL_VER=5.8.5
>PERL_VERSION=5.8.5
>PERL_ARCH=mach
>NOPERL=yo
>NO_PERL=yo
>NO_PERL_WRAPPER=yo
>SENDMAIL_CFLAGS=-I/usr/local/include/sasl1 -DSASL
>SENDMAIL_LDFLAGS=-L/usr/local/lib/sasl
>SENDMAIL_LDADD=-lsasl
Did you read my posting in the previous thread you started on this
issue? (It's at
http://groups.google.com/group/comp.mail.sendmail/msg/7277d27e0631bc26
.) I listed 4 different methods to build a SASL-enabled sendmail on
FreeBSD, you seem to mixing up 1) and 2). Those settings in
/etc/make.conf are for building sendmail from the FreeBSD base system
sources (/usr/src/usr.sbin/sendmail -> /usr/src/contrib/sendmail), they
have no relevance when building from a tarball downloaded straight from
sendmail.org.
--Per Hedeland
p...@hedeland.org