|
Your IP is: 38.107.191.114 |
http://www.owlriver.com/tips/smtp-auth/
[root@thishost /etc/mail]# grep -i auth sendmail.mc TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl define(`confAUTH_OPTIONS', `A')dnl
[root@thishost /etc/mail]# m4 /etc/mail/sendmail.mc \ > /etc/mail/sendmail.cfThese instructions are at the top of the default sendmail.mc shipped by Red Hat. (Also, note that in their Raw Hide, at the time this is prepared, Red Hat's next release after Red Hat 7.3 is doing the sendmail.org recommended relocation of /etc/sendmail.cf to /etc/mail/sendmail.cf ). The sendmail which accompanied Red Hat 7.3 (sendmail 8.11.6) was also SMTP-AUTH ready.
Instead, those rulesets will be called by the check_rcpt ruleset; they will be skipped if a sender has been authenticated using a "trusted" mechanism, i.e., one that is defined via TRUST_AUTH_MECH().The 'check_rcpt' are the /etc/mail/access and related files -- if one has authenticated by using the SMTP-AUTH changes outlined here, one has 'proved' than one has the authorization to use the mailserver, and one may send email from anywhere. -- Obviously, it does not stop a rogue user from abusing the mailserver, but it does allow the sysadmin to review the log files (see below), and address the matter.
confAUTH_MECHANISMS \
AuthMechanisms [GSSAPI KERBEROS_V4 DIGEST-MD5
CRAM-MD5] List of authentication
mechanisms for AUTH (separated by
spaces). The advertised list of
authentication mechanisms will be the
intersection of this list and the list
of available mechanisms as determined
by the CYRUS SASL library.
This red section is really important, and
so we set if off to draw attention -- It does NO GOOD to apply the
changes to sendmail.mc, if sendmail does not have the needed
SASL libraries to perform the authentication.[root@thishost /etc/mail]# rpm -qa | grep sasl | sort cyrus-sasl-1.5.24-23 cyrus-sasl-gssapi-1.5.24-23 cyrus-sasl-md5-1.5.24-23 cyrus-sasl-plain-1.5.24-23
[root@ftp mail]# /sbin/service saslauthd start
Starting saslauthd: [ OK ]
[root@ftp mail]# /sbin/chkconfig saslauthd on
[root@thishost /etc/mail]# make [root@thishost /etc/mail]# service sendmail restart
[root@swampfox sendmail]# telnet localhost 25 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220-swampfox.owlriver.com ESMTP RBL Testing and Publishing Notice Variant 220- Sendmail 8.11.6/8.11.6/nullclient 220- ready at Sun, 23 Jun 2002 10:27:54 -0400 220- 220- ------------ NOTICE - and - TERMS OF USE ---------------------- 220- We reserve the right to test all offerings and intermediate 220- relay hosts used by you for Open Relay and related status, 220- and to report for public publishing the results of our tests. 220- All content offered to this mailserver is done without any 220- further expectation of privacy by you, and you grant to us 220- full rights of republication at our sole discretion. 220- We also infer irrevocable explicit consent to our test of 220- those hosts, once you have further used our resources. 220- 220- Do not like these polices? Okay -- Go away. 220- Type "quit" to disconnect NOW, and send paper mail 220- to our domain mailing address if you disagree with any of 220- these terms and reporting. 220- --------------------------------------------------------------- 220- Revised: RPH 020415 220- --------------------------------------------------------------- 220 EHLO localhost 250-swampfox.owlriver.com Hello localhost [127.0.0.1], pleased to meet you 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-SIZE 250-DSN 250-ONEX 250-ETRN 250-XUSR 250-AUTH GSSAPI LOGIN PLAIN 250 HELP QUIT 221 2.0.0 swampfox.owlriver.com closing connection Connection closed by foreign host. [root@swampfox sendmail]#
EHLO localhost 250-AUTH GSSAPI LOGIN PLAIN QUIT
[herrold@centos-4 ~]$ telnet ftp.first.lan 25 Trying 10.16.1.253... Connected to ftp.first.lan (10.16.1.253). Escape character is '^]'. 220 ftp.first.lan ESMTP Sendmail 8.13.1/8.13.1; Mon, 19 Feb 2007 11:11:19 -0500 EHLO localhost 250-ftp.first.lan Hello centos-4.first.lan [10.16.1.101], pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-AUTH DIGEST-MD5 CRAM-MD5 LOGIN PLAIN 250-DELIVERBY 250 HELP quit 221 2.0.0 ftp.first.lan closing connection Connection closed by foreign host. [herrold@centos-4 ~]$
Return-Path:Received: from box.xxx.xxx (box.xxx.xxx [198.30.xxx.xxx]) by swampfox.owlriver.com (8.11.6/8.11.6) with ESMTP id g5N72Ri04393 for ; Sun, 23 Jun 2002 03:02:27 -0400 Received: from owlriver.com (dhcp065-024-xxx-xxx.columbus.rr.com [65.24.xxx.xxx]) (authenticated bits=0) by box.xxx.xxx (8.12.4/8.12.4) with ESMTP id g5N72Q3s001708; Sun, 23 Jun 2002 03:02:27 -0400 Sender: herrold@mail.xxx.xxx Message-ID: <3D157288.8FF41049@owlriver.com> Date: Sun, 23 Jun 2002 03:02:32 -0400 From: herrold X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.18-3 i686)
[root@bo dl]# tail -f /var/log/maillog | grep herr Jun 23 03:01:38 box sendmail[1682]: AUTH=server, relay=dhcp065-024-xxx-xxx.columbus.rr.com [65.24.xxx.xxx], authid=herrold, mech=PLAIN, bits=0 Jun 23 03:01:39 box sendmail[1682]: g5N71X3s001682: from=, size=351, class=0, nrcpts=1, msgid=<3D157252.57F823A5@owlriver.com>, proto=ESMTP, daemon=MTA, relay=dhcp065-024-xxx-xxx.columbus.rr.com [65.24.xxx.xxx] Jun 23 03:01:40 box sendmail[1686]: g5N71X3s001682: to= , delay=00:00:02, xdelay=00:00:01, mailer=esmtp, pri=30346, relay=swampfox.owlriver.com. [206.21.107.147], dsn=2.0.0, stat=Sent (g5N71dG19054 Message accepted for delivery)
Copyright (C) 2002 R P Herrold
herrold@owlriver.com NIC: RPH5 (US)
My words are not deathless prose,
but they are mine.
Owl River Company
"The World is Open to Linux (tm)"
... Open Source LINUX solutions ...
info@owlriver.com
Columbus, OH
| Other voices: | joreybump.com - SMTP AUTH with sendmail |
| sendmail.org outline | |
| Simpaticus outline |
|   |   |   |   |
|
[legal]
[ no spam policy ]
[ Copyright]
© 2008 Owl River Company All rights reserved. |