cd /etc/mail ; make ; ls -l access*
lrwxr-xr-x 1 root wheel 9 Jul 10 2004
access@ -> LN/access
Ensure passwords database is not world readable.
-rw-r----- 1 root wheel 114688 Aug 8 18:31 access.db lrwxr----- 1 root bin 33 May 24 14:08 LN/access@ -> ../../domain/this/etc/mail/access
cd /etc/mail ; chmod 640 access.db ;
chown root:wheel access.db
cd /etc/mail ; make ; make stop ; make start # Probably better than restart. Do This On Remote Server (Smart Host)(That Should Receive Mail From You & Further Relay It To Rest Of Internet )
lib/libsmutil lib/libsm libexec/mail.local libexec/smrsh usr.bin/vacation usr.sbin/editmap usr.sbin/mailstats usr.sbin/makemap usr.sbin/praliases usr.sbin/sendmail
cd /usr/ports/databases/db3 ; make
install
To avoid missing libsmutil and libsm libraries, either eg:
cd /usr/src ; make cleandir ; make
clean ; make cleandepend ; make all install
The above might solve the problem of host=tower currently
only showing: 250-AUTH PLAIN
LOGIN
cd /etc/mail ; make ; make stop ; make start # Probably better than restart. Test On Sender ( Gateway between Internet & local net)
echo "Local test (works without SASL)"
; date | mail postmaster@remote_relay_smart_host
echo "Remote test (needs SASL)" ; date | mail someone@some_host_beyond_smarthost Verify
Debug
Good Examples
/var/log/maillog Each line begins: Date
Time hostname sm-mta[Process ID] (Note, particularly
on remote smart host, sometimes different PID lines get
interleaved, indicating several jobs running in parallel
simultaneously).
On Local Gateway, To Remote Smart Host
k04DRJls021661: --- 050
<remote@destination.com>
Connecting to smtprelay2.berklix.org
via esmtp...
k04DRJls021661: SMTP outgoing connect on p549A63B3.dip.t-dialin.net AUTH=client, realm=tower.berklix.org, available realms=<No Realms> AUTH=client, relay=smtprelay2.berklix.org, mech=DIGEST-MD5, bits=128 k04DRJls021661: --- 050 <remote@destination. com> Sent (k04DRNos040492 Message accepted for delivery) k04DRJls021661: to=<remote@destination. com> delay=00:00:06, xdelay=00:00:06, mailer=esmtp, pri=30594, relay=smtprelay2.berklix.org [my.old.ip.v4], dsn=2.0.0, stat=Sent (k04DRNos040492 Message accepted for delivery) k04DRJls021661: done; delay=00:00:06, ntries=1 NOQUEUE: --- 050 Closing connection to smtprelay2.berklix.org On Remote Smart Host
Notes debugging with SASL2, Looking on smart server in
/var/mail/maillog
AUTH: available mech=LOGIN PLAIN ANONYMOUS DIGEST-MD5 CRAM-MD5, allowed mech=GSSAPI DIGEST-MD5 PLAIN LOGIN k04DRNor040492: Milter: no active filter k04DRNor040492: --- 220 tower. berklix.org ESMTP Sendmail 8.12.9p2/8.12.9; Wed, 4 Jan 2006 14:27:23 +0100 (CET) k04DRNor040492: <-- EHLO local-gate.net k04DRNor040492: --- 250-tower. berklix.org Hello p549A63B3.dip.t-dialin.net [84.154.99.179], pleased to meet you k04DRNor040492: --- 250-ENHANCEDSTATUSCODES k04DRNor040492: --- 250-PIPELINING k04DRNor040492: --- 250-8BITMIME k04DRNor040492: --- 250-SIZE k04DRNor040492: --- 250-DSN k04DRNor040492: --- 250-ETRN k04DRNor040492: --- 250-AUTH DIGEST-MD5 PLAIN LOGIN k04DRNor040492: --- 250-DELIVERBY k04DRNor040492: --- 250 HELP k04DRNor040492: <-- AUTH DIGEST-MD5 = k04DRNor040492: --- 334 bm9uY2U.................... k04DRNor040492: --- 334 cnNwYXV.................... k04DRNor040492: --- 235 2.0.0 OK Authenticated AUTH=server, relay=p549A63B3.dip.t-dialin.net [84.154.99.179], authid=jhs, mech=DIGEST-MD5, bits=128 k04DRNor040492: <-- EHLO local-gate.net k04DRNos040492: --- 250-tower. berklix.org Hello p549A63B3.dip.t-dialin.net [84.154.99.179], pleased to meet you k04DRNos040492: --- 250-ENHANCEDSTATUSCODES k04DRNos040492: --- 250-PIPELINING k04DRNos040492: --- 250-8BITMIME k04DRNos040492: --- 250-SIZE k04DRNos040492: --- 250-DSN k04DRNos040492: --- 250-ETRN k04DRNos040492: --- 250-AUTH DIGEST-MD5 PLAIN LOGIN k04DRNos040492: --- 250-DELIVERBY k04DRNos040492: --- 250 HELP k04DRNos040492: <-- MAIL From:<local_user @flat. berklix.net> SIZE=594 k04DRNos040492: --- 250 2.1.0 <local_user @flat. berklix.net> Sender ok k04DRNos040492: <-- RCPT To:<remote@destination. com> k04DRNos040492: --- 250 2.1.5 <remote@destination. com> Recipient ok k04DRNos040492: <-- DATA k04DRNos040492: --- 354 Enter mail, end with "." on a line by itself k04DRNos040492: from=<local_user@ flat. berklix.net> size=828, class=0, nrcpts=1, msgid=<200601041327.k04DRccs003279 @local-gate.net>, proto=ESMTP, daemon=IPv4, relay=p549A63B3.dip.t-dialin.net [84.154.99.179] k04DRNos040492: --- 250 2.0.0 k04DRNos040492 Message accepted for delivery k04DRNot040492: <-- QUIT k04DRNot040492: --- 221 2.0.0 tower. berklix.org closing connection SASL2
On Local Sending Client Host:
cd /etc/mail ;
On Remote Receiving Server Host:
touch access ; cat >> access < EOF
AuthInfo:server1.berklix.org "U:userName"
"R:server1.berklix.org" "P:password" "M:DIGEST-MD5
CRAM-MD5 LOGIN PLAIN"
EOFAuthInfo:server2.berklix.org "U:userName" "R:server2.berklix.org" "P:password" "M:DIGEST-MD5 CRAM-MD5 LOGIN PLAIN" cd /etc/mail ; make access.db
cd /usr/ports/security/cyrus-sasl2; make install ;
rehash
sasldblistusers2 ls -l /usr/local/etc/sasldb2.db # See the size with 0 entries in. saslpasswd2 -c -a Sendmail -u `hostname` userName
password
sasldblistusers2 ls -l /usr/local/etc/sasldb2.db # Notice size does not grow with an entry in # output is 1 to several lines, eg: user1@server1.berklix.org: userPassword user2@server2.berklix.org: userPassword
/var/db/pkg/cyrus-sasl-2.1.25_2
New FreeBSD: pkg info | grep cyrus/var/db/pkg/cyrus-sasl-saslauthd-2.1.25 (I don't use it on local gate or remote servers @ 2013-07)
cyrus-sasl-2.1.26_12 RFC 2222 SASL (Simple
Authentication and Security Layer)
Old FreeBSD: pkg_info -r
cyrus-sasl-saslauthd-2.1.25# (I don't use it on local gate or remote servers @ 2013-07)
Dependency: cyrus-sasl-2.1.25_2
vi /etc/rc.conf: # Not currently used:
saslauthd_enable="YES"# (I don't use it on local gate or remote servers @ 2013-07) echo "Not currently: cd /usr/local/etc/rc.d ; ./saslauthd start" # (I don't use it on local gate or remote servers @ 2013-07) cat >> /etc/make.conf << EOF
# .include "/site/domain/this/etc/make.conf"
cd /usr/src/lib/libsmutil; make cleandir ; make clean ;
make obj ; make# .include "/site/domain/this/etc/make.conf.sasl" SENDMAIL_CFLAGS=-I/usr/local/include -DSASL=2 SENDMAIL_LDFLAGS=-L/usr/local/lib SENDMAIL_LDADD=-lsasl2 EOF cd /usr/src/lib/libsm; make cleandir ; make clean ; make obj ; make cd /usr/src/usr.sbin/sendmail; make cleandir ; make clean ; make obj ; make ; make install cd /usr/local/lib/sasl2 ln -s -f ../../../../site/usr/local/lib/sasl2 LN ln -s -f LN/saslpasswd.conf ln -s -f LN/Sendmail.conf cd /etc/mail ; make ; make stop ; make start From: Peter Jeremy <peterj@@@FreeBSD.org> Date: Tue, 19 Apr 2022 20:15:50 +1000 To: Hajimu UMEMOTO <ume@@@mahoroba.org Cc: SAY@@@office.sigma-soft.ru WARNING: SITE IN .RU DOMAIN, ports@@@FreeBSD.org On 2022-Apr-16 21:03:21 +0900, Hajimu UMEMOTO <ume@@@mahoroba.org> wrote: >On Sun, 17 Apr 2022 05:52:27 +0900, ####### ###### ####### wrote: >> I would like to help test if I can. > >No, I cannot reproduce your problem. >As I said in my previous message, I'm using sendmail-8.17.1_3 with >cyrus-sasl-2.1.28 without any problem. There's a known incompatibility between cyrus-sasl-2.1.28 and sendmail-8.17.1 that is fixed in sendmail-8.17.1.9 - see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262935 I haven't verified that the problem still exists in sendmail-8.17.1_3 but the problem definitely existed in sendmail-8.17.1_2 and the only change between those versions is the PORTREVISION. Looking at the local patches, neither mail/sendmail nor security/cyrus-sasl2-saslauthd include patches that would make them compatible. Which Smart Host
A client host with (FreeBSD 12.4-RELEASE) Sendmail with SASL2
does not just try sending to the "Smart" relay host specified
by "^DS" in /etc/mail/sendmail.cf . If the smart server
fails, the client also tries other "^AuthInfo" servers listed
in client's /etc/mail/access .
Nice, except after breaking my specified smart relay I was confused by rejects from an alternate smart relay. Problem was reserve smart relay had not been previously repaired to accept SASL (so I hashed out the reserve in ./access on client until later). |
|||||||||||||||||||||||||||||||||||||||||||
Domains |