<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.10">
</HEAD>
<BODY>
Hello,<BR>
<BR>
I am fairly new to Dovecot, so please forgive me if I am missing something obvious here.  I have checked the archived dovecot mailing list messages and have Googled for everything I can think of, and I still have not found anything to help me solve this problem.  I am running Postfix+Postgresql+Dovecot on my Fedora FC2 box.  I have compiled both Postfix and Dovecot from source.  I believe I have postfix running properly.  No error messages show up in my logs when starting Postfix or Dovecot.  Messages are being delivered by Postfix just fine:<BR>
<BR>
<BLOCKQUOTE>
    <FONT COLOR="#319a63"><I>Dec 12 11:45:42 co-nundrum postfix/virtual[15759]: 15E82F8EF0: to=<jaeson@domain.name>, relay=virtual, delay=1, status=sent (delivered to maildir)</I></FONT>
</BLOCKQUOTE>
<BR>
However, when I try to login to Dovecot over IMAP I get an "Internal login failure" error:<BR>
<BR>
<BLOCKQUOTE>
    <FONT COLOR="#319a63"><I>[jaeson@localhost jaeson]$ telnet co-nundrum imap<BR>
    Trying 207.7.137.6...<BR>
    Connected to co-nundrum.<BR>
    Escape character is '^]'.<BR>
    * OK dovecot ready.<BR>
    1 LOGIN jaeson secret<BR>
    1 OK Logged in.<BR>
    * BYE Internal login failure. Error report written to server log.<BR>
    Connection closed by foreign host.</I></FONT>
</BLOCKQUOTE>
<BR>
When I check the dovecot log file I see the following entries:<BR>
<BR>
<BLOCKQUOTE>
    <FONT COLOR="#319a63"><I>dovecot-auth: Dec 12 01:15:59 Info: PGSQL: Performing query: SELECT password FROM user_accounts WHERE username='jaeson'<BR>
    imap-login: Dec 12 01:15:59 Info: Internal login failure: jaeson [66.159.231.21]<BR>
    dovecot: Dec 12 01:15:59 Error: child 9845 (auth) killed with signal 11</I></FONT>
</BLOCKQUOTE>
<BR>
Here are the entries from my dovecot.conf file.  As you can see, I have set both auth_verbose and auth_debug = yes, but I don't seem to be getting any log messages with enough verbosity to indicate just what the problem is.<BR>
<BR>
<BLOCKQUOTE>
    <FONT COLOR="#319a63"><I>base_dir = /var/run/dovecot/<BR>
    protocols = imap imaps pop3 pop3s<BR>
    imap_listen = *<BR>
    pop3_listen = *<BR>
    ssl_parameters_regenerate = 24<BR>
    disable_plaintext_auth = no<BR>
    log_path = /var/log/dovecot.log<BR>
    info_log_path = /var/log/dovecot.log<BR>
    login_dir = /var/run/dovecot-login<BR>
    login = imap<BR>
    login_executable = /usr/libexec/dovecot/imap-login<BR>
    login_user = dovecot<BR>
    login_process_size = 16<BR>
    login_process_per_connection = yes<BR>
    login_processes_count = 3<BR>
    login_max_processes_count = 128<BR>
    login_max_logging_users = 256<BR>
    max_mail_processes = 1024<BR>
    verbose_proctitle = yes<BR>
    verbose_ssl = yes<BR>
    first_valid_uid = 5000<BR>
    last_valid_uid = 65535<BR>
    first_valid_gid = 5000<BR>
    last_valid_gid = 65535<BR>
    default_mail_env = maildir:/mail/%d/%u<BR>
    mail_save_crlf = yes<BR>
    maildir_copy_with_hardlinks = no<BR>
    maildir_check_content_changes = no<BR>
    mbox_locks = fcntl<BR>
    umask = 0077<BR>
    imap_executable = /usr/libexec/dovecot/imap<BR>
    imap_process_size = 256<BR>
    auth = default<BR>
    auth_mechanisms = plain<BR>
    auth_userdb = pgsql /etc/dovecot-pgsql.conf<BR>
    auth_passdb = pgsql /etc/dovecot-pgsql.conf<BR>
    auth_executable = /usr/libexec/dovecot/dovecot-auth<BR>
    auth_user = root<BR>
    auth_count = 1<BR>
    auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@<BR>
    auth_verbose = yes<BR>
    auth_debug = yes</I></FONT>
</BLOCKQUOTE>
<BR>
Additionally, here are the entries in my dovecot-pgsql.conf file:
<BLOCKQUOTE>
    <FONT COLOR="#319a63"><I><BR>
    connect = host=localhost dbname=mail_DB user=mailreader password=secret<BR>
    default_pass_scheme = PLAIN<BR>
    password_query = SELECT password FROM user_accounts WHERE username='%u'<BR>
    user_query = SELECT '/mail/'||mailbox AS home, uid, gid FROM user_accounts WHERE username='%u'</I></FONT>
</BLOCKQUOTE>
<BR>
Finally, here is the configure command I used when building Dovecot from source:<BR>
<BR>
<BLOCKQUOTE>
    <FONT COLOR="#319a63"><I>./configure --prefix=/usr --enable-debug --with-pgsql --with-cyrus-sasl2 --with-ssl=openssl --sysconfdir=/etc</I></FONT>
</BLOCKQUOTE>
<BR>
At this point, I think that the connections to my postgresql tables are all working properly, and the initial authentication with Dovecot appears to be working.  Dovecot *does* accept my password and gives me the "OK Logged in." response message, but somewhere before it kicks off the IMAP process it dies with a SIGSEGV.  Perhaps I have some file permissions out of whack?  Has anyone else encountered this problem, or perhaps has any insight into what might be going wrong or how to find out more information?<BR>
<BR>
Thanks,<BR>
Jaeson Schultz<BR>
jaeson at jaeson dot net
</BODY>
</HTML>