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!



I’m not quite sure what would cause that, RoundCube should work, in theory :slight_smile:

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?


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=, method=PLAIN, rip=, lip=, TLS Mar 18 19:32:20 www3 last message repeated 4 times Mar 18 19:32:20 www3 dovecot: IMAP( Connection closed bytes=17/340 Mar 18 19:37:31 www3 dovecot: imap-login: Login: user=, method=PLAIN, rip=, lip=, secured Mar 18 19:37:31 www3 dovecot: IMAP( Disconnected: Logged out bytes=29/399 Mar 18 19:37:31 www3 dovecot: imap-login: Login: user=, method=PLAIN, rip=, lip=, secured Mar 18 19:37:31 www3 dovecot: IMAP( Disconnected: Logged out bytes=44/362 Mar 18 19:37:31 www3 dovecot: imap-login: Login: user=, method=PLAIN, rip=, lip=, secured Mar 18 19:37:31 www3 dovecot: IMAP( Disconnected: Logged out bytes=50/404 Mar 18 19:37:32 www3 dovecot: imap-login: Login: user=, method=PLAIN, rip=, lip=, secured Mar 18 19:37:32 www3 dovecot: IMAP( Disconnected: Logged out bytes=82/430 Mar 18 19:37:42 www3 dovecot: imap-login: Login: user=, method=PLAIN, rip=, lip=, secured Mar 18 19:37:42 www3 dovecot: IMAP( Disconnected: Logged out bytes=93/447 Mar 18 19:37:42 www3 dovecot: imap-login: Login: user=, method=PLAIN, rip=, lip=, secured Mar 18 19:37:42 www3 dovecot: IMAP( Disconnected: Logged out bytes=44/395 Mar 18 19:40:04 www3 postfix/pickup[1610]: 53C58296A37: uid=33 from= Mar 18 19:40:04 www3 postfix/cleanup[3502]: 53C58296A37: message-id=<> Mar 18 19:40:04 www3 postfix/qmgr[1611]: 53C58296A37: from=, size=2207, nrcpt=1 (queue active) Mar 18 19:40:04 www3 postfix/local[3504]: 53C58296A37: to=, orig_to=, 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


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?


This is the line that shows error:

Mar 18 18:10:02 www3 postfix/local[24729]: 39B0E296A2C:, 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” )

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?



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?


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

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.

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

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.


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 =,, , localhost
myhostname =
mynetworks = [::ffff:]/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

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.

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?



Aha, yes, that explains why I can’t seem to find any problems in the virtualmin-install.log :slight_smile: 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 :slight_smile:

There’s details on Virtualmin Pro vs GPL here:

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 :slight_smile:


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?



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.