Smtp Auth

Herw is a good how-to for smtp auth with sendmail: http://www.jonfullmer.com/smtpauth/

Here are my problems so far. I downloaded cyrus-sasl and tried to compile it, but a got a buch of errors. I checked and ther is a package for fink. Then I must recompile sendmail to make it work and I don't know if I can download a special version.
Has anyone tried this before?
Also I found in /usr/lib a file named sasl2

Has anyone tried smtp authentication?
 
I have implemented smtp auth with QMail, but not with Sendmail. We moved away from Sendmail a little over a year ago after getting tired of its limitations and vulnerabilities. If you can, I would strongly suggest checking out QMail. If you're used to Sendmail, QMail will seem a little odd, but it's super-stable and well worth the migration.

- G!mpy
 
http://www.qmail.org/ :) Just choose a mirror that's close to you. To get smtp auth in QMail, there is a patch. I use this one:

http://members.elysium.pl/brush/qmail-smtpd-auth/

Now, depending how you want to do things, QMail is not all that you need. Grab QMail and the smtp auth patch for sure, but if you want to use virtual users, grab vpopmail. If you want to make account management easy, greab QMailAdmin (web-based email account management tool).

- G!mpy
 
Postfix also has a lot of fans.

I tried about 6 months ago to get qmail working on OS X. I never succeeded, and I consider myself fairly unix-savvy. Perhaps it's better now.

Exim is supposed to compile easily on OS X, fwiw.
 
No new QMail versions in a while so you likely tried the current version. My recommendation of QMail comes from using it on FreeBSD and RedHat. I don't have any experience with it on osx, but my guess is that it should work fine (at least...it should compile). QMail's configuration is where things sometimes get tricky.

Below I've included a quick install script I use.

- G!mpy

Code:
#!/bin/sh

# welcome
cat << EOM

                                               
   _|_|       _|      _|              _|   _|  
 _|    _|     _|_|  _|_|     _|_|_|        _|  
 _|  _|_|     _|  _|  _|   _|    _|   _|   _|  
 _|    _|     _|      _|   _|    _|   _|   _|  
   _|_|  _|   _|      _|     _|_|_|   _|   _|  

EOM

# variables
SHOST=`hostname | cut -d . -f 1`
PAKDIR=`pwd`
SKEL="$PAKDIR/skel"

# untar everything
echo "Unpacking files..."
sleep 2
ls -l *.gz | awk '{print $9}' | xargs -n 1 tar -xvzf

# tcpserver
echo "Installing ucspi-tcp-0.88..."
sleep 2
cd $PAKDIR/ucspi-tcp-0.88/
make
make setup check

# ezmlm
echo "Installing ezmlm-0.53..."
sleep 2
cd $PAKDIR/ezmlm-0.53/
make
make man
make setup

# vpopmail
echo "Installing vpopmail-5.2.1..."
sleep 2
pw groupadd vchkpw -g 89
pw useradd vpopmail -g vchkpw -u 89 -d /var/vpopmail
mkdir /var/vpopmail
chown -R vpopmail.vchkpw /var/vpopmail
cd $PAKDIR/vpopmail-5.2.1/
./configure --enable-roaming-users=y
make
make install-strip

# qmailadmin
echo "Installing qmailadmin-1.0.6..."
sleep 2
cd $PAKDIR/qmailadmin-1.0.6/
./configure
make
make install-strip

# misc
echo "Performing misc configuration..."
sleep 2
cp $SKEL/rc /var/qmail/
cp $SKEL/smtp.sh /var/qmail/bin/
chmod 750 /var/qmail/bin/smtp.sh
sed 's/_SHOST_/'$SHOST'/g' $SKEL/pop3.sh > /var/qmail/bin/pop3.sh
chmod 750 /var/qmail/bin/pop3.sh
cd /var/vpopmail/etc/
tcprules tcp.smtp.cdb tcp.smtp.tmp < tcp.smtp
echo 'PATH="$PATH:/var/qmail/bin:/var/vpopmail/bin"; export PATH;' >> /root/.profile

# quick & dirty fix
cd /var/qmail/control
for FOO in `ls -al | awk '{ print $9 }'`
{
  echo `hostname` > $FOO
}

# attention
cat << EOF

              !!! ATTENTION !!!

The QMail installation has completed. Please be sure
to review the installation and make sure things went
as planned. <ake sure /var/qmail/control/ looks good.

              !!! ATTENTION !!!

EOF

Originally posted by wyvern
Postfix also has a lot of fans.

I tried about 6 months ago to get qmail working on OS X. I never succeeded, and I consider myself fairly unix-savvy. Perhaps it's better now.

Exim is supposed to compile easily on OS X, fwiw.
 
Here's the pop3.sh:

Code:
#!/bin/sh
# This starts qmail-pop3d using tcpserver

env - PATH="/var/qmail/bin:/usr/local/bin" \
tcpserver -H -R 0 pop3 \
/var/qmail/bin/qmail-popup _SHOST_.domain.com \
/var/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir &

smtp.sh:

Code:
#!/bin/sh

echo Starting qmail-smtpd...
/usr/local/bin/tcpserver -x /var/vpopmail/etc/tcp.smtp.cdb -u 82 -g 81 0 \
smtp /var/qmail/bin/qmail-smtpd \
2>&1 | /var/qmail/bin/splogger smtpd &

...and my rc...

Code:
#!/bin/sh

# Using splogger to send the log through syslog.
# Using qmail-local to deliver messages to Maildir format by default

case "$1" in
start)
        exec env - PATH="/var/qmail/bin:$PATH" \
                qmail-start ./Maildir/ splogger qmail&
                /var/qmail/bin/pop3.sh
                /var/qmail/bin/smtp.sh
        exit 0
        ;;
stop)
        exec killall qmail-send
        ;;
*)
        echo "Usage: `basename $0` {start|stop}" >&2
        exit 64
        ;;
esac

- G!mpy
 
I have implemented smtp auth with QMail, but not with Sendmail. We moved away from Sendmail a little over a year ago after getting tired of its limitations and vulnerabilities. If you can, I would strongly suggest checking out QMail. If you're used to Sendmail, QMail will seem a little odd, but it's super-stable and well worth the migration.

- G!mpy

hi, in my organization we need to realy mail from our mail server to isp mail server (smtp.xyz.com) using a username and password, can u tell me how to do this with Qmail, or plz direct me to some useful links.
i have been trying this for a long time, but ,,,,,,.........couldn't find ny god solution.
thanks
Mohit
 
Back
Top