Author Topic: Ubuntu Mail Server Configuration Nightmare  (Read 6409 times)

Offline jpgrace

  • Jr. Member
  • **
  • Posts: 10
Ubuntu Mail Server Configuration Nightmare
« on: April 17, 2009, 05:38:27 PM »
Hello Everyone,

I'd like to join this community by contributing code/bug fixes.  However, I need help setting up RoundCube to work with my mail server.

I've used How to set up a mail server on a GNU / Linux system (postfix, courier-imap, tls, ssl, clamav, spamassassin, etc.) as a walk through to set up my mail server.  I configured all of the steps there.  I'm able to send mail via telnet localhost 25 and 143 without any problems.

Then when I tried to login to RoundCube I receive a simple AJAX "Login Failed" message.

When I try to use the RoundCube installer I immediately jump to step 3.  Upon testing SMTP settings and IMAP Configuration I get two error messages.  For SMTP I get:

Code: [Select]
SMTP send:  NOT OK(Authentication failure: Invalid response code received from server (Code: 535))

For the IMAP I get:

Code: [Select]
IMAP connect:  NOT OK(Authentication for user failed (LOGIN): "a001 NO STARTTLS required")

I've Googled all of the messages I've received and many combinations of keywords along the way.  However, I'm still lost.  I'm inclined to believe that the issue lies within the server configuration walk through (or my implementation of it) and not the code.

I'm going to keep pounding away at this, but any insight you could give me would be much appreciated.  If I figure this out, I'll be sure to post the solution here.

Thanks,

Offline jpgrace

  • Jr. Member
  • **
  • Posts: 10
Here's the obfuscated text from my mail.log
« Reply #1 on: April 17, 2009, 07:52:20 PM »
Code: [Select]
date time   username postfix/smtpd[14593]: connect from ....[....]
date time   username postfix/smtpd[14593]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
date time   username postfix/smtpd[14593]: warning: SASL authentication failure: no secret in database
date time   username postfix/smtpd[14593]: warning: ....[....]: SASL NTLM authentication failed: authentication failure
date time   username postfix/smtpd[14593]: disconnect from ....[....]

Offline jpgrace

  • Jr. Member
  • **
  • Posts: 10
No TLS or SASL support?
« Reply #2 on: April 17, 2009, 11:19:15 PM »
The problem was that I was trying to enable both SASL and TLS.  I removed SASL and didn't require TLS and now RoundCube works.  However, now I'm not encrypting anything. It appears RoundCube doesn't support TLS or SASL.  Can anyone here confirm this?

Thanks,

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Ubuntu Mail Server Configuration Nightmare
« Reply #3 on: April 18, 2009, 04:49:34 AM »
I think support for TLS has been added to trunk, see Changeset 2388 ? RoundCube Webmail. I am not sure about SASL but the entry from your mail log looks like a configureation problem with your server, it cant find the db.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline jpgrace

  • Jr. Member
  • **
  • Posts: 10
Ubuntu Mail Server Configuration Nightmare
« Reply #4 on: April 18, 2009, 10:29:36 AM »
Thanks for your response.  

It was a configuration problem with the server, but I'm pretty sure that db was not needed.  Regardless I can login now.

I've downloaded the trunk from svn, but I'd like to get everything working first before I worry about TLS.  I'm having a new problem with setup.  See: http://www.roundcubeforum.net/general-discussion/4630-messages-initial-load-fails.html for details relating to my new issue.

Offline holzratte

  • Newbie
  • *
  • Posts: 1
Ubuntu Mail Server Configuration Nightmare
« Reply #5 on: September 17, 2009, 02:06:01 AM »
Hi,

also had this problem, googled my ass off, didn't find anything, then started playing around and bang - it works :cool:

so for the records and the next googlers: i have postfix and courier-imap(-ssl) and i had sth in mind that the way courier authenticates when used with mysql (eg. for syscp) only works with plain (not with cram-md5 etc.)
that should not be to bad because we use tls anyway?
so i have these settings now:

main.inc.php
Code: [Select]
// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
$rcmail_config['default_host'] = 'tls://localhost';

// TCP port used for IMAP connections
$rcmail_config['default_port'] = 143;

// IMAP auth type. Can be "auth" (CRAM-MD5), "plain" (PLAIN) or "check" to auto detect.
// Optional, defaults to "check"
[B]$rcmail_config['imap_auth_type'] = '[I]plain[/I]';
//Default setting on my fresh install was [I]null[/I] !!![/B]

hope i helped somebody, these boards helped me a lot too!
regards
« Last Edit: September 17, 2009, 02:13:05 AM by holzratte »