Dovecot mail authorization failed

Discussion in 'Installation/Configuration' started by gscaglia, Jul 2, 2008.

  1. gscaglia

    gscaglia Member HowtoForge Supporter

    following Till instructions I've removed Courier and installed Dovecot.

    I had need to download messagges with the e-mail address as username instead "web01_user".

    Unfortunately I don't know Dovecot configuration and now the access authorization fails in both modes: with e-mail address and with "web01_user".

    I can not longer get mail and I can not find the solution.

    I attach the file dovecot.conf and I hope that someone can help me.

    The server has ISPConfig version 2.2.23; Postfix with directives smtpd_sasl_type = dovecot and smtpd_sasl_path = private/auth in the; the Maildir option is selected.

    Thanks a lot

    Attached Files:

  2. falko

    falko Super Moderator ISPConfig Developer

    Did you modify dovecot.conf? If so, what exactly did you change?
  3. gscaglia

    gscaglia Member HowtoForge Supporter

    Hi Falko, thanks for interesting.

    I've followed (I hope so) the thread and I've changed this rows in dovecot.conf:

    Today I've changed the log_path too (log_path = /var/log/dovecot) and this is the results of tail -f /var/log/dovecot:
    Note that the access authentication fail with webmail too.

    Thanks a lot
  4. gscaglia

    gscaglia Member HowtoForge Supporter

    no one answered me, may be the problem has not occurred to many people.

    Someone can confirm me that removing Courier (it worked well) and installing Dovecot, with apt-get (Debian 4), everything should work without any manual change in the file dovecot.conf?

    Thanks a lot
  5. bolero

    bolero New Member

    Does the user already have a Maildir? I noticed yesterday when testing ISPConfig and Dovecot that I couldn't login to new accounts. After reading dovecot.conf I set a mail_location path of "Maildir". It seems that if there is no mail yet there is no Maildir and Dovecot doesn't know where to look/what to create unless you tell it. After doing that the logins started to work except for one. I had to reset that single passwd on the command line and then I could login. I haven't yet figured out if the problem was with ISPConfig or somewhere else.
  6. gscaglia

    gscaglia Member HowtoForge Supporter

    Thanks Bolero.

    Yes, the users already have a Maildir but with the new users is the same. Now I've setted the mail_location in dovecont.conf as
    mail_location = maildir:~/Maildir
    but after restart all logins fails again.

    How may I tell to Dovecot where is the Maildir of a user?

    I've opened a new user to try it (web99_prova) and I write a mail on the server (with Mutt, an internal mail) and I've looked to the command line that the message is in /home/www/web99/user/web99_prova/Maildir/new ad it's ok but the login fail.

    I've reset the user password with
    passwd web99_prova
    but nothing to do.

    How can I try to fix it?

    Thanks a lot
  7. bolero

    bolero New Member

    Yes, this is what I set it to. I don't remember I edited anything else in the file. If your problem also occurs with already existing users that have a maildir then it must be something else. Probably really an authentication issue.

    Looking at auth_username_format ="%Ld_%Ln" I would suggest removing that again for testing purposes. This is not necessary if you use the correct usernames, anyway. But it may hamper the testing somehow. At least I don't have it here.

    Sorry, I can't be of more help.

    (Just a reminder: don't forget that ISPConfig may overwrite the password set with passwd, so if you test a bit later it may not work just because of that. You can only rely on changes done with passwd for a short testing period.)
  8. gscaglia

    gscaglia Member HowtoForge Supporter

    I've removed auth_username_format ="%Ld_%Ln" and the login with username like "webXX_user" now works! Thanks! :)

    The variables %d is empty if the username called is "webXX_user": the user result for Dovecot was "_webXX_user" and the login failed.

    If use the e-mail address (eg [email protected]) as username called the user result for Dovecot is "mydomain.it_mailbox" and login failed too.

    I don't know any variables in dovecot.conf (eg %u etc.) that return "webXX_" or similar, if the username called is an e-mail address.

    I don't understand how I can use the e-mail address as username for login.
  9. till

    till Super Moderator Staff Member ISPConfig Developer

  10. gscaglia

    gscaglia Member HowtoForge Supporter

    Great, thanks! :)

    And then the last question.

    There's a way (very easy), when the customer creates a new account (with "ISP user" panel), to force use the value putted into Email Address field also for the Username field?

    Because if the customer puts into Email Address field (ever in "ISP user" panel) the name of mailbox (eg info -> [email protected]) and it puts into Username field something else (eg infoxx -> mydomain.it_infoxx), the mail login will be [email protected] and not [email protected]

    Thanks a lot

Share This Page