Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th April 2008, 22:03
newz2000 newz2000 is offline
Junior Member
 
Join Date: Jul 2006
Location: Iowa USA
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Cool SMTP Auth not working

Hello, I'm having a problem with smtp auth. I'm not able to use it. I'm using the perfect setup for Ubuntu 6.06 (Dapper).

When I telnet to my host on port 25 and do EHLO I see that AUTH LOGIN and PLAIN are supported but when I try to use it I continually get an error that the password is wrong. I've tried with and without TLS, no change.

There's a very good chance I don't know how to use this. I'm using the same login information that I use for pop3. Do I instead need to use a different format such as username@domain.com, and if so what should domain.com be? (I've tried a few things without success)

Should failed logins be logged somewhere? If so, where should I look? Any help is appreciated.

I've confirmed that saslauthd is running. Here's what it says:

Code:
# This needs to be uncommented before saslauthd will be run automatically
START=yes

PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"

# You must specify the authentication mechanisms you wish to use.
# This defaults to "pam" for PAM support, but may also include
# "shadow" or "sasldb", like this:
# MECHANISMS="pam shadow"

MECHANISMS="pam"
postconf -n says:

Code:
postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = ipv4
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = /etc/postfix/local-host-names
myhostname = mydomain.net
mynetworks = 127.0.0.0/8 192.168.99.0/24
myorigin = /etc/mailname
recipient_delimiter = +
relayhost = 
smtp_tls_note_starttls_offer = yes
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = 
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
Reply With Quote
Sponsored Links
  #2  
Old 7th April 2008, 23:47
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,509
Thanks: 815
Thanked 5,269 Times in 4,130 Posts
Default

Please restart postfix. then look at the end of the file /var/log/mail.log and see if there are any errors.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 7th April 2008, 23:58
newz2000 newz2000 is offline
Junior Member
 
Join Date: Jul 2006
Location: Iowa USA
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No errors unfortunately. :-(

When I restart these show up in the logs:

Code:
Apr  7 21:51:15 hosting postfix/master[30554]: terminating on signal 15
Apr  7 21:51:16 hosting postfix/master[30857]: daemon started -- version 2.2.10, configuration /etc/postfix
Immediately afterwards I simply see normal log messages. When I try to login I get a message like this in the log:

Code:
Apr  7 21:55:00 hosting postfix/smtpd[31067]: warning: hostname[75.170.xxx.xxx]: SASL LOGIN authentication failed
Reply With Quote
  #4  
Old 8th April 2008, 10:27
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,736 Times in 2,571 Posts
Default

What's in /etc/init.d/saslauthd and /etc/postfix/sasl/smtpd.conf?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 8th April 2008, 16:34
newz2000 newz2000 is offline
Junior Member
 
Join Date: Jul 2006
Location: Iowa USA
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for helping, here are the two files:

Code:
cat /etc/postfix/sasl/smtpd.conf 
pwcheck_method: saslauthd
mech_list: plain login

Code:
cat /etc/init.d/saslauthd 
#!/bin/sh -e

NAME=saslauthd
DAEMON="/usr/sbin/${NAME}"
DESC="SASL Authentication Daemon"
DEFAULTS=/etc/default/saslauthd
PWDIR=/var/run/saslauthd
PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"

createdir() {
# $1 = user
# $2 = group
# $3 = permissions (octal)
# $4 = path to directory
        [ -d "$4" ] || mkdir -p "$4"
        chown -c -h "$1:$2" "$4"
        chmod -c "$3" "$4"
}

test -f "${DAEMON}" || exit 0

# Source defaults file; edit that file to configure this script.
if [ -e "${DEFAULTS}" ]; then
    . "${DEFAULTS}"
fi

# If we're not to start the daemon, simply exit
if [ "${START}" != "yes" ]; then
    exit 0
fi

# If we have no mechanisms defined
if [ "x${MECHANISMS}" = "x" ]; then
    echo "You need to configure ${DEFAULTS} with mechanisms to be used"
    exit 0
fi

# Add our mechanimsms with the necessary flag
PARAMS="${PARAMS} -a ${MECHANISMS}"

START="--start --quiet --pidfile ${PIDFILE} --startas ${DAEMON} --name ${NAME} -- ${PARAMS}"

# Consider our options
case "${1}" in
  start)
        echo -n "Starting ${DESC}: "
	dir=`dpkg-statoverride --list $PWDIR`
	test -z "$dir" || createdir $dir
	if start-stop-daemon ${START} >/dev/null 2>&1 ; then
		echo "${NAME}."
	else
		if start-stop-daemon --test ${START} >/dev/null 2>&1; then
			echo "(failed)."
			exit 1
		else
			echo "${DAEMON} already running."
			exit 0
		fi
	fi
        ;;
  stop)
        echo -n "Stopping ${DESC}: "
        if start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" \
		--startas ${DAEMON} --retry 10 --name ${NAME} \
		>/dev/null 2>&1 ; then
			echo "${NAME}."
	else
		if start-stop-daemon --test ${START} >/dev/null 2>&1; then
			echo "(not running)."
			exit 0
		else
			echo "(failed)."
			exit 1
		fi
	fi
        ;;
  restart|force-reload)
  	$0 stop
	exec $0 start
        ;;
  *)
        echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0
Reply With Quote
  #6  
Old 9th April 2008, 21:51
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,736 Times in 2,571 Posts
Default

Please run
Code:
postconf -e 'smtpd_sasl_local_domain ='
postconf -e 'smtpd_sasl_auth_enable = yes'
postconf -e 'smtpd_sasl_security_options = noanonymous'
postconf -e 'broken_sasl_auth_clients = yes'
/etc/init.d/postfix restart
and try again.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 9th April 2008, 22:55
newz2000 newz2000 is offline
Junior Member
 
Join Date: Jul 2006
Location: Iowa USA
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it works! thanks.

Can you explain to me what we did here?
Reply With Quote
  #8  
Old 10th April 2008, 18:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,736 Times in 2,571 Posts
Default

I guess you're using Outlook or Outlook Express. There's a bug in these programs, therefore we need
Code:
broken_sasl_auth_clients = yes
in the main.cf.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 10th April 2008, 19:03
newz2000 newz2000 is offline
Junior Member
 
Join Date: Jul 2006
Location: Iowa USA
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Actually I was testing with Evolution 2.22.1 (From Ubuntu Hardy). Maybe the list of broken imap clients is a bit bigger than expected. But either way, it makes sense to do anything necessary to allow Outlook and OE to work since so many people use them. Thanks again.
Reply With Quote
  #10  
Old 24th April 2008, 14:09
wuptydu wuptydu is offline
Junior Member
 
Join Date: Feb 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

I tried the same changes as above and no help.

No errors when restarting postfix.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 12:20
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
deb 3.1 smtp auth with vhcs2 adam HOWTO-Related Questions 9 31st August 2006 23:52
postfix smtp sasl auth problem hammer Installation/Configuration 1 13th July 2006 18:19
Can't seem to get SMTP AUTH working.. ralexpdx HOWTO-Related Questions 3 3rd June 2006 14:20


All times are GMT +2. The time now is 11:03.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.