Roundcube cannot send email

15 posts / 0 new
Last post
#1 Fri, 03/15/2013 - 02:29
bob418

Roundcube cannot send email

I just started to test Virtualmin in last a few days, and have tested deployment on CentOS6, Debian 6 and Ubuntu 12.04. On all situation, I encountered the same problem: the script-installed Roundcube cannot send email.

I have SSL/TLS enabled on Postfix. My Mac Mail program, Usermin, and SquirrelMail all work without a single problem. Roundcube installation, login and receiving are OK. But once clicking send button, the sending takes forever and the interface hangs. Does anyone know what need be done for Roundcube to work?

Thanks in advance!

Bob

Fri, 03/15/2013 - 09:25
andreychek

Howdy,

I'm not quite sure what would cause that, RoundCube should work, in theory :-)

Do you see any errors in the Apache log in $HOME/logs/error_log, or anything in the mail log in /var/log/maillog or /var/log/mail.log?

-Eric

Mon, 03/18/2013 - 07:02 (Reply to #2)
bob418

Thanks for your replay.

I just cleaned the log and retried roundcube. Below is the content from /var/log/mail.log

Mar 18 19:32:19 www3 dovecot: imap-login: Login: user=<bob@z-book.net>, method=PLAIN, rip=42.60.154.225, lip=192.168.121.25, TLS
Mar 18 19:32:20 www3 last message repeated 4 times
Mar 18 19:32:20 www3 dovecot: IMAP(bob@z-book.net): Connection closed bytes=17/340
Mar 18 19:37:31 www3 dovecot: imap-login: Login: user=<bob-z-book.net>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Mar 18 19:37:31 www3 dovecot: IMAP(bob-z-book.net): Disconnected: Logged out bytes=29/399
Mar 18 19:37:31 www3 dovecot: imap-login: Login: user=<bob-z-book.net>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Mar 18 19:37:31 www3 dovecot: IMAP(bob-z-book.net): Disconnected: Logged out bytes=44/362
Mar 18 19:37:31 www3 dovecot: imap-login: Login: user=<bob-z-book.net>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Mar 18 19:37:31 www3 dovecot: IMAP(bob-z-book.net): Disconnected: Logged out bytes=50/404
Mar 18 19:37:32 www3 dovecot: imap-login: Login: user=<bob-z-book.net>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Mar 18 19:37:32 www3 dovecot: IMAP(bob-z-book.net): Disconnected: Logged out bytes=82/430
Mar 18 19:37:42 www3 dovecot: imap-login: Login: user=<bob-z-book.net>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Mar 18 19:37:42 www3 dovecot: IMAP(bob-z-book.net): Disconnected: Logged out bytes=93/447
Mar 18 19:37:42 www3 dovecot: imap-login: Login: user=<bob-z-book.net>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Mar 18 19:37:42 www3 dovecot: IMAP(bob-z-book.net): Disconnected: Logged out bytes=44/395
Mar 18 19:40:04 www3 postfix/pickup[1610]: 53C58296A37: uid=33 from=<www-data>
Mar 18 19:40:04 www3 postfix/cleanup[3502]: 53C58296A37: message-id=<20130318114004.53C58296A37@www3.b2show.net>
Mar 18 19:40:04 www3 postfix/qmgr[1611]: 53C58296A37: from=<www-data@www3.b2show.net>, size=2207, nrcpt=1 (queue active)
Mar 18 19:40:04 www3 postfix/local[3504]: 53C58296A37: to=<www-data@www3.b2show.net>, orig_to=<www-data>, relay=local, delay=0.14, delays=0.02/0/0/0.12, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Mar 18 19:40:04 www3 postfix/qmgr[1611]: 53C58296A37: removed
Mon, 03/18/2013 - 09:05
andreychek

Howdy,

Hmm, I unfortunately don't see any errors in your mail log... do you see anything in your Apache error log, in $HOME/logs/error_log?

-Eric

Mon, 03/18/2013 - 11:48 (Reply to #4)
bob418

This is the line that shows error:

Mar 18 18:10:02 www3 postfix/local[24729]: 39B0E296A2C: to=www-data@www3.b2show.net, relay=local, d elay=0.01, delays=0/0/0/0, dsn=5.2.0, status=bounced (can't create user output file. Command output: procmail: Unable to treat as directory "/var/www/Maildir" procmail: Lock failure on "/var/www/Maildir .lock" procmail: Error while writing to "/var/www/Maildir" )

Tue, 03/19/2013 - 11:49 (Reply to #5)
bob418

Hi Eric,

I've spent some time to think about the problem. The roundcube program should act as the user I use to login, instead it seems to act as the apache user (www-data). Because www-data doesn't have login/password, it fails authentication when trying to send message. I don't know why roundcube behaves this way, but it happened to all my deployment systems. It must be the roundcube configuration problem. Can you suggest which file I should look at to change roundcube configuration?

Thanks!

Bob

Tue, 03/19/2013 - 11:53
andreychek

I'm unfortunately not sure... I haven't heard of that issue happening before, and haven't been able to reproduce it myself, even on a fresh install.

Are you by chance using a VPS provider? Or are you using a dedicated server?

Also, if you go into System Settings -> Re-check Config, does it notice any problems?

-Eric

Tue, 03/19/2013 - 12:12 (Reply to #7)
bob418

I use a VPS (OpenVz) setup. The reason I suspect it's a roundcube problem is that all other email clients work well without any problem.

Below is the output I ran System Settings -> Re-Check Configuration

Your system has 4 GB of memory, which is at or above the Virtualmin recommended minimum of 256 MB. BIND DNS server is installed, and the system is configured to use it.

Mail server Postfix is installed and configured.

Postfix can support per-domain outgoing IP addresses, but is not currently configured to do so. This can be setup in the Postfix Mailserver module.

Apache is installed.

Webalizer is installed.

Apache is configured to host SSL websites.

MySQL is installed and running.

Logrotate is installed.

SpamAssassin and Procmail are installed and configured for use.

ClamAV is installed and assumed to be running.

Plugin AWstats reporting is installed OK.

Plugin DAV Login is installed OK.

Plugin Protected web directories is installed OK.

Using network interface eth0 for virtual IPs.

IPv6 addresses are available, using interface eth0.

Default IP address for virtual servers is xxx.xxx.xxx.xxx.

Both user and group quotas are enabled for home and email directories.

All commands needed to create and restore backups are installed.

The selected package management and update systems are installed OK.

.. your system is ready for use by Virtualmin.

Tue, 03/19/2013 - 12:23
andreychek

Is there any chance you could attach the virtualmin-install.log file that's generated after running the install.sh?

I'm wondering if something failed during the installation process, that prevented something from being setup properly.

While it's possible you are seeing a RoundCube specific problem, I'd expect that we'd be hearing more issues regarding that if it were happening for everyone.

Also, what output do you receive if you run the command "postconf -n"?

Lastly, what is the PHP Execution Mode set to for this Virtual Server? You can see that in Server Configuration -> Website Options.

-Eric

Tue, 03/19/2013 - 12:46 (Reply to #9)
bob418

I attach the file below.

My PHP mode for the site is FCGId.

Output from the command "postconf -n":

======
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
allow_percent_hack = no
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mydestination = www3.b2show.net, localhost.b2show.net, , localhost
myhostname = www3.b2show.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
sender_bcc_maps = hash:/etc/postfix/bcc
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination permit_inet_interfaces
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_tls_CAfile = /etc/ssl/commercial/ca.chain
smtpd_tls_cert_file = /etc/ssl/commercial/www.cert
smtpd_tls_key_file = /etc/ssl/commercial/www.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual
======
Wed, 03/20/2013 - 04:44 (Reply to #10)
bob418

I just did an exactly same installation on a KVM guest, roundcube worked straight away. I guess it's something with the OpenVz that roundcube doesn't like.

Wed, 03/20/2013 - 05:08
bob418

During my testing process, I found I quite like the way Virtualmin/Webmin manage the system. I did encountered some problems but I solved all except the roundcube issue, which now is not an issue as long as I stay with KVM.

One problem I solved is that phpMyAdmin under sub-server keeps giving page 500 errors under default settings. In the log it showed memory not enough for PHP. I think it's can be fixed in your installation script, to set default PHP mode for sub-server to FCGId or CGI. Right now the default setting is mod_php.

There are other default settings, like email address format, you may conduct a survey to decide what to use. I'd like user@full_domain as default.

I'm also very happy with the way you treat us free users. But I'd like to know a little more about your PRO license. What additional features does it provide? And does the number of domain accounts only count top-level domain? If so, does it mean I can have unlimited sub-domains under 1 top-level domain?

Thanks!

Bob

Wed, 03/20/2013 - 10:12
andreychek

Aha, yes, that explains why I can't seem to find any problems in the virtualmin-install.log :-) I've been digging through that trying to determine what might have gone wrong. I'm glad you were able to get that working in KVM though!

It's may be a difference in how their distro image is configured. There's could be a setting, or group of settings, somewhere in Postfix/Dovecot that's causing the behavior you're seeing while using your providers distro image.

Alternatively, we have seen some really unusual issues with OpenVZ and it's resource limits... you could always look in /proc/user_beancounters to see if the "failcnt" field on the far right is non-zero for any of the items in there. If so, that means you're receiving some resource failures. You could then test to see if sending an email causes that to increase.

I like the user@domain.tld email setting as well -- because that format isn't actually supported as a username by Postfix, there's a hack that goes on under the hood to make it work. For awhile, I think they were reluctant to make anything that's even a little "hacky" the default. But it's been working fine for years, so maybe it's possible to review that idea :-)

There's details on Virtualmin Pro vs GPL here:

http://virtualmin.com/compare.html

A "Virtualmin 10" license essentially means you can have 10 websites.

An alias isn't really a separate site, so aliases don't count against the license. But Virtual Servers and Sub-Servers each do.

Most folks who get a Virtualmin license do so for the 100+ Install Scripts it comes with, the Reseller features, and the Premium Support available in the Support Tracker.

But there's plenty of other features that come with it as well :-)

-Eric

Wed, 03/20/2013 - 11:04 (Reply to #13)
bob418

Thanks for your info. The comparison page is a good reading for me. I'll run 2-3 weeks testing before going on to your ship. By the way, do I need to reinstall my server for the PRO license?

Bob

Wed, 03/20/2013 - 11:15
andreychek

Howdy,

Nope, you don't have to reinstall. In the System Settings menu, there's an option to upgrade to Virtualmin Pro.

Once you purchase a Pro license, you can enter your license information into there.

-Eric

Topic locked