Postfix Authentication Problem Username

Been trying all morning to get postfix to work. Keep getting this error the logs. Forums are no help. Seem to be a simple error but the solution is alluding me.

Thanks.

OS CentOS 5.2

From secure log:

Feb 14 14:38:08 ns1 dovecot-auth: pam_unix(dovecot:auth): check pass; user unknown
Feb 14 14:38:08 ns1 dovecot-auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser= rhost=::ffff:xx.xx.xx.138
Feb 14 14:38:08 ns1 dovecot-auth: pam_succeed_if(dovecot:auth): error retrieving information about user admin

From maillog:

dovecot: pop3-login: Disconnected: user=<admin>, method=PLAIN, rip=::ffff:xx.xx.138, lip=::ffff:xx.xx.xx.137, TLS

Post edited by: mdtiberi, at: 2009/02/14 12:41<br><br>Post edited by: mdtiberi, at: 2009/02/19 07:45

Well, the error message suggests that there is no user with the name "admin".

Are you sure that’s the correct name – that there isn’t perhaps a trailing domain name after that… maybe “admin@example.com” or “admin.example”?

It should show you the full username when you look in Edit Mail and FTP Users, under "IMAP/FTP login".
-Eric

It doesn’t seem to matter if the domain name is included or not, same error occurs.

"It should show you the full username when you look in Edit Mail and FTP Users, under "IMAP/FTP login"

Yes, I checked that its fine.

If you log in as root over SSH, and type:

id admin

What does it return?
-Eric

Are you using @ in the username? If so, have you read the FAQ about this particular username extension? (You have to configure saslauthd explicitly for this format.)

http://www.virtualmin.com/documentation/id,frequently_asked_questions/#what_s_the_deal_with_in_mailbox_usernames

It does show admin.domain.com

I tried both variation in Thunderbird, one with the domain and without with no luck

It does show admin.domain.com

I tried both variation in Thunderbird, one with the domain and without with no luck

There’s no point in trying both variants. The name that it shows is the username. Anything else is either non-existent, or a completely different user.

So, at least now you can test half as much. :wink:

So, what’s in the log when you use the right username. Because the one we’ve seen earlier is expected behavior–you entered a non-existent user (admin), and Dovecot replied correctly that that wasn’t a valid login.

I will also take a moment to mention that Dovecot and Postfix are talking two different protocols. Dovecot is for retrieving mail via POP or IMAP. Postfix is for sending mail via SMTP, submission, or SMTPS. Are you having trouble with both services, or just one?

When I login to root I am logging in to my server domain (ns1) which points to my virtuals. id admin is unknown then because I created this particular user in one of my virtuals not ns1.

I did read the FAQ on usernames.

added the -r flag

When I login to root I am logging in to my server domain (ns1) which points to my virtuals. id admin is unknown then because I created this particular user in one of my virtuals not ns1.

I have no idea what this means. :wink:

Logging in as root is always the same, no matter what domain you connected to.

When you look in Virtualmin on the page Eric mentioned (“Edit Mail and FTP Users” under “IMAP/FTP login”) that is the username. I’m not asking what it is, or what you think it ought to be–I want to see the log entries from when you tried to login using that username (the one Virtualmin tells you is the right one).

Let’s not debate what the username is…the username is whatever Virtualmin tells you it is (which is what you told Virtualmin to make it, based on its configuration). There is no debating the username, and no need to think hard about it–look at that page and it will tell you.

Once you know the username, try to log in with that username. Look at the maillog, and copy/paste the error here. We need to to see an error that indicates what the problem is, and so far, the only log we’ve seen is one for a non-existent username–and it was behaving exactly correct in that circumstance. There is no problem to fix in the log entry we’ve seen so far. So we need to see more.

I’d also like to know if we’re talking about a Postfix problem, a Dovecot problem, or both, so I know where to point you with regard to solving the problem (once we know what the problem is, based on the log entries).

added the -r flag

Why? Earlier, you indicated the username was admin.domain.com. That has no @ in it, anywhere. :wink:

Sorry Joe, my brain is a bit frazzled. I understand what you mean on user names, got it! It’s just a little different convention then what I am used to. That problem solved. Now a new one:

Feb 14 16:15:15 ns1 dovecot: POP3(admin.principia-optics): mkdir(/var/lib/dovecot/index/admin.principia-optics/.INBOX) failed: Permission denied
Feb 14 16:15:15 ns1 dovecot: POP3(admin.principia-optics): mkdir(/var/lib/dovecot/control/admin.principia-optics/.INBOX) failed: Permission denied
Feb 14 16:15:15 ns1 dovecot: POP3(admin.principia-optics): mkdir(/var/lib/dovecot/index/admin.principia-optics/.INBOX) failed: Permission denied
Feb 14 16:15:15 ns1 dovecot: POP3(admin.principia-optics): mkdir(/var/lib/dovecot/control/admin.principia-optics/.INBOX) failed: Permission denied
Feb 14 16:15:15 ns1 dovecot: POP3(admin.principia-optics): Couldn’t open INBOX: Internal error occurred. Refer to server log for more information. [2009-02-14 16:15:15]
Feb 14 16:15:15 ns1 dovecot: POP3(admin.principia-optics): Couldn’t open INBOX top=0/0, retr=0/0, del=0/0, size=0

Thanks Joe for helping out. I know you probaly have something better to do on Valentines day

Does /var/lib/dovecot/index and /var/lib/dovecot/control exist? And are those world writable (777) and the directories leading up to it world-readable and world-executable (755)?

What OS are you on, and did you install Virtualmin using install.sh? This shouldn’t be happening on a system installed using install.sh, so I’d like to dig in to make sure we haven’t broken something in our installer recently.

CentOS 5.2

I did use installer.sh. One thing that I did notice was that it could not update the clamav-db, couldn’t connect I think.

I’ll check permissions tomorrow or I could just start over since its just a test-bed server for now.

BTW, I am going to put together the things I have learned as a former Plesk user and what to expect using Vmin. The user name thing was definitely something to keep an eye out on.

Thanks again.

One thing that I did notice was that it could not update the clamav-db, couldn't connect I think.

Unrelated, and temporary. (And ClamAV is the most chattery beast on any server…complains all the time, even about little things.)

BTW, I am going to put together the things I have learned as a former Plesk user and what to expect using Vmin.

That’d be great. I made one for recovering cPanel users a couple of years ago, but I haven’t seen enough Plesk systems to know anything useful about guiding people on the differences. Feel free to start a wiki page, similar to the cPanel one.

Yes. I know about that. As I said, ClamAV is very chattery. Almost all of those are stupid and pointless warnings (the version warning does have some meaning, and I’m working on an update right now, but all of the cdiff stuff is temporary errors and really shouldn’t be shouting about it all the time).

andreychek wrote:

Well, the error message suggests that there is no user with the name "admin".

Are you sure that’s the correct name – that there isn’t perhaps a trailing domain name after that… maybe “admin@example.com” or “admin.example”?

It should show you the full username when you look in Edit Mail and FTP Users, under "IMAP/FTP login".
-Eric

Any update on this? I too tried to install on clean centos 5.2 today and got the same issue. Please let us know what the status is on this.

Thanks!
Ben

andreychek wrote:

Well, the error message suggests that there is no user with the name "admin".

Are you sure that’s the correct name – that there isn’t perhaps a trailing domain name after that… maybe “admin@example.com” or “admin.example”?

It should show you the full username when you look in Edit Mail and FTP Users, under "IMAP/FTP login".
-Eric

Sorry, that above quote was incorrect and there is a bug in the forum to edit posts. Anyway, let us know what the staus is on the install.sh script and clamav version error.

Thanks,
Ben

Any update on this? I too tried to install on clean centos 5.2 today and got the same issue. Please let us know what the status is on this.

What issue are you talking about?