Author Topic: [SOLVED] IMAP Error: Could not save message in Inbox.Drafts  (Read 7562 times)

Offline snowweb

  • Jr. Member
  • **
  • Posts: 35
[SOLVED] IMAP Error: Could not save message in Inbox.Drafts
« on: August 28, 2012, 01:51:23 AM »
When I attempt to save a message as a draft or when Roundcube attempts to autosave it, I'm getting the error below and the message is not saved.

/var/log/roundcubemail/errors
Code: [Select]
[28-Aug-2012 12:31:32 +0800]: IMAP Error: Could not save message in Inbox.Drafts in /var/www/html/shared/roundcubemail-0.8.1/program/steps/mail/sendmail.inc on line 697 (POST /?_unlock=loading1346128296571?_task=mail&_action=send)

/var/log/roundcubemail/imap
Code: [Select]
[28-Aug-2012 12:31:32 +0800]: [5118] S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
[28-Aug-2012 12:31:32 +0800]: [5118] C: A0001 ID ("name" "Roundcube Webmail" "version" "0.8.1" "php" "5.3.3" "os" "Linux" "command" "/?_unlock=loading1346128296571")
[28-Aug-2012 12:31:32 +0800]: [5118] S: * ID NIL
[28-Aug-2012 12:31:32 +0800]: [5118] S: A0001 OK ID completed.
[28-Aug-2012 12:31:32 +0800]: [5118] C: A0002 AUTHENTICATE PLAIN cGV0ZXJAYm9va2tlZXBlci5waABwZXRlckBib29ra2VlcGVyLnBoAGZ1YXNpbjU0MTRz
[28-Aug-2012 12:31:32 +0800]: [5118] S: A0002 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
[28-Aug-2012 12:31:32 +0800]: [5118] C: A0003 LSUB "" Inbox.Drafts
[28-Aug-2012 12:31:32 +0800]: [5118] S: * LSUB () "." "INBOX.Drafts"
[28-Aug-2012 12:31:32 +0800]: [5118] S: A0003 OK Lsub completed.
[28-Aug-2012 12:31:32 +0800]: [5118] C: A0004 LIST "" Inbox.Drafts
[28-Aug-2012 12:31:32 +0800]: [5118] S: * LIST (\HasNoChildren) "." "INBOX.Drafts"
[28-Aug-2012 12:31:32 +0800]: [5118] S: A0004 OK List completed.
[28-Aug-2012 12:31:32 +0800]: [5118] C: A0005 CREATE Inbox.Drafts
[28-Aug-2012 12:31:32 +0800]: [5118] S: A0005 NO [ALREADYEXISTS] Mailbox already exists: Inbox.Drafts
[28-Aug-2012 12:31:32 +0800]: [5118] C: A0006 LOGOUT
[28-Aug-2012 12:31:32 +0800]: [5118] S: * BYE Logging out
[28-Aug-2012 12:31:32 +0800]: [5118] S: A0006 OK Logout completed.

All other aspects of the mail service appear to be working. I can send and receive mail etc.

At first I thought this was a permissions error. These are the permissions on the Drafts folder in question. But I've relaxed the permissions as you can see below, with no effect.
Code: [Select]
f. /var/mail/mydomain.ph/peter/Maildir/
total 268K
drwxrwxrwx. 36 vuser vusers 4.0K Aug 27 19:51 .
drwxrwxrwx.  3 vuser vusers 4.0K Jun 21  2011 ..
drwxrwxrwx.  2 vuser vusers 4.0K Aug 27 19:50 cur
-rwxrwxrwx   1 vuser vusers 2.0K Aug 23 23:04 dovecot.index
-rwxrwxrwx   1 vuser vusers  68K Aug 27 21:25 dovecot.index.cache
-rwxrwxrwx   1 vuser vusers  24K Aug 27 19:51 dovecot.index.log
-rwxrwxrwx   1 vuser vusers 1.3K Aug 27 21:25 dovecot.index.thread
-rwxrwxrwx.  1 vuser vusers   86 Feb  2  2012 dovecot-keywords
-rwxrwxrwx   1 vuser vusers 3.2K Aug 27 19:50 dovecot-uidlist
-rwxrwxrwx.  1 vuser vusers    8 Apr 20 21:41 dovecot-uidvalidity
-rwxrwxrwx.  1 vuser vusers    0 Aug 12  2011 dovecot-uidvalidity.4e44d71a
drwxrwxrwx.  5 vuser vusers 4.0K Aug 27 16:44 .Drafts
drwxrwxrwx.  5 vuser vusers 4.0K Aug 27 05:28 .INBOX.Drafts
drwxrwxrwx.  5 vuser vusers 4.0K Aug 27 18:09 .INBOX.Sent
drwxrwxrwx.  5 vuser vusers 4.0K Aug 14 21:13 .INBOX.spam
drwxrwxrwx.  5 vuser vusers 4.0K Aug 27 05:06 .INBOX.Trash
drwxrwxrwx.  5 vuser vusers 4.0K Aug  7 06:12 .Junk
drwxrwxrwx.  2 vuser vusers 4.0K Aug 27 19:50 new
-rwxrwxrwx.  1 vuser vusers  709 Jul 18 01:35 subscriptions
drwxrwxrwx.  2 vuser vusers 4.0K Aug 27 19:50 tmp

I'm able to save into Inbox.Drafts remotely using IMAP from my local mailclient.

I'm using Dovecot and Postfix.

dovecot -n
Code: [Select]
# 2.0.9: /etc/dovecot/dovecot.conf                                                                                                   
# OS: Linux 2.6.32-279.2.1.el6.x86_64 x86_64 CentOS release 6.3 (Final) ext4                                                         
auth_mechanisms = plain login                                                                                                         
disable_plaintext_auth = no                                                                                                           
last_valid_gid = 1000                                                                                                                 
mail_gid = 502                                                                                                                       
mail_location = maildir:/var/mail/%d/%n/Maildir                                                                                       
mail_uid = 501                                                                                                                       
passdb {                                                                                                                             
  args = username_format=%n /etc/dovecot/users/%d/users                                                                               
  driver = passwd-file                                                                                                               
}                                                                                                                                     
service auth {                                                                                                                       
  unix_listener /var/spool/postfix/private/auth {                                                                                     
    group = postfix                                                                                                                   
    mode = 0660                                                                                                                       
    user = postfix                                                                                                                   
  }                                                                                                                                   
  unix_listener auth-userdb {                                                                                                         
    group = vusers                                                                                                                   
    mode = 0660
    user = vuser
  }
}
ssl_cert = </etc/pki/tls/certs/mail.mydomain.crt
ssl_key = </etc/pki/tls/certs/mail.mydomain.key
userdb {
  args = uid=501 gid=502 home=/var/mail/%d/%n
  driver = static
}
verbose_proctitle = yes

postconf -n
Code: [Select]
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = scan:[127.0.0.1]:10025
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
default_destination_concurrency_limit = 5
home_mailbox = Maildir/
html_directory = no
in_flow_delay = 1s
inet_protocols = all
local_recipient_maps =
mail_owner = postfix
mail_spool_directory = /var/mail
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = localhost
myhostname = mail.mydomain.ph
mynetworks_style = host
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/pki/tls/certs/mail.mydomain.crt
smtpd_tls_key_file = /etc/pki/tls/certs/mail.mydomain.key
smtpd_tls_session_cache_database = btree:/etc/postfix/smtpd_scache
smtpd_use_tls = yes
soft_bounce = no
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_mailbox_domains = /etc/postfix/virtual_mailbox_domains
virtual_transport = dovecot

Here is my Roundcube main.inc.php
Code: [Select]
$ egrep -v  '^[[:space:]]*#|^$|^[[:space:]]*//' /var/www/html/shared/roundcubemail-0.8.1/config/main.inc.php
<?php
$rcmail_config 
= array();
$rcmail_config['debug_level'] = 1;
$rcmail_config['log_driver'] = 'file';
$rcmail_config['log_date_format'] = 'd-M-Y H:i:s O';
$rcmail_config['syslog_id'] = 'roundcube';
$rcmail_config['syslog_facility'] = LOG_USER;
$rcmail_config['smtp_log'] = true;
$rcmail_config['log_logins'] = true;
$rcmail_config['log_session'] = true;
$rcmail_config['sql_debug'] = false;
$rcmail_config['imap_debug'] = true;
$rcmail_config['ldap_debug'] = false;
$rcmail_config['smtp_debug'] = false;
$rcmail_config['default_host'] = '%d';
$rcmail_config['default_port'] = 143;
$rcmail_config['imap_auth_type'] = null;
$rcmail_config['imap_delimiter'] = null;
$rcmail_config['imap_ns_personal'] = null;
$rcmail_config['imap_ns_other']    = null;
$rcmail_config['imap_ns_shared']   = null;
$rcmail_config['imap_force_caps'] = false;
$rcmail_config['imap_force_lsub'] = false;
$rcmail_config['imap_force_ns'] = false;
$rcmail_config['imap_timeout'] = 60;
$rcmail_config['imap_auth_cid'] = null;
$rcmail_config['imap_auth_pw'] = null;
$rcmail_config['imap_cache'] = null;
$rcmail_config['messages_cache'] = '';
$rcmail_config['smtp_server'] = '%d';
$rcmail_config['smtp_port'] = 25;
$rcmail_config['smtp_user'] = '%u';
$rcmail_config['smtp_pass'] = '%p';
$rcmail_config['smtp_auth_type'] = '';
$rcmail_config['smtp_auth_cid'] = null;
$rcmail_config['smtp_auth_pw'] = null;
$rcmail_config['smtp_helo_host'] = '';
$rcmail_config['smtp_timeout'] = 0;
$rcmail_config['enable_installer'] = false;
$rcmail_config['support_url'] = '';
$rcmail_config['skin_logo'] = 'logo.png';
$rcmail_config['auto_create_user'] = true;
$rcmail_config['log_dir'] = '/var/log/roundcubemail/';
$rcmail_config['temp_dir'] = 'temp/';
$rcmail_config['message_cache_lifetime'] = '10d';
$rcmail_config['force_https'] = false;
$rcmail_config['use_https'] = false;
$rcmail_config['login_autocomplete'] = 0;
$rcmail_config['login_lc'] = 2;
$rcmail_config['skin_include_php'] = false;
$rcmail_config['display_version'] = false;
$rcmail_config['session_lifetime'] = 60;
$rcmail_config['session_domain'] = 'mydomain.ph';
$rcmail_config['session_name'] = 'rc-sessid';
$rcmail_config['session_storage'] = 'db';
$rcmail_config['memcache_hosts'] = null// e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' );
$rcmail_config['ip_check'] = false;
$rcmail_config['referer_check'] = false;
$rcmail_config['x_frame_options'] = 'sameorigin';
$rcmail_config['des_key'] = '+fmvJII!8Zp&D2S$c1lmoHUg';
$rcmail_config['username_domain'] = '%d';
$rcmail_config['mail_domain'] = '%d';
$rcmail_config['password_charset'] = 'ISO-8859-1';
$rcmail_config['sendmail_delay'] = 4;
$rcmail_config['max_recipients'] = 30
$rcmail_config['max_group_members'] = 30
$rcmail_config['useragent'] = 'Webmail';
$rcmail_config['product_name'] = 'RC Webmail';
$rcmail_config['include_host_config'] = false;
$rcmail_config['generic_message_footer'] = '';
$rcmail_config['generic_message_footer_html'] = '';
$rcmail_config['http_received_header'] = false;
$rcmail_config['http_received_header_encrypt'] = false;
$rcmail_config['mail_header_delimiter'] = NULL;
$rcmail_config['line_length'] = 72;
$rcmail_config['send_format_flowed'] = true;
$rcmail_config['dont_override'] = array();
$rcmail_config['identities_level'] = 1;
$rcmail_config['client_mimetypes'] = null;  # null == default
$rcmail_config['mime_magic'] = '/usr/share/misc/magic';
$rcmail_config['im_identify_path'] = null;
$rcmail_config['im_convert_path'] = null;
$rcmail_config['contact_photo_size'] = 160;
$rcmail_config['email_dns_check'] = false;
$rcmail_config['plugins'] = array('password','plugin_manager','calendar','sticky_notes');
$rcmail_config['message_sort_col'] = '';
$rcmail_config['message_sort_order'] = 'DESC';
$rcmail_config['list_cols'] = array('subject''status''fromto''date''size''flag''attachment');
$rcmail_config['language'] = null;
$rcmail_config['date_format'] = 'm-d-Y';
$rcmail_config['date_formats'] = array('m-d-y''Y-m-d''d-m-Y''Y/m/d''m/d/Y''d/m/Y''d.m.Y''j.n.Y');
$rcmail_config['time_format'] = 'H:i';
$rcmail_config['time_formats'] = array('G:i''H:i''g:i a''h:i A');
$rcmail_config['date_short'] = 'D H:i';
$rcmail_config['date_long'] = 'm-d-Y H:i';
$rcmail_config['drafts_mbox'] = 'Inbox.Drafts';
$rcmail_config['junk_mbox'] = 'Inbox.spam';
$rcmail_config['sent_mbox'] = 'Inbox.Sent';
$rcmail_config['trash_mbox'] = 'Inbox.Trash';
$rcmail_config['default_folders'] = array('INBOX''Inbox.Drafts''Inbox.Sent''Inbox.spam''Inbox.Trash');
$rcmail_config['create_default_folders'] = true;
$rcmail_config['protect_default_folders'] = true;
$rcmail_config['quota_zero_as_unlimited'] = false;
$rcmail_config['enable_spellcheck'] = false;
$rcmail_config['spellcheck_dictionary'] = false;
$rcmail_config['spellcheck_engine'] = 'googie';
$rcmail_config['spellcheck_uri'] = '';
$rcmail_config['spellcheck_languages'] = NULL;
$rcmail_config['spellcheck_ignore_caps'] = false;
$rcmail_config['spellcheck_ignore_nums'] = false;
$rcmail_config['spellcheck_ignore_syms'] = false;
$rcmail_config['recipients_separator'] = ',';
$rcmail_config['max_pagesize'] = 200;
$rcmail_config['min_keep_alive'] = 60;
$rcmail_config['upload_progress'] = false;
$rcmail_config['undo_timeout'] = 60;
$rcmail_config['address_book_type'] = 'sql';
$rcmail_config['ldap_public'] = array();
$rcmail_config['autocomplete_addressbooks'] = array('sql');
$rcmail_config['autocomplete_min_length'] = 3;
$rcmail_config['autocomplete_threads'] = 0;
$rcmail_config['autocomplete_max'] = 15;
$rcmail_config['address_template'] = '{street}<br/>{locality} {zipcode}<br/>{country} {region}';
$rcmail_config['addressbook_search_mode'] = 0;
$rcmail_config['default_charset'] = 'ISO-8859-1';
$rcmail_config['skin'] = 'larry';
$rcmail_config['mail_pagesize'] = 50;
$rcmail_config['addressbook_pagesize'] = 50;
$rcmail_config['addressbook_sort_col'] = 'surname';
$rcmail_config['addressbook_name_listing'] = 0;
$rcmail_config['timezone'] = 'auto';
$rcmail_config['prefer_html'] = true;
$rcmail_config['show_images'] = 1;
$rcmail_config['htmleditor'] = 2;
$rcmail_config['prettydate'] = true;
$rcmail_config['draft_autosave'] = 180;
$rcmail_config['preview_pane'] = true;
$rcmail_config['preview_pane_mark_read'] = 10;
$rcmail_config['logout_purge'] = false;
$rcmail_config['logout_expunge'] = false;
$rcmail_config['inline_images'] = true;
$rcmail_config['mime_param_folding'] = 0;
$rcmail_config['skip_deleted'] = true;
$rcmail_config['read_when_deleted'] = true;
$rcmail_config['flag_for_deletion'] = false;
$rcmail_config['keep_alive'] = 60;
$rcmail_config['check_all_folders'] = false;
$rcmail_config['display_next'] = false;
$rcmail_config['autoexpand_threads'] = 2;
$rcmail_config['top_posting'] = true;
$rcmail_config['strip_existing_sig'] = true;
$rcmail_config['show_sig'] = 1;
$rcmail_config['sig_above'] = true;
$rcmail_config['force_7bit'] = false;
$rcmail_config['search_mods'] = null;  // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));
$rcmail_config['addressbook_search_mods'] = null;  // Example: array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1);
$rcmail_config['delete_always'] = true;
$rcmail_config['delete_junk'] = true;
$rcmail_config['mdn_requests'] = 2;
$rcmail_config['mdn_default'] = 0;
$rcmail_config['dsn_default'] = 0;
$rcmail_config['reply_same_folder'] = false;
$rcmail_config['forward_attachment'] = false;
$rcmail_config['default_addressbook'] = null;
$rcmail_config['spellcheck_before_send'] = false;
$rcmail_config['autocomplete_single'] = false;
$rcmail_config['default_font'] = '';
?>

Where you see 'mydomain' this is a replacement I used instead of my domain name in the forum only. The actual files have my actual domain name in place of that.

Perhaps someone can see what I'm doing wrong?

Many thanks.

Peter
« Last Edit: August 28, 2012, 03:43:40 AM by snowweb »

Offline alec

  • Hero Member
  • *****
  • Posts: 1,178
Re: IMAP Error: Could not save message in Inbox.Drafts
« Reply #1 on: August 28, 2012, 02:17:33 AM »
$rcmail_config['drafts_mbox'] = 'Inbox.Drafts';
$rcmail_config['junk_mbox'] = 'Inbox.spam';
$rcmail_config['sent_mbox'] = 'Inbox.Sent';
$rcmail_config['trash_mbox'] = 'Inbox.Trash';
$rcmail_config['default_folders'] = array('INBOX', 'Inbox.Drafts', 'Inbox.Sent', 'Inbox.spam', 'Inbox.Trash');
Just change Inbox to INBOX in these optionsĀ·

Offline snowweb

  • Jr. Member
  • **
  • Posts: 35
Re: IMAP Error: Could not save message in Inbox.Drafts
« Reply #2 on: August 28, 2012, 03:43:13 AM »
Well spotted, thanks Alec!

That solved it.