Roundcube Community Forum

 

Unable to send messages with SMTP and RoundCube

Started by kuemerle5, September 25, 2009, 03:38:52 PM

Previous topic - Next topic

kuemerle5

I've mentioned this issue before, but I'm putting it out there with a little bit more detail and knowledge. I can send messages with Thunderbird with the following settings:
   
Server name: mail.smumn.edu
Port: 25
Use authentication: yes, but use only the part of the email address before the @ symbol. Normal password is required
Use secure authentication: true
Connection security: STARTTLS


*Also, I had to confirm exceptions for the invalid security certificates in Thunderbird. I was able to add "/novalidate-cert" on the IMAP connection, but not on the SMTP connection.

I have tried pretty much every option in the RoundCube SMTP config, but I cannot get it to work for the life of me. I tried prefixing the SMTP host name with: ssl://, tls://, and starttls://. None of these work. I tried using port 25 and port 465 for each of these prefixes, that doesn't work either. I know that the SMTP server is on port 25 becuase I can telnet to it. I tried using authentication and no authentication; no cigar.

If someone could come up with a solution that will work, I would ***greatly*** appreciate it. Thanks! (also, no PHP mail() function, I tried it and it doesn't work)

Here's my config and a sample log entry:

// Automatically add this domain to user names for login
// Only for IMAP servers that require full e-mail addresses for login
// Specify an array with 'host' => 'domain' values to support multiple hosts
$rcmail_config['username_domain'] = '';

// This domain will be used to form e-mail addresses of new users
// Specify an array with 'host' => 'domain' values to support multiple hosts
$rcmail_config['mail_domain'] = 'smumn.edu';

// use this host for sending mails.
// to use SSL connection, set ssl://smtp.host.com
// if left blank, the PHP mail() function is used
// Use %h variable as replacement for user's IMAP hostname
$rcmail_config['smtp_server'] = 'mail.smumn.edu';

// SMTP port (default is 25; 465 for SSL)
$rcmail_config['smtp_port'] = 25;

// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = '%u';

// SMTP password (if required) if you use %p as the password RoundCube
// will use the current user's password for login
$rcmail_config['smtp_pass'] = '%p';

// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$rcmail_config['smtp_auth_type'] = '';

// SMTP HELO host 
// Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages 
// Leave this blank and you will get the server variable 'server_name' or 
// localhost if that isn't defined. 
$rcmail_config['smtp_helo_host'] = '';


Log:

[25-Sep-2009 14:10:49] Connection timed out (110):
[25-Sep-2009 14:10:49] Failed to connect socket: Connection timed out ():
[25-Sep-2009 12:10:49 -0700]: SMTP Error: SMTP error: Connection failed: Failed to connect socket: Connection timed out in /home/happy/public_html/smumail.com/program/steps/mail/func.inc on line 1349 (POST /?_task=mail&_action=send)

rosali

What have your users to use for login, '[email protected]' or just 'username'?

If they have to use full email address you could try:

// SMTP username (if required) if you use %u as the username RoundCube 
// will use the current username for login 
$rcmail_config['smtp_user'] = 'my_webmail_standard_smtp_user'

// SMTP password (if required) if you use %p as the password RoundCube 
// will use the current user's password for login 
$rcmail_config['smtp_pass'] = 'my_webmail_standard_smtp_pass';
Regards,
Rosali

kuemerle5

The SMTP server will only accept the part of the email address before the @ symbol.

rosali

Yes, ok ... the try my suggestion and define a static smtp user for all webmail users!
Regards,
Rosali

animetal

I had the same issue, could login but I couldnt send any email, Im using IMAP.
I changed this setting:

// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$rcmail_config['smtp_auth_type'] = '';


to

// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$rcmail_config['smtp_auth_type'] = 'LOGIN';