?
Solved

Sendmail relay authintication

Posted on 2003-03-26
3
Medium Priority
?
407 Views
Last Modified: 2013-12-15
I have a user that has dial-up and need to allow relay.  Obviously I do not want to open the who dial-up domain.  

Thus, how to I set up authintication in sendmail to either:
1. Have SMTP authintication or
2. Allow SMTP access with POP authintication?
0
Comment
Question by:torpster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Assisted Solution

by:vlat
vlat earned 105 total points
ID: 8216764
Hello torpster!

You will need to install Cyrus SASL, and compile sendmail with

APPENDDEF(`confENVDEF', `-DSASL')
APPENDDEF(`conf_sendmail_LIBS', `-lsasl')

options in your site.config.m4 file.

In second case (POP-before-SMTP), which seems more preferable, you will need to install so-called POPRELAY daemon. You can find it at  http://poprelay.sourceforge.net/


0
 
LVL 1

Accepted Solution

by:
drewber earned 120 total points
ID: 8639108
I just did this like 2 days ago, heres a step by step of what i did to get it to work on red hat 7.2 Good luck and if you need any more help feel free to post more questions on here


a) Download sendmail source package from:

ftp://ftp.sendmail.org/pub/sendmail/sendmail.8.12.6.tar.gz

This is downloaded into /usr/local/src directory.

b) tar -zxvf sendmail.8.12.6
c) cd sendmail-8.12.6
d) cd devtools/Site
e) joe site.config.m4
f) Add the following lines to it:
APPENDDEF(`confENVDEF', `-DSASL')
APPENDDEF(`conf_sendmail_LIBS', `-lsasl')

g) cd /usr/local/src/sendmail-8.12.6/cf/cf
h) create a file called linux.mc with exactly the following lines:
OSTYPE(`linux')dnl
define(`confCONNECTION_RATE_THROTTLE',40)dnl
define(`confMAX_HOP',30)dnl
define(`confMAX_MESSAGE_SIZE',10000000)dnl
define(`confPRIVACY_FLAGS',`authwarnings,needmailhelo')dnl
define(`confQUEUE_LA',5)dnl
define(`confREFUSE_LA',10)dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTO_IDENT',0s)dnl
define(`confTO_QUEUEWARN', `12h')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`STATUS_FILE',`/etc/mail/sendmail.st')dnl
define(`ALIAS_FILE',`/etc/mail/aliases')dnl
FEATURE(`local_procmail', `/usr/bin/procmail')dnl
FEATURE(`always_add_domain')dnl
define(`confCW_FILE',` /etc/mail/local-host-names')dnl
FEATURE(`smrsh')dnl
define(`confEBINDIR',`/usr/lib/libexec')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`redirect')dnl
FEATURE(`virtusertable',` hash -o /etc/mail/virtusertable')dnl
FEATURE(`access_db')dnl
FEATURE(`blacklist_recipients')dnl
TRUST_AUTH_MECH(`GSSAPI DIGEST-MD5 PLAIN LOGIN PAM')dnl
define(`confAUTH_MECHANISMS', `GSSAPI DIGEST-MD5 PLAIN LOGIN PAM')dnl
MAILER(`smtp')dnl

i) run :
m4 ../m4/cf.m4 linux.mc > sendmail.cf
j) cp sendmail.cf /etc/mail
if /etc/mail does not exist , create it and then copy
k) cd /usr/local/src/sendmail-8.12.6/
l) groupadd -g smmsp; useradd -g smmsp smmsp
m) sh Build
n) sh Build install
o) create a file called /etc/rc.d/init.d/sendmail with following lines ( the standard redhat startup-script):

#!/bin/sh
#
#This shell script takes care of starting and stopping sendmail.
#
# chkconfig: 2345 80 30
# description: Sendmail is a Mail Transport Agent, which is the program \
# that moves mail from one machine to another.
# processname: sendmail
# config: /etc/sendmail.cf
# pidfile: /var/run/sendmail.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Source sendmail configureation.
if [ -f /etc/sysconfig/sendmail ] ; then
. /etc/sysconfig/sendmail
else
DAEMON=yes
QUEUE=1h
fi

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -f /usr/sbin/sendmail ] || exit 0
RETVAL=0
# See how we were called.
case "$1" in

start)
# Start daemons.

echo -n "Starting sendmail: "
/usr/bin/newaliases > /dev/null 2>&1

for i in virtusertable access domaintable mailertable ; do
if [ -f /etc/mail/$i ] ; then
makemap hash /etc/mail/$i < /etc/mail/$i
fi
done
daemon /usr/sbin/sendmail $([ "$DAEMON" = yes ] && echo -bd) \

$([ -n "$QUEUE" ] && echo -q$QUEUE)

RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/sendmail
;;

stop)

# Stop daemons.
echo -n "Shutting down sendmail: "
killproc sendmail
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sendmail
;;

restart|reload)

$0 stop
$0 start
RETVAL=$?
;;

status)

status sendmail
RETVAL=$?
;;

*)

echo "Usage: sendmail {start|stop|restart|status}"
exit 1

esac

exit $RETVAL

********* End of start/stop sendmail script ************

0) use /etc/rc.d/init.d/sendmail start/stop to start/stop sendmail
p) cd /etc/mail
q) touch local-host-names access domaintable mailertable virtusertable
r) if not exist, create dir /var/spool/mqueue
Sendmail installation is complete

Configuring Sendmail for authentication and with PAM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Edit /usr/lib/sasl/Sendmail.conf. Add the following line to it:
pwcheck_method: PAM

Create /etc/pam.d/smtp with following lines:
#%PAM-1.0
auth required /lib/security/pam_pwdb.so shadow
account required /lib/security/pam_pwdb.so
session required /lib/security/pam_pwdb.so

Test your setup, by using clients like Outlook Express and relay mail through this server.


0
 

Expert Comment

by:CleanupPing
ID: 9076585
torpster:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month8 days, 6 hours left to enroll

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question