Webmail required for Fedora - Postfix - Cyrus IMAP - MySQL - SA - Amavisd

Posted on 2007-10-10
Last Modified: 2013-12-15
Dear All,

I have a server with Fedora 7 - Postfix with MySQL support for hosting multiple domains.  I am able to send and receive mails via a MTA (MS Outlook / Thunderbird / etc).

Tried configuring SquirrelMail as the webmail and see that the left frame is not being populated and I have an error
"ERROR: Could not complete request.  Query: CREATE "Sent"  Reason Given: Invalid mailbox name."

But the main window is also empty and does not show any mails that are there in the users directory.  Any suggestions for a webmail?
Question by:ygoutham
    LVL 6

    Accepted Solution


    you need to configure squirrel to use correct mailbox naming (choose imap server type 'cyrus' or mailbox separator '/' in server settings)

    also you could try roundcube ;)

    best regards,

    LVL 14

    Author Comment

    i have only courier imap running, changing the server to cyrus has removed the warning from the left menu bar.  but still dont see the mails in the inbox.  the queue is empty.

    also when i try and login as a user for a second domain, it says the IMAP server has dropped the connections!!! any ideas on that one?
    LVL 6

    Expert Comment

    heh, so what imap server do you have - courier or cyrus? also are you using imap in your mail client or pop3?

    LVL 14

    Author Comment

    have enabled both imap and pop3.  sorry about the confusion earlier.  i think it is mostly going to be pop3. but funnily, changing it to cyrus made it work for the left side menu bar.

    now the issue is that the mails in the queue are not getting populated for the users and there is only one single domain users who are able to login using the webmail.  it is not allowing for the rest of the domains.

    am i missing something here?
    LVL 6

    Expert Comment

    please check your squirrel config, it looks like that something is not correct there. by the way, the queue means mail list in the squirrel?

    if you use pop3 with mail client, then mails are not left on the server and you can't see them via webmail.

    LVL 14

    Author Comment

    yes, the mails in the squirrel.  when i send a mail to my own id, (i have my thunderbird closed on my machine) i see it delivered.  i cant see it in the browser window.  but when i start the MTA again, i see that the mail is downloading.  kind of confused with the behaviour.

    also why say that the imap server dropped for the other domains???
    LVL 6

    Expert Comment

    paste squirrel config file please.

    LVL 14

    Author Comment

    [root@xxx config]# cat config.php

     * SquirrelMail Configuration File
     * Created using the configure script,

    global $version;
    $config_version = '1.4.0';
    $config_use_color = 1;

    $org_name      = "SquirrelMail";
    $org_logo      = SM_PATH . 'images/sm_logo.png';
    $org_logo_width  = '308';
    $org_logo_height = '111';
    $org_title     = "SquirrelMail $version";
    $signout_page  = '';
    $frame_top     = '_top';

    $provider_uri     = '';

    $provider_name     = 'SquirrelMail';

    $motd = "";

    $squirrelmail_default_language = 'en_US';
    $default_charset       = 'iso-8859-1';
    $lossy_encoding        = false;

    $domain                 = 'localhost';
    $imapServerAddress      = 'localhost';
    $imapPort               = 143;
    $useSendmail            = true;
    $smtpServerAddress      = 'localhost';
    $smtpPort               = 25;
    $sendmail_path          = '/usr/sbin/sendmail';
    $sendmail_args          = '-i -t';
    $pop_before_smtp        = false;
    $imap_server_type       = 'cyrus';
    $invert_time            = false;
    $optional_delimiter     = '.';
    $encode_header_key      = '';

    $default_folder_prefix          = '';
    $trash_folder                   = 'INBOX.Trash';
    $sent_folder                    = 'INBOX.Sent';
    $draft_folder                   = 'INBOX.Drafts';
    $default_move_to_trash          = true;
    $default_move_to_sent           = true;
    $default_save_as_draft          = true;
    $show_prefix_option             = false;
    $list_special_folders_first     = true;
    $use_special_folder_color       = true;
    $auto_expunge                   = true;
    $default_sub_of_inbox           = true;
    $show_contain_subfolders_option = false;
    $default_unseen_notify          = 2;
    $default_unseen_type            = 2;
    $auto_create_special            = true;
    $delete_folder                  = true;
    $noselect_fix_enable            = false;

    $data_dir                 = '/var/lib/squirrelmail/prefs/';
    $attachment_dir           = '/var/spool/squirrelmail/attach/';
    $dir_hash_level           = 0;
    $default_left_size        = '150';
    $force_username_lowercase = true;
    $default_use_priority     = true;
    $hide_sm_attributions     = true;
    $default_use_mdn          = true;
    $edit_identity            = true;
    $edit_name                = true;
    $hide_auth_header         = false;
    $allow_thread_sort        = true;
    $allow_server_sort        = false;
    $allow_charset_search     = true;
    $uid_support              = true;

    $plugins[0] = 'delete_move_next';
    $plugins[1] = 'squirrelspell';
    $plugins[2] = 'newmail';
    $plugins[3] = 'mail_fetch';
    $plugins[4] = 'calendar';

    $theme_css = '';
    $theme_default = 0;
    $theme[0]['PATH'] = SM_PATH . 'themes/default_theme.php';
    $theme[0]['NAME'] = 'Default';
    $theme[1]['PATH'] = SM_PATH . 'themes/plain_blue_theme.php';
    $theme[1]['NAME'] = 'Plain Blue';
    $theme[2]['PATH'] = SM_PATH . 'themes/sandstorm_theme.php';
    $theme[2]['NAME'] = 'Sand Storm';
    $theme[3]['PATH'] = SM_PATH . 'themes/deepocean_theme.php';
    $theme[3]['NAME'] = 'Deep Ocean';
    $theme[4]['PATH'] = SM_PATH . 'themes/slashdot_theme.php';
    $theme[4]['NAME'] = 'Slashdot';
    $theme[5]['PATH'] = SM_PATH . 'themes/purple_theme.php';
    $theme[5]['NAME'] = 'Purple';
    $theme[6]['PATH'] = SM_PATH . 'themes/forest_theme.php';
    $theme[6]['NAME'] = 'Forest';
    $theme[7]['PATH'] = SM_PATH . 'themes/ice_theme.php';
    $theme[7]['NAME'] = 'Ice';
    $theme[8]['PATH'] = SM_PATH . 'themes/seaspray_theme.php';
    $theme[8]['NAME'] = 'Sea Spray';
    $theme[9]['PATH'] = SM_PATH . 'themes/bluesteel_theme.php';
    $theme[9]['NAME'] = 'Blue Steel';
    $theme[10]['PATH'] = SM_PATH . 'themes/dark_grey_theme.php';
    $theme[10]['NAME'] = 'Dark Grey';
    $theme[11]['PATH'] = SM_PATH . 'themes/high_contrast_theme.php';
    $theme[11]['NAME'] = 'High Contrast';
    $theme[12]['PATH'] = SM_PATH . 'themes/black_bean_burrito_theme.php';
    $theme[12]['NAME'] = 'Black Bean Burrito';
    $theme[13]['PATH'] = SM_PATH . 'themes/servery_theme.php';
    $theme[13]['NAME'] = 'Servery';
    $theme[14]['PATH'] = SM_PATH . 'themes/maize_theme.php';
    $theme[14]['NAME'] = 'Maize';
    $theme[15]['PATH'] = SM_PATH . 'themes/bluesnews_theme.php';
    $theme[15]['NAME'] = 'BluesNews';
    $theme[16]['PATH'] = SM_PATH . 'themes/deepocean2_theme.php';
    $theme[16]['NAME'] = 'Deep Ocean 2';
    $theme[17]['PATH'] = SM_PATH . 'themes/blue_grey_theme.php';
    $theme[17]['NAME'] = 'Blue Grey';
    $theme[18]['PATH'] = SM_PATH . 'themes/dompie_theme.php';
    $theme[18]['NAME'] = 'Dompie';
    $theme[19]['PATH'] = SM_PATH . 'themes/methodical_theme.php';
    $theme[19]['NAME'] = 'Methodical';
    $theme[20]['PATH'] = SM_PATH . 'themes/greenhouse_effect.php';
    $theme[20]['NAME'] = 'Greenhouse Effect (Changes)';
    $theme[21]['PATH'] = SM_PATH . 'themes/in_the_pink.php';
    $theme[21]['NAME'] = 'In The Pink (Changes)';
    $theme[22]['PATH'] = SM_PATH . 'themes/kind_of_blue.php';
    $theme[22]['NAME'] = 'Kind of Blue (Changes)';
    $theme[23]['PATH'] = SM_PATH . 'themes/monostochastic.php';
    $theme[23]['NAME'] = 'Monostochastic (Changes)';
    $theme[24]['PATH'] = SM_PATH . 'themes/shades_of_grey.php';
    $theme[24]['NAME'] = 'Shades of Grey (Changes)';
    $theme[25]['PATH'] = SM_PATH . 'themes/spice_of_life.php';
    $theme[25]['NAME'] = 'Spice of Life (Changes)';
    $theme[26]['PATH'] = SM_PATH . 'themes/spice_of_life_lite.php';
    $theme[26]['NAME'] = 'Spice of Life - Lite (Changes)';
    $theme[27]['PATH'] = SM_PATH . 'themes/spice_of_life_dark.php';
    $theme[27]['NAME'] = 'Spice of Life - Dark (Changes)';
    $theme[28]['PATH'] = SM_PATH . 'themes/christmas.php';
    $theme[28]['NAME'] = 'Holiday - Christmas';
    $theme[29]['PATH'] = SM_PATH . 'themes/darkness.php';
    $theme[29]['NAME'] = 'Darkness (Changes)';
    $theme[30]['PATH'] = SM_PATH . 'themes/random.php';
    $theme[30]['NAME'] = 'Random (Changes every login)';
    $theme[31]['PATH'] = SM_PATH . 'themes/midnight.php';
    $theme[31]['NAME'] = 'Midnight';
    $theme[32]['PATH'] = SM_PATH . 'themes/alien_glow.php';
    $theme[32]['NAME'] = 'Alien Glow';
    $theme[33]['PATH'] = SM_PATH . 'themes/dark_green.php';
    $theme[33]['NAME'] = 'Dark Green';
    $theme[34]['PATH'] = SM_PATH . 'themes/penguin.php';
    $theme[34]['NAME'] = 'Penguin';

    $default_use_javascript_addr_book = true;
    $abook_global_file = '';
    $abook_global_file_writeable = false;
    $abook_global_file_listing = true;
    $abook_file_line_length = 2048;

    $addrbook_dsn = 'mysql://xxxxxxwebmailuser:*************@localhost/squirrelmail';
    $addrbook_table = 'address';

    $prefs_dsn = 'mysql://xxxxxxwebmailuser:**************@localhost/squirrelmail';
    $prefs_table = 'userprefs';
    $prefs_user_field = 'user';
    $prefs_key_field = 'prefkey';
    $prefs_val_field = 'prefval';
    $addrbook_global_dsn = '';
    $addrbook_global_table = 'global_abook';
    $addrbook_global_writeable = false;
    $addrbook_global_listing = false;

    $no_list_for_subscribe = false;
    $smtp_auth_mech = 'none';
    $imap_auth_mech = 'login';
    $use_imap_tls = false;
    $use_smtp_tls = false;
    $session_name = 'SQMSESSID';

    $config_location_base     = '';

    @include SM_PATH . 'config/config_local.php';

     * Make sure there are no characters after the PHP closing
     * tag below (including newline characters and whitespace).
     * Otherwise, that character will cause the headers to be
     * sent and regular output to begin, which will majorly screw
     * things up when we try to send more headers later.
    LVL 6

    Expert Comment

    and config_local.php ?

    LVL 14

    Author Comment

    you had to change the mysql database with the list of domain names and the smtp part (transport field in the database) need to be populated only with a ":" without the quotes.

    once done, then it starts receiving all the mails and showing them for the domains.  dont ask me the logic behind it but that did the trick.  

    thanks for the help

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    The purpose of this video is to demonstrate how to set up a Mailchimp campaign. This will include styling and adding elements to a newsletter/email. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchim…
    This Micro Tutorial will demonstrate the easy use of Gmail embedding images in your email so the recipient of your email can view them in context.

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now