Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Witam, ostatnio chciałem postawić serwer poczty na swoim VPS. W tym celu zainstalowałem Posfixa, Posfix Admina, Dovecota oraz Roundcube. Problem pojawił się na końcu całej roboty a mianowicie przy instalacji Roundcuba. W momencie testowania połączenia IMAP w instalatorze wyskoczył mi takowy błąd:
Connecting to poczta.serwer.pl...
IMAP connect: NOT OK(Login failed for klient@serwer.pl from 78.*.*.107. AUTHENTICATE PLAIN: Authentication failed.)
Błąd nie leży w Roundcube, ponieważ przy próbie połączenia przez Thunderbirda również wyświetlił się błąd. Proszę o pomoc i z góry dziękuje.
Offline
No to pokaż configi
Offline
Które configi Cię interesują?
Offline
dovecot
Offline
Wyrażnie pisze, ze Dovecot nie akceptuje hasła w PLAINTEXT.
Poza tym:
Imap nie działa?
A POP3 działa?
Ostatnio edytowany przez Jacekalex (2013-08-19 22:01:34)
Offline
dovecot.conf
# This file is opened as root, so it should be owned by root and mode 0600.
#
# http://wiki.dovecot.org/AuthDatabase/SQL
#
# For the sql passdb module, you'll need a database with a table that
# contains fields for at least the username and password. If you want to
# use the user@domain syntax, you might want to have a separate domain
# field as well.
#
# If your users all have the same uig/gid, and have predictable home
# directories, you can use the static userdb module to generate the home
# dir based on the username and domain. In this case, you won't need fields
# for home, uid, or gid in the database.
#
# If you prefer to use the sql userdb module, you'll want to add fields
# for home, uid, and gid. Here is an example table:
#
# CREATE TABLE users (
# username VARCHAR(128) NOT NULL,
# domain VARCHAR(128) NOT NULL,
# password VARCHAR(64) NOT NULL,
# home VARCHAR(255) NOT NULL,
# uid INTEGER NOT NULL,
# gid INTEGER NOT NULL,
# active CHAR(1) DEFAULT 'Y' NOT NULL
# );
# Database driver: mysql, pgsql, sqlite
#driver = mysql
# Database connection string. This is driver-specific setting.
#
# pgsql:
# For available options, see the PostgreSQL documention for the
# PQconnectdb function of libpq.
#
# mysql:
# Basic options emulate PostgreSQL option names:
# host, port, user, password, dbname
#
# But also adds some new settings:
# client_flags - See MySQL manual
# ssl_ca, ssl_ca_path - Set either one or both to enable SSL
# ssl_cert, ssl_key - For sending client-side certificates to server
# ssl_cipher - Set minimum allowed cipher security (default: HIGH)
# option_file - Read options from the given file instead of
# the default my.cnf location
# option_group - Read options from the given group (default: client)
#
# You can connect to UNIX sockets by using host: host=/var/run/mysqld/mysqld.sock
# Note that currently you can't use spaces in parameters.
#
# MySQL supports multiple host parameters for load balancing / HA.
#
# sqlite:
# The path to the database file.
#
# Examples:
# connect = host=192.168.1.1 dbname=users
# connect = host=sql.example.com dbname=virtual user=virtual password=blarg
# connect = /etc/dovecot/authdb.sqlite
#
#connect = host=127.0.0.1 dbname=postfix user=postfix password=password
# Default password scheme.
#
# List of supported schemes is in
# http://wiki.dovecot.org/Authentication/PasswordSchemes
#
#default_pass_scheme = MD5-CRYPT
# passdb query to retrieve the password. It can return fields:
# password - The user's password. This field must be returned.
# user - user@domain from the database. Needed with case-insensitive lookups.
# username and domain - An alternative way to represent the "user" field.
#
# The "user" field is often necessary with case-insensitive lookups to avoid
# e.g. "name" and "nAme" logins creating two different mail directories. If
# your user and domain names are in separate fields, you can return "username"
# and "domain" fields instead of "user".
#
# The query can also return other fields which have a special meaning, see
# http://wiki.dovecot.org/PasswordDatabase/ExtraFields
#
# Commonly used available substitutions (see http://wiki.dovecot.org/Variables
# for full list):
# %u = entire user@domain
# %n = user part of user@domain
# %d = domain part of user@domain
#
# Note that these can be used only as input to SQL query. If the query outputs
# any of these substitutions, they're not touched. Otherwise it would be
# difficult to have eg. usernames containing '%' characters.
#
# Example:
# password_query = SELECT userid AS user, pw AS password \
# FROM users WHERE userid = '%u' AND active = 'Y'
#
#password_query = SELECT username AS user,password FROM mailbox WHERE username = '%u' AND active='1'
# userdb query to retrieve the user information. It can return fields:
# uid - System UID (overrides mail_uid setting)
# gid - System GID (overrides mail_gid setting)
# home - Home directory
# mail - Mail location (overrides mail_location setting)
#
# None of these are strictly required. If you use a single UID and GID, and
# home or mail directory fits to a template string, you could use userdb static
# instead. For a list of all fields that can be returned, see
# http://wiki.dovecot.org/UserDatabase/ExtraFields
#
# Examples:
# user_query = SELECT home, uid, gid FROM users WHERE userid = '%u'
# user_query = SELECT dir AS home, user AS uid, group AS gid FROM users where userid = '%u'
# user_query = SELECT home, 501 AS uid, 501 AS gid FROM users WHERE userid = '%u'
#
#user_query = SELECT maildir, 113 AS uid, 120 AS gid FROM mailbox WHERE username = '%u' AND active='1'
# If you wish to avoid two SQL lookups (passdb + userdb), you can use
# userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll
# also have to return userdb fields in password_query prefixed with "userdb_"
# string. For example:
#password_query = \
# SELECT userid AS user, password, \
# home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \
# FROM users WHERE userid = '%u'
dovecot-sql.conf
# This file is opened as root, so it should be owned by root and mode 0600.
#
# http://wiki.dovecot.org/AuthDatabase/SQL
#
# For the sql passdb module, you'll need a database with a table that
# contains fields for at least the username and password. If you want to
# use the user@domain syntax, you might want to have a separate domain
# field as well.
#
# If your users all have the same uig/gid, and have predictable home
# directories, you can use the static userdb module to generate the home
# dir based on the username and domain. In this case, you won't need fields
# for home, uid, or gid in the database.
#
# If you prefer to use the sql userdb module, you'll want to add fields
# for home, uid, and gid. Here is an example table:
#
# CREATE TABLE users (
# username VARCHAR(128) NOT NULL,
# domain VARCHAR(128) NOT NULL,
# password VARCHAR(64) NOT NULL,
# home VARCHAR(255) NOT NULL,
# uid INTEGER NOT NULL,
# gid INTEGER NOT NULL,
# active CHAR(1) DEFAULT 'Y' NOT NULL
# );
# Database driver: mysql, pgsql, sqlite
#driver = mysql
# Database connection string. This is driver-specific setting.
#
# pgsql:
# For available options, see the PostgreSQL documention for the
# PQconnectdb function of libpq.
#
# mysql:
# Basic options emulate PostgreSQL option names:
# host, port, user, password, dbname
#
# But also adds some new settings:
# client_flags - See MySQL manual
# ssl_ca, ssl_ca_path - Set either one or both to enable SSL
# ssl_cert, ssl_key - For sending client-side certificates to server
# ssl_cipher - Set minimum allowed cipher security (default: HIGH)
# option_file - Read options from the given file instead of
# the default my.cnf location
# option_group - Read options from the given group (default: client)
#
# You can connect to UNIX sockets by using host: host=/var/run/mysqld/mysqld.sock
# Note that currently you can't use spaces in parameters.
#
# MySQL supports multiple host parameters for load balancing / HA.
#
# sqlite:
# The path to the database file.
#
# Examples:
# connect = host=192.168.1.1 dbname=users
# connect = host=sql.example.com dbname=virtual user=virtual password=blarg
# connect = /etc/dovecot/authdb.sqlite
#
#connect = host=127.0.0.1 dbname=postfix user=postfix password=password
# Default password scheme.
#
# List of supported schemes is in
# http://wiki.dovecot.org/Authentication/PasswordSchemes
#
#default_pass_scheme = MD5-CRYPT
# passdb query to retrieve the password. It can return fields:
# password - The user's password. This field must be returned.
# user - user@domain from the database. Needed with case-insensitive lookups.
# username and domain - An alternative way to represent the "user" field.
#
# The "user" field is often necessary with case-insensitive lookups to avoid
# e.g. "name" and "nAme" logins creating two different mail directories. If
# your user and domain names are in separate fields, you can return "username"
# and "domain" fields instead of "user".
#
# The query can also return other fields which have a special meaning, see
# http://wiki.dovecot.org/PasswordDatabase/ExtraFields
#
# Commonly used available substitutions (see http://wiki.dovecot.org/Variables
# for full list):
# %u = entire user@domain
# %n = user part of user@domain
# %d = domain part of user@domain
#
# Note that these can be used only as input to SQL query. If the query outputs
# any of these substitutions, they're not touched. Otherwise it would be
# difficult to have eg. usernames containing '%' characters.
#
# Example:
# password_query = SELECT userid AS user, pw AS password \
# FROM users WHERE userid = '%u' AND active = 'Y'
#
#password_query = SELECT username AS user,password FROM mailbox WHERE username = '%u' AND active='1'
# userdb query to retrieve the user information. It can return fields:
# uid - System UID (overrides mail_uid setting)
# gid - System GID (overrides mail_gid setting)
# home - Home directory
# mail - Mail location (overrides mail_location setting)
#
# None of these are strictly required. If you use a single UID and GID, and
# home or mail directory fits to a template string, you could use userdb static
# instead. For a list of all fields that can be returned, see
# http://wiki.dovecot.org/UserDatabase/ExtraFields
#
# Examples:
# user_query = SELECT home, uid, gid FROM users WHERE userid = '%u'
# user_query = SELECT dir AS home, user AS uid, group AS gid FROM users where userid = '%u'
# user_query = SELECT home, 501 AS uid, 501 AS gid FROM users WHERE userid = '%u'
#
#user_query = SELECT maildir, 113 AS uid, 120 AS gid FROM mailbox WHERE username = '%u' AND active='1'
# If you wish to avoid two SQL lookups (passdb + userdb), you can use
# userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll
# also have to return userdb fields in password_query prefixed with "userdb_"
# string. For example:
#password_query = \
# SELECT userid AS user, password, \
# home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \
# FROM users WHERE userid = '%u'
Offline
Czy byłbyś taki uprzejmy wywalić, a potem zamieścić te konfigi ponownie bez tysięcy linii z komentarzami i pustymi wierszami?
Służy do tego magiczna komenda, np:
egrep -v '#|^$' /etc/dovecot/dovecot.conf
U mnie wynik wygląda tak, a Dovecot chodzi jak burza (autoryzacja w Mysql):
auth_default_realm = domena.tld auth_mechanisms = plain login cram-md5 digest-md5 base_dir = /var/run/dovecot/ default_internal_user = vpopmail default_login_user = vpopmail first_valid_gid = 89 first_valid_uid = 89 info_log_path = /var/log/dovecot/dovecot.log last_valid_gid = 89 last_valid_uid = 89 listen = * log_path = /var/log/dovecot/dovecot-mail.log login_log_format_elements = pl mail_gid = 89 mail_location = maildir:/home/domains/%d/%n/.maildir mail_privileged_group = vpopmail mail_uid = 89 managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave spamtest spamtestplus passdb { args = /etc/dovecot/dovecot-sqlx.conf driver = sql } plugin { autocreate = Sent autocreate2 = Drafts autocreate3 = Archive autocreate4 = Junk autocreate5 = Trash autocreate6 = Spam autosubscribe = Sent autosubscribe2 = Drafts autosubscribe3 = Archive autosubscribe4 = Junk autosubscribe5 = Trash autosubscribe6 = Spam quota = maildir:User quota quota_rule2 = Trash:storage=+10%% quota_rule3 = Spam:storage=+20%% quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95 quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80 sieve = ~/sieve/filtry.sieve sieve_after = /etc/dovecot/aftersieve sieve_before = /etc/dovecot/sieve sieve_dir = ~/sieve sieve_extensions = +spamtest +spamtestplus +relational +comparator-i;ascii-numeric sieve_global_dir = /etc/dovecot/sieve } postmaster_address = postmaster@domena.tld protocols = imap lmtp sieve pop3 service aggregator { fifo_listener replication-notify-fifo { user = dovecot } unix_listener replication-notify { user = dovecot } } service auth-worker { user = vpopmail } service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } unix_listener auth-master { group = vpopmail mode = 0666 user = vpopmail } unix_listener auth-userdb { group = vpopmail mode = 0666 user = vpopmail } } service doveadm { inet_listener { port = 9346 ssl = yes } } service imap-login { chroot = login client_limit = 32 process_limit = 32 process_min_avail = 2 service_count = 1 } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } } service managesieve-login { chroot = login client_limit = 64 process_limit = 64 process_min_avail = 2 service_count = 1 } service pop3-login { chroot = login client_limit = 32 inet_listener pop3 { port = 0 } process_limit = 32 process_min_avail = 2 service_count = 1 } service replicator { process_min_avail = 1 unix_listener replicator-doveadm { mode = 0600 } } ssl_cert = </etc/ssl/dovecot/dovecot.pem ssl_key = </etc/ssl/dovecot/dovecot.key userdb { args = /etc/dovecot/dovecot-sqlx.conf driver = sql } protocol imap { imap_id_log = imapd imap_idle_notify_interval = 10 mins imap_logout_format = bytes=%i/%o imap_max_line_length = 16 k mail_plugins = quota autocreate imap_quota } protocol pop3 { mail_plugins = quota pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s pop3_uidl_format = %08Xu%08Xv } protocol lda { auth_socket_path = /var/run/dovecot/auth-userdb hostname = domena.tld info_log_path = /var/log/dovecot/lda-dovecot.log lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes lda_original_recipient_header = log_path = /var/log/dovecot/lda-dovecot.log mail_plugins = sieve quota autocreate acl postmaster_address = postmaster@domena.tld quota_full_tempfail = yes rejection_reason = Your message to <%t> was automatically rejected:%n%r rejection_subject = Rejected: %s sendmail_path = /usr/sbin/sendmail } protocol lmtp { auth_socket_path = /var/run/dovecot/auth-userdb hostname = domena.tld info_log_path = /var/log/dovecot/lmtp-dovecot.log lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes log_path = /var/log/dovecot/lmtp-dovecot.log mail_plugins = sieve quota autocreate acl postmaster_address = postmaster@domena.tld quota_full_tempfail = yes rejection_reason = Your message to <%t> was automatically rejected:%n%r rejection_subject = Rejected: %s sendmail_path = /usr/sbin/sendmail }
ta wersja chodzi zarówno z Qmail/Vpopmail - do którego został stworzony, jak i z Postfixem, do którego został podpięty później (skrzynki pocztowe wspólne dla obu serwerów SMTP).
Wersja Dovecota:
net-mail/dovecot-2.2.4-r2
Pozdro
;-)
Ostatnio edytowany przez Jacekalex (2013-08-19 22:51:21)
Offline
Problem rozwiązany, ale pojawił się następny. Mianowicie test SMTP i IMAP przebiegł prawidłowo, ale po zalogowaniu się do Roundcube pojawia się taki błąd
Błąd serwera: STATUS: Internal error occurred. Refer to server log for more information.
Wie ktoś o co w tym chodzi?
Ostatnio edytowany przez kacperro (2013-08-20 17:30:41)
Offline
Błąd serwera: STATUS: Internal error occurred. Refer to server log for more information.
Czytać waćpań potrafisz?
Pytam, bo system zazwyczaj ma conieco do przekazania, kiedy jest jakiś problem.
Offline
Logi też mi nic nie mówią:
[19-Aug-2013 19:41:53 +0200]: DB Error: Configuration error. Unsupported database driver: in /home/tspoland/webmail/program/lib/Roundcube/rcube_db.php on line 75 (GET /webmail/)
Offline
[19-Aug-2013 19:41:53 +0200]: DB Error: Configuration error. Unsupported database driver: in /home/tspoland/webmail/program/lib/Roundcube/rcube_db.php on line 75 (GET /webmail/)
Faktycznie "nic nie mówią". :D
Ciekawe, co to może znaczyć "Unsuported database driver"?
Jaki driver do bazy masz ustawiony w konfigu Roudncube?
Offline
Kto i jak tego Roudncube instalował?
O ile pamiętam, on wymaga sterownika pdo-mysql do php.
A to inny sterownik, niż php5-mysql - z którego korzysta np Phpmyadmin.
Poza tym, jak się instaluje Roundcube, to w czasie instalacji są sprawdzane wszystkie moduły php.
Ostatnio edytowany przez Jacekalex (2013-08-20 18:58:06)
Offline
Ruondcube był instalowany ręcznie, po prostu pobrany na serwer ze strony producenta i zainstalowany przez instalator.
Offline
To przecież w tym instalatorze jest próba logowania przez imap.
Może nie zapisał konfiga z powodu uprawnień?
Spróbuj jakąś inna wersję Roudcube, i przede wszystkim wypróbuj wszystkie opcje dostępne w konfigu RoundCuba.
Jak rozumiem, z innych programów (Thunderbird, ClawsMnail, Kmail) łączy się normalnie?
Offline
Sprawdzałem tylko Thunderbird i nie udało mi się połączyć, ale przy instalacji Roundcube IMAP połączył się prawidłowo.
Offline
To przede wszystkim logi dovecota.
Jak Thunderbird się nie łączy, to kombinuj z Dovecotem tak długo, aż będzie chodził TB, i jakiś inny klient pocztowy, np Kmail, czy Clawsmail, a dopiero potem kombinuj z Roundcube.
Tylko nie próbuj Dovecota testować Outlookiem, bo ten w ogóle z IMAP'em sobie nie radzi zbyt dobrze.
Offline