# Qmail/Vpopmail + SMTP AUTH failures...

## Utoxin

A little background. I maintain servers for a former workmate, and had a Gentoo system set up for his main web and mail server. It was running Qmail/Vpopmail with SMTP AUTH successfully for at least 6 months.

Last week, he got a Dual Opteron system, and wanted to switch to that for his main server. So I diligently installed Gentoo on it (My /god/ what a fast system...), and configured everything. We took it in and swapped out the IPs on the two systems, so that the new box was now in place. Everything seemed fine.

But it turns out, SMTP AUTH is /not/ working, and nothing I've tried has fixed it. To begin with, it wasn't even an option, so I added the 'notlsbeforeauth' useflag, and got it to accept the AUTH command. But now, I get one of two errors. If I leave vchkpw as it was installed by vpopmail, I get this:

```
220 ************* ESMTP

EHLO ********

250-*************

250-AUTH LOGIN CRAM-MD5 PLAIN

250-AUTH=LOGIN CRAM-MD5 PLAIN

250-SIZE 0

250-PIPELINING

250 8BITMIME

AUTH LOGIN

334 VXNlcm5hbWU6

************************

334 UGFzc3dvcmQ6

************

535 authorization failed (#5.7.0)

```

And if I set vchkpw suid, (as reccomended by many threads on these forums), I get this:

```
220 *************** ESMTP

EHLO ********

250-**************

250-AUTH LOGIN CRAM-MD5 PLAIN

250-AUTH=LOGIN CRAM-MD5 PLAIN

250-SIZE 0

250-PIPELINING

250 8BITMIME

AUTH LOGIN

334 VXNlcm5hbWU6

*******************

334 UGFzc3dvcmQ6

*************

454 oops, problem with child and I can't auth (#4.3.0)

```

I've tried reverting to the old version of qmail that was still installed on the old box (-r13), but it didn't help. I've googled for a couple hours now without finding anything that has solved my problem. Help?

----------

## Paulten

And nothing in the logs?

----------

## Utoxin

Just the normal status 256 messages that it always gets on an authentication failure.

----------

## Utoxin

Just did some digging in the system logs, and found this:

```
current:Aug 17 12:43:17 [vpopmail] vchkpw-smtp: vpopmail user not found user@domain.com:0.0.0.0

current:Aug 17 12:43:48 [vpopmail] vchkpw-pop3: (PLAIN) login success user@domain.com:0.0.0.0

```

So pop3 auth is working perfectly (Which I knew...) but smtp is failing, claiming the user doesn't exist. (The /same/ user it pop3 authed not even 1 minute later...)

----------

## Paulten

Hi again

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

Google showed alot of hits on "vchkpw-smtp: vpopmail user not found" 

Among them this one : 

http://www.mail-archive.com/vchkpw%40inter7.com/msg09604.html

sorry i could not help anymore, but I switched to postfix along time ago and stayed there  :Smile: 

----------

## Utoxin

That's just the suid trick that all the other sites also mention. It just makes it give the second error I mentioned in the first post, with no system log entry.

----------

## Utoxin

After much digging, it appears there's a bug with 64bit processors involved in this. Moving further discussion to the AMD64 forum.

----------

