Difference between revisions of "Talk:Virtual user mail system"

From ArchWiki
Jump to: navigation, search
(roundcube install can't read config files)
(Tutorial does not create additional folders (Trash/Drafts))
 
(16 intermediate revisions by 8 users not shown)
Line 1: Line 1:
== <s> This is your friendly original author speaking. </s> ==
 
 
Hey there, hopefully there are no problems while working down the guide. If there are, feel free to write them down here and I will come to them! However, please *do* try to correct any issues you find in the guide yourself if you can.
 
--[[User:Svenstaro|Svenstaro]] 12:39, 19 September 2010 (EDT)
 
 
 
Expanded the Database section with the code needed to create a rudimentary db and dba for pfadmin to work on and removed the "Needs expansion" banner.
 
--[[User:Justforgetme|Justforgetme]] ([[User talk:Justforgetme|talk]]) 12:02, 19 June 2012 (UTC)
 
 
KingX did exactly the updates I had in mind to do tonight, great job. Now the SQL queries will actually work out of the box for $domain/$user@$domain maildirs/mailschemes (which is what almost everyone wants to use afaik). Lets hope this doesn't lock down the how to too much.
 
--[[User:Justforgetme|Justforgetme]] ([[User talk:Justforgetme|talk]]) 22:28, 22 June 2012 (UTC)
 
 
== <s> postfixadmin and roundcubemail section </s> ==
 
Hey awesome!! I am glad I am not the only one looking at this page. :) I am planning on expanding the postfixadmin and roundcubemail section. Just want to touch base on one thing, so postfixadmin and postfix share the same db right? in this case postfix_db? and Roundcube has its own db. The original author mentioned that "we will use postfixadmin to fill the tables later", but never really clarified or mentioned how... or I missed it. I think that can be one thing that should be clarified also.--[[User:KingX|KingX]] ([[User talk:KingX|talk]]) 22:51, 22 June 2012 (UTC)
 
 
postfixadmin and roundcube have different databases. Both are populated via the http GUI and hold the meta configuration. For example roundcube will hold user identities (name, sig), searches, contacts, contactgroups (aka mail lists), a dictioary etc. Most of these are only populated when you use the Http interface, since roundcube doesn't actually come into contact with the mailboxes that postfix(and dovecot) uses. The postfix db, in my installations usually just called postfix - no need for extra designation since you already know it is a DB - holds more interesting data since there you will find routing paths (what mailbox each alias maps to), usage information (like quotas), vacation data, hashed login credentials etc.. I don't think it makes sense to drill deeper into that topic inside the tutorial since even the admin wont be much in touch with those dbs and debugging roundcube and dovecot (&pfadmin) issues would really call for a separate document. What are You interested in adding?
 
--[[User:Justforgetme|Justforgetme]] ([[User talk:Justforgetme|talk]]) 16:33, 29 June 2012 (UTC)
 
 
Ok yeh I have a perfectly working mailserver now. :) I was just going to expand the roundcube and postfixadmin section a little, as now roundcube is available in official repo so need to grab the source manually. And just add some hints for people trying to configure postfixadmin. --[[User:KingX|KingX]] ([[User talk:KingX|talk]]) 22:51, 29 June 2012 (UTC)
 
 
== <s> revert relay_domains variable </s> ==
 
... I have undone the modification of user [[User:Gesh|Gesh]]. The relay_domains variable in this specific postfix setup should only be relevant as an additional filter since the MT authentication/authorization is done via the database. Correct me if I'm wrong but I think this is necessary in case of dynamic multi domain hosting. The resulting server does not operate as an open relay unless you add a tld wildcard for every tld you want to OR for in the db ;-)
 
--[[User:Justforgetme|Justforgetme]] ([[User talk:Justforgetme|talk]]) 15:49, 9 August 2012 (UTC)
 
 
 
== crt file ==
 
== crt file ==
 
[http://wiki2.dovecot.org/SSL/DovecotConfiguration Dovecot configuration] suggests setting the certs 0444 for the .crt and 0400 for the .key, but the wiki suggests 0644 and 0600, respectively. Personally, I do not see why anyone should have write permissions on the certs, esp. since they're not meant to be modified. Suggestions? --[[User:Gesh|Gesh]] ([[User talk:Gesh|talk]]) 23:30, 9 August 2012 (UTC)
 
[http://wiki2.dovecot.org/SSL/DovecotConfiguration Dovecot configuration] suggests setting the certs 0444 for the .crt and 0400 for the .key, but the wiki suggests 0644 and 0600, respectively. Personally, I do not see why anyone should have write permissions on the certs, esp. since they're not meant to be modified. Suggestions? --[[User:Gesh|Gesh]] ([[User talk:Gesh|talk]]) 23:30, 9 August 2012 (UTC)
Line 32: Line 8:
  
 
Yeah there probably isn't anything wrong with making them read-only. --[[User:Svenstaro|Svenstaro]] ([[User talk:Svenstaro|talk]]) 00:23, 12 August 2012 (UTC)
 
Yeah there probably isn't anything wrong with making them read-only. --[[User:Svenstaro|Svenstaro]] ([[User talk:Svenstaro|talk]]) 00:23, 12 August 2012 (UTC)
 +
 +
:I have changed this article so the permissions are exactly the same as in the Dovecot manual. Before my edits, the {{ic|.key}} was owned by "nobody", which not safe at all, since anybody logged in as "nobody"(=loads of potentially unsafe daemons) can read the {{ic|.key}}. Who owns the {{ic|.crt}} does not matter, so it's easiest to keep it root. --[[User:Lonaowna|Lonaowna]] ([[User talk:Lonaowna|talk]]) 12:44, 16 June 2014 (UTC)
  
 
== Problem with dovecot and roundcube ==
 
== Problem with dovecot and roundcube ==
Line 82: Line 60:
 
--[[User:Dcgasca|dcgasca]] ([[User talk:Dcgasca|talk]]) 04:43, 22 June 2013 (UTC)
 
--[[User:Dcgasca|dcgasca]] ([[User talk:Dcgasca|talk]]) 04:43, 22 June 2013 (UTC)
  
== <s> Mailfiltering  </s> ==
+
== Server refuses connection ==
Thanks everyone for that wiki entry which helped me a lot. I also added Mailfiltering with Dovecot / Sieve after running Spamassassin which runs fine here.
+
--[[User:Ewigkeit|ewigkeit]] ([[User talk:Ewigkeit|talk]]) 18:36, 25 August 2013 (UTC)
+
  
== <s> unable to connect to database </s> ==
+
Hello!
----
+
Whenever I try to login to the mailaccount I created using postfixadmin with roundcube, I get the following error message (from roundcube):
 +
IMAP Error: Login failed for me@my.domain.com from my.ip.adre.ss. Could not connect to ssl://localhost:993: Connection refused in /usr/share/webapps/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 184 (POST /roundcubemail/?_task=login&_action=login)
  
Ok, so apparently I am too stupid to figure this out. I am trying to install PostfixAdmin with MariaDB, but I get this error. Any ideas? I tried searching the web, but nothing.
+
Also, when I tried to send an email to my account from another E-Mail adress, I got the following error report:
+
  The recipient server did not accept our requests to connect. Learn more at http://support.google.com/mail/bin/answer.py?answer=7720
Running software:  
+
  [(0) my.domain.com. [81.10.164.94]:25: Connection refused]
  PHP version 5.5.4
+
+
Checking for dependencies:  
+
Magic Quotes: Disabled - OK
+
Depends on: presence config.inc.php - OK
+
Checking $CONF['configured'] - OK
+
Error: There is no database support in your PHP setup
+
  To install MySQL 3.23 or 4.0 support on FreeBSD:
+
% cd /usr/ports/databases/php5-mysql/
+
% make clean install
+
  - or with portupgrade -
+
% portinstall php5-mysql
+
  To install MySQL 4.1 support on FreeBSD:
+
  % cd /usr/ports/databases/php5-mysqli/
+
% make clean install
+
  - or with portupgrade -
+
% portinstall php5-mysqli
+
  To install PostgreSQL support on FreeBSD:
+
% cd /usr/ports/databases/php5-pgsql/
+
% make clean install
+
  - or with portupgrade -
+
% portinstall php5-pgsql
+
Error: Can't connect to database
+
  Please edit the $CONF['database_*'] parameters in config.inc.php.  
+
+
DEBUG INFORMATION:
+
MySQL 4.1 functions not available! (php5-mysqli installed?)
+
database_type = 'mysqli' in config.inc.php, are you using a different database?
+
Depends on: session - OK
+
Depends on: pcre - OK
+
Depends on: multibyte string - OK
+
Warning: Depends on: IMAP functions - NOT FOUND
+
  To install IMAP support, install php5-imap
+
  Without IMAP support, you won't be able to create subfolders when creating mailboxes.
+
+
Please fix the errors listed above.
+
  
EDIT: FIXED. MySQL interface was off in /etc/php/php.ini Dumb me. I'll leave this here in case anybody else needs it.
+
Whats wrong?
  
--[[User:Regulament|Regulament]] ([[User talk:Regulament|talk]]) 13:57, 26 September 2013 (UTC)
+
== relay_domains = * might me a bad idear ==
  
== <s> roundcube install can't read config files </s> ==
+
I included the following warning into the article. I am not 100% sure about this. So maybe someone should check it and let us discuss it here.
 +
{{Warning|{{ic|<nowiki>relay_domains = *</nowiki>}} might me a bad idear (see http://www.postfix.org/BASIC_CONFIGURATION_README.html#relay_to). You usually do not want postfix to forward mail from strangers.}}
 +
--[[User:PMay|PMay]] ([[User talk:PMay|talk]]) 14:15, 9 January 2014 (UTC)
  
hi!
+
Yes, doing it this way sets up your server as an open relay, which is a Very Bad Idea. Most setups like these specify another mysql proxy that can get the domains allowed to relay -
my roundcube installation can't read the config files that i wrote.
+
my roundcube resides in /usr/share/webapps/roundcubemail, with a symlink in /srv/http/roundcubemail
+
ls -Al in this directory gives me:
+
total 128
+
drwxr-xr-x  2 root root  4096 Oct 21 13:39 bin
+
-rw-r--r--  1 root root 16968 Oct 21 13:39 CHANGELOG
+
-rw-r--r--  1 root root  381 Oct 21 13:39 composer.json-dist
+
lrwxrwxrwx  1 root root    33 Oct 22 04:07 config -> /etc/webapps/roundcubemail/config
+
lrwxrwxrwx  1 root root    36 Oct 22 04:07 .htaccess -> /etc/webapps/roundcubemail/.htaccess
+
-rw-r--r--  1 root root 11999 Oct 21 13:39 index.php
+
-rw-r--r--  1 root root  8677 Oct 21 13:39 INSTALL
+
drwxr-xr-x  3 root root  4096 Oct 21 13:39 installer
+
-rw-r--r--  1 root root 35147 Oct 21 13:39 LICENSE
+
lrwxrwxrwx  1 http http    22 Oct 22 04:07 logs -> /var/log/roundcubemail
+
drwxr-xr-x 30 root root  4096 Oct 21 13:39 plugins
+
drwxr-xr-x  8 root root  4096 Oct 21 13:39 program
+
-rw-r--r--  1 root root  3758 Oct 21 13:39 README.md
+
-rw-r--r--  1 root root    26 Oct 21 13:39 robots.txt
+
drwxr-xr-x  4 root root  4096 Oct 21 13:39 skins
+
drwxr-xr-x  6 root root  4096 Oct 21 13:39 SQL
+
drwxr-xr-x  2 http http  4096 Oct 21 13:39 temp
+
-rw-r--r--  1 root root    2 Nov  5 12:42 test.html
+
-rw-r--r-- 1 root root  2712 Oct 21 13:39 UPGRADING
+
mfg moro
+
  
ok, i was dumb. the open_basedir restriction in php hindered roundcubemail of opening the config files, the config dir is only a symbolic link to etc/webapps which wasnt in the open_basedir
+
main.cf:
 +
    relay_domains = $mydestination, proxy:mysql:/etc/postfix/relay_domains_maps.cf
  
== Server refuses connection ==
+
relay_domains_maps.cf:
 +
    user = postfix_user
 +
    password = hunter2
 +
    hosts = localhost
 +
    dbname = postfix_db
 +
    query = SELECT domain FROM domain WHERE domain='%s' and transport = 'relay' and active = 1 AND NOT exists (select * from alias_domain where alias_domain = '%s' AND alias_domain.active = '1')
 +
[[User:Maleckii|Maleckii]] ([[User talk:Maleckii|talk]]) 23:42, 24 January 2014 (UTC)
  
Hello!
+
I'm going to change the default value from * to what was suggested above. I don't think it's a good idea to have * as a default.
Whenever I try to login to the mailaccount I created using postfixadmin with roundcube, I get the following error message (from roundcube):
+
[[User:Simonsmiley|Simonsmiley]] ([[User talk:Simonsmiley|talk]]) 16:44, 16 June 2015 (UTC)
IMAP Error: Login failed for me@my.domain.com from my.ip.adre.ss. Could not connect to ssl://localhost:993: Connection refused in /usr/share/webapps/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 184 (POST /roundcubemail/?_task=login&_action=login)
+
== Postfix Database ==
 +
I followed this guide and found that my setup would work on the surface (I could even go in to Roundcube and believe I was sending mail but, the logs always have a lookup failure) but found that after letting postfixadmin set up the database, the mappings don't bind to anything in particular. For example, within "virtual_mailbox_domains" a table called forwardings is specified but this table does not exist.
  
Also, when I tried to send an email to my account from another E-Mail adress, I got the following error report:
+
This is due to the way PostfixAdmin will set up the Database schema; I have since edited the wiki as the little note quite simply doesn't exist.
The recipient server did not accept our requests to connect. Learn more at http://support.google.com/mail/bin/answer.py?answer=7720
+
[(0) my.domain.com. [81.10.164.94]:25: Connection refused]
+
  
Whats wrong?
+
== Virtual_Alias_Maps.cf for non-PostfixAdmin configurations appears to be incorrect ==
 +
 
 +
I may be missing something, but as far as I can tell, the suggested value of "select_field = virtual" for /etc/postfix/virtual_alias_maps.cf is incorrect when users are setting up without PostfixAdmin. The msyql db structure the user is instructed to create earlier on does not have a "virtual" column in the 'domain' table, and in practice, following though with this tutorial results in me seeing the errors:
 +
 
 +
    Oct 05 18:09:59 (myserver) postfix/proxymap[706]: warning: mysql query failed: Unknown column 'virtual' in 'field list'
 +
    Oct 05 18:09:59 (myserver) postfix/trivial-rewrite[708]: warning: proxy:mysql:/etc/postfix/virtual_alias_maps.cf: table lookup problem
 +
    Oct 05 18:09:59 (myserver) postfix/trivial-rewrite[708]: warning: virtual_alias_domains lookup failure
 +
 
 +
in my log. Changing the 'select_field' entry in that file to 'domain' appears to fix the problem, and seems to match up with the DB structure the reader is told to create. So, the suggested /etc/postfix/virtual_alias_maps.cf for users not using PostfixAdmin should more likely be something like:
 +
 
 +
    user = postfix_user
 +
    password = hunter2
 +
    hosts = localhost
 +
    dbname = postfix_db
 +
    table = domains
 +
    select_field = domain
 +
    where_field = domain
 +
 
 +
I'm suggesting this rather than editing it because I'd rather someone more familiar with the setup of postfix and sql take a look before making the change. Thanks!
 +
 
 +
== Tutorial does not create additional folders (Trash/Drafts) ==
 +
 
 +
When I follow this tutorial no additional user folders (Trash/Drafts etc) are created.
 +
 
 +
Users cannot delete emails or save drafts. A delete request in Roundcube generates the following: "Server Error: UID MOVE: Internal error occurred. Refer to server log for more information. [2015-11-03 06:59:11] (0.000 + 0.000 secs)."
 +
 
 +
Can anybody explain how to get these folders working so that the Wiki can be amended?
 +
 
 +
Update: Fixed this with the following additions to the Roundcube config file - will amend the wiki:
 +
 
 +
$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
 +
$rcmail_config['create_default_folders'] = true;
 +
$rcmail_config['protect_default_folders'] = true;

Latest revision as of 09:07, 3 November 2015

crt file

Dovecot configuration suggests setting the certs 0444 for the .crt and 0400 for the .key, but the wiki suggests 0644 and 0600, respectively. Personally, I do not see why anyone should have write permissions on the certs, esp. since they're not meant to be modified. Suggestions? --Gesh (talk) 23:30, 9 August 2012 (UTC)

Hmm... I think you are right Gesh. I can't fathom how making the certs read only could damage the setup. --Justforgetme (talk) 00:10, 10 August 2012 (UTC)

Also, shouldn't the chown nobody:nobody also be executed on the .crt file? I cannot understand the rationale of having it owned by root. At least with system-configuration files, you'd want both that root will be able to edit them and that *only* root be able to edit them. --Gesh (talk) 01:35, 10 August 2012 (UTC)

Yeah there probably isn't anything wrong with making them read-only. --Svenstaro (talk) 00:23, 12 August 2012 (UTC)

I have changed this article so the permissions are exactly the same as in the Dovecot manual. Before my edits, the .key was owned by "nobody", which not safe at all, since anybody logged in as "nobody"(=loads of potentially unsafe daemons) can read the .key. Who owns the .crt does not matter, so it's easiest to keep it root. --Lonaowna (talk) 12:44, 16 June 2014 (UTC)

Problem with dovecot and roundcube

Hey there! Excellent tutorial, it almost worked like a charm! I had some problems with dovecot and roundcube. I'm not sure if they are sufficiently general to be added on the main tutorial, but I wanted to discuss them here:

  1. Dovecot Greeting. I had to place a Dovecot greeting in /etc/dovecot/dovecot.conf. I included "login_greeting = Dovecot ready for action."
  2. Instead of using TLS for IMAP in Roundcube I had to configure SSL. In particular, I had to change this "$rcmail_config['default_host'] = 'ssl://localhost/';" on Roundcube main.inc.php.
  3. I missed a comment on the 'username_domain' option in the configuration. As it was not mentioned in the tutorial I wrongly assumed that Dovecot allows login with only the username. But then I couldn't login from Roundcube using my username. Adding the "$rcmail_config['username_domain'] = 'mydomain.net';" option in Roundcube main.inc.php.

Thanks for the tutorial, I think it is pretty straightforward for a complex task a setting up the mail server. Best regards! --Es0x279e (talk) 10:12, 6 October 2012 (UTC)

Hi! I cannot for the life of me get roundcube to work. It fails when I try to do the login to the IMAP server during installation. I get: "Connecting to tls://localhost/... IMAP connect: NOT OK(Login failed for [edited] from [edited]. Empty startup greeting (localhost:993))" I've tried changing it to ssl:// and without ssl:// or tls:// but for some reason it just does not work and I do not know where to go from here. Help would be greatly greatly appreciated. --Pei (talk) 04:20, 2 November 2012 (UTC)

Undid the last contribution of (Mehtab) because listening interfaces should beimplementation speciffic for this Postfix installation. If anybody disagrees let me know. Justforgetme (talk) 06:41, 4 December 2012 (UTC)

Expanded the Roundcube section and added some info for SpamAssassin and added the tip to remove "Received header". Had to do a bit of digging today to set it up, figured I add it here so it will be helpful. KingX (talk) 02:55, 21 April 2013 (UTC)

Thank you!, the best tutorial I found, just want to point out some problems I had during the installation.

A) If vmail id/gid != 5000, you may have dovecot-sql.conf correct, but postfix still complains for db access. Better listen to Svenstaro from the begining.

B) Roundcube installer: DO NOT TRUST IT!.

main.inc.php ,

$rcmail_config['default_host'] = 'ssl://localhost'; 

If you use tls for IMAP, it will not work and you will get nightmares with the "STARTTLS command first" error. (roundcube tries to use ssl anyway)

You can use tls for the SMTP server thoug, but also keep the next lines like this:

$rcmail_config['smtp_server'] = 'tls://localhost';
$rcmail_config['smtp_port'] = 587;
$rcmail_config['smtp_user'] = '%u';
$rcmail_config['smtp_pass'] = '%p'; 

If you use ssl, you also have to allow ssl connections. Change 'encrypt' for 'may' in your master.cf file, or you will have those nightmares again:

-o smtpd_tls_security_level=encrypt

C) mysql.so and imap.so must be enabled (/etc/php/php.ini)

D) php.conf: You can create aliases for roundcube and postfixAdmin folders, so you don't bulk your /srv/http/ directory

E) Your hostname have to include your domain name:

lupus@ulula:~$ hostname 
myHostName.mysite.org  

F) Bloking port 25 is a common practice for ISP's. This port is where all incoming mail is delivered, so you will not be able get your mail from the outside world. Don't panic (I did), you need a MX DNS server with port fordwarding (or convice your isp that blocking the smtp port is for loosers). This site offers the service for free, good enough to play around: [1]

Edit your master.cf file to something like this

smtp     inet  n       -       n       -       -       smtpd
26       inet  n       -       n       -       -       smtpd  
submission     inet  n       -       n       -       -       smtpd

Last word of advice: DO NOT mix virtual server mail with non virtual server mail configuration! --dcgasca (talk) 04:43, 22 June 2013 (UTC)

Server refuses connection

Hello! Whenever I try to login to the mailaccount I created using postfixadmin with roundcube, I get the following error message (from roundcube):

IMAP Error: Login failed for me@my.domain.com from my.ip.adre.ss. Could not connect to ssl://localhost:993: Connection refused in /usr/share/webapps/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 184 (POST /roundcubemail/?_task=login&_action=login)

Also, when I tried to send an email to my account from another E-Mail adress, I got the following error report:

The recipient server did not accept our requests to connect. Learn more at http://support.google.com/mail/bin/answer.py?answer=7720
[(0) my.domain.com. [81.10.164.94]:25: Connection refused]

Whats wrong?

relay_domains = * might me a bad idear

I included the following warning into the article. I am not 100% sure about this. So maybe someone should check it and let us discuss it here.

Warning: relay_domains = * might me a bad idear (see http://www.postfix.org/BASIC_CONFIGURATION_README.html#relay_to). You usually do not want postfix to forward mail from strangers.

--PMay (talk) 14:15, 9 January 2014 (UTC)

Yes, doing it this way sets up your server as an open relay, which is a Very Bad Idea. Most setups like these specify another mysql proxy that can get the domains allowed to relay -

main.cf:

   relay_domains = $mydestination, proxy:mysql:/etc/postfix/relay_domains_maps.cf

relay_domains_maps.cf:

   user = postfix_user
   password = hunter2
   hosts = localhost
   dbname = postfix_db
   query = SELECT domain FROM domain WHERE domain='%s' and transport = 'relay' and active = 1 AND NOT exists (select * from alias_domain where alias_domain = '%s' AND alias_domain.active = '1')

Maleckii (talk) 23:42, 24 January 2014 (UTC)

I'm going to change the default value from * to what was suggested above. I don't think it's a good idea to have * as a default. Simonsmiley (talk) 16:44, 16 June 2015 (UTC)

Postfix Database

I followed this guide and found that my setup would work on the surface (I could even go in to Roundcube and believe I was sending mail but, the logs always have a lookup failure) but found that after letting postfixadmin set up the database, the mappings don't bind to anything in particular. For example, within "virtual_mailbox_domains" a table called forwardings is specified but this table does not exist.

This is due to the way PostfixAdmin will set up the Database schema; I have since edited the wiki as the little note quite simply doesn't exist.

Virtual_Alias_Maps.cf for non-PostfixAdmin configurations appears to be incorrect

I may be missing something, but as far as I can tell, the suggested value of "select_field = virtual" for /etc/postfix/virtual_alias_maps.cf is incorrect when users are setting up without PostfixAdmin. The msyql db structure the user is instructed to create earlier on does not have a "virtual" column in the 'domain' table, and in practice, following though with this tutorial results in me seeing the errors:

   Oct 05 18:09:59 (myserver) postfix/proxymap[706]: warning: mysql query failed: Unknown column 'virtual' in 'field list'
   Oct 05 18:09:59 (myserver) postfix/trivial-rewrite[708]: warning: proxy:mysql:/etc/postfix/virtual_alias_maps.cf: table lookup problem
   Oct 05 18:09:59 (myserver) postfix/trivial-rewrite[708]: warning: virtual_alias_domains lookup failure

in my log. Changing the 'select_field' entry in that file to 'domain' appears to fix the problem, and seems to match up with the DB structure the reader is told to create. So, the suggested /etc/postfix/virtual_alias_maps.cf for users not using PostfixAdmin should more likely be something like:

   user = postfix_user
   password = hunter2
   hosts = localhost
   dbname = postfix_db
   table = domains
   select_field = domain
   where_field = domain

I'm suggesting this rather than editing it because I'd rather someone more familiar with the setup of postfix and sql take a look before making the change. Thanks!

Tutorial does not create additional folders (Trash/Drafts)

When I follow this tutorial no additional user folders (Trash/Drafts etc) are created.

Users cannot delete emails or save drafts. A delete request in Roundcube generates the following: "Server Error: UID MOVE: Internal error occurred. Refer to server log for more information. [2015-11-03 06:59:11] (0.000 + 0.000 secs)."

Can anybody explain how to get these folders working so that the Wiki can be amended?

Update: Fixed this with the following additions to the Roundcube config file - will amend the wiki:

$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash'); $rcmail_config['create_default_folders'] = true; $rcmail_config['protect_default_folders'] = true;