Author Topic: message with attachment is sent but not copied into sent folder  (Read 8291 times)

Offline andislack

  • Newbie
  • *
  • Posts: 3
Hi,

I can send messages with an without messages - everything is fine so far, no errors, but messages with attachments are not copied into the sent folder.
Messages without attachment are copied fine into the sent folder.
This is reproducable everytime.

No errors in mail.log (debian lenny, postfix, cyrus imap) and apache log.

Is this issue known? In which part of the rc-source is the "imap move/copy to the sent folder" methods located? So that I can debug also on my own.

Thanks for help
andi
« Last Edit: June 25, 2010, 04:10:44 AM by andislack »

Offline dziobak

  • Full Member
  • ***
  • Posts: 184
message with attachment is sent but not copied into sent folder
« Reply #1 on: June 25, 2010, 04:28:26 AM »
look in error.log in /logs

Offline andislack

  • Newbie
  • *
  • Posts: 3
message with attachment is sent but not copied into sent folder
« Reply #2 on: June 25, 2010, 05:32:10 AM »
open_basedir restricted to save in /tmp ( move_uploaded_file())

I disabled open_basedir and the msg is still not saved in Sent folder:
[25-Jun-2010 11:22:16 +0200]: IMAP Error: Could not save message in Sent in /usr/share/roundcube/program/steps/mail/sendmail.inc on line 634 (POST /roundcube/?_task=mail&_action=send)

A logging shows this just before $saved = $IMAP->save_message(...) ~615:
       raise_error(array('code' => 800'type' => 'imap',
	
    
'file' => __FILE__'line' => __LINE__,
            
'message' => "DEBUG_DEBUG in $store_target$msg$headers$mailbody_file"), TRUEFALSE);



Content-Type: multipart/mixed;
 boundary="=_c6b2884f0fdbdb0a30543ad1a322ca8d"
Date: Fri, 25 Jun 2010 11:22:16 +0200
From: xxx
To:
Subject: ergrth
Organization: xxx
Message-ID:
X-Sender: xxx@xxx.de
User-Agent: RoundCube Webmail/0.4-beta
, /usr/share/roundcube/temp/rcmMsgNaaH6g in /usr/share/roundcube/program/steps/mail/sendmail.inc on line 620 (POST /roundcube/?_task=mail&_action=send)

/usr/share/roundcube/temp is world writeable and owned by root (default)

Any ideas?

Offline dziobak

  • Full Member
  • ***
  • Posts: 184
message with attachment is sent but not copied into sent folder
« Reply #3 on: June 25, 2010, 09:30:26 AM »
try to copy/move message to sent folder.

if it works then enable imap_debug in main config
and post it here

if not you have problem with permissions...

Offline Bittone

  • Newbie
  • *
  • Posts: 1
same problem
« Reply #4 on: July 06, 2010, 12:38:50 PM »
Hi there,
I'm experiencing the very same problem.. any news?
Bittone

Offline Granada

  • Jr. Member
  • **
  • Posts: 34
message with attachment is sent but not copied into sent folder
« Reply #5 on: August 11, 2010, 10:06:31 AM »
We are currently about to install RC 0.4 final on a new RHEL 5 Server and I experienced the same misfeature.

Mails without any kind of attachement are being stored in Sent or Drafts, but whenever you attach a file to a message, trying to save it in Drafts or let it be saved in Sent after sending will fail, even after you remove the attachement from the mail.

The error log says:

Code: [Select]

[11-Aug-2010 16:00:48 +0200]: IMAP Error: Could not save message in INBOX.Drafts in /www/webmail/program/steps/mail/sendmail.inc on line 637 (POST /?_task=mail&_action=send)
[...]
[11-Aug-2010 16:01:00 +0200]: IMAP Error: Could not save message in INBOX.Sent in /www/webmail/program/steps/mail/sendmail.inc on line 637 (POST /?_task=mail&_action=send)


Our test instance with RC 0.4 beta ran on another machine with Solaris and did well, so tracking down the source of failure becomes more difficult ...

Regards
Ruediger

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,566
    • http://SKaero.com/
message with attachment is sent but not copied into sent folder
« Reply #6 on: August 11, 2010, 11:25:18 AM »
Can you enable $rcmail_config['imap_debug'] in /config/main.inc.php and post the imap debug log?
« Last Edit: August 11, 2010, 11:31:52 AM by skaero »

Offline Alex Molinari

  • Newbie
  • *
  • Posts: 1
message with attachment is sent but not copied into sent folder
« Reply #7 on: August 11, 2010, 01:00:54 PM »
Hello,
sorry if I'm not fully in topic, but my issue is very similar.
All messages (with or without attachments) are sent and saved in the "Sent" folder, EXCEPT those created using the "Reply Button" when replying to a message opened from the "Inbox"
These messages are successfully sent (and delivered) by the SMTP server, but not saved in the "Sent" folder.
Some additional infos:
- RC Version: RELEASE 0.4-stable
- PHP 5.2.10 / IIS 6.0 on Win2003 R2 SE (with PHP extension IMAP c-Client- Version 2004 )
- IMAP Server: IMAIL 9.10
- RC Log stuff:
error.log
IMAP Error: Could not save message in mail/Sent - Error in E:\Web\RoundCube\program\steps\mail\sendmail.inc on line 637 (POST /RCube/index.php?_task=mail&_action=send)
imap.log
S: * OK IMAP4 Server (IMail 9.10)
 C: cp01 CAPABILITY
 S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=CRAM-MD5 AUTH=PLAIN AUTH=LOGIN
 S: cp01 OK CAPABILITY completed
 C: a000 AUTHENTICATE CRAM-MD5
 S: + PDIyNzA4LjQ1Mjc0NzI2NUBrbWFpbD4=
 C: YW1vbGluYXJpQGt5cm9zLm5ldCAxMjNmYTY5MmY5N2UzNWNjMzY4N2UyMWU3ZGNhYjQ2MQ==
 S: a000 NO AUTHENTICATE Unsupported authentication mechanism, credentials rejected
 C: a001 LOGIN "************" "****************"
 S: a001 OK LOGIN completed
 C: sel1 SELECT "INBOX"
 S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
 S: * 54 EXISTS
 S: * 0 RECENT
 S: * OK [UIDVALIDITY 1197420933] UIDs valid
 S: * OK [UIDNEXT 497459457] Predicted next UID
 S: sel1 OK [READ-WRITE] SELECT completed
 C: flg UID STORE 497459456 +FLAGS (\Answered)
 S: * 54 FETCH (FLAGS (\ANSWERED \SEEN))
 S: flg OK UID Completed
 C: lsb LSUB "" "mail/Sent"
 S: * LSUB (\Marked) "/" mail/Sent
 S: lsb OK LSUB completed
 C: a APPEND "mail/Sent" (\Seen) {758}
 S: * 54 EXISTS
 C: I LOGOUT
 S: * OK IMAP4 Server (IMail 9.10)
 C: cp01 CAPABILITY
 S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=CRAM-MD5 AUTH=PLAIN AUTH=LOGIN
 S: cp01 OK CAPABILITY completed
 C: a000 AUTHENTICATE CRAM-MD5
 S: + PDI0MTM5LjQ1Mjc0NzcwM0BrbWFpbD4=
 C: YW1vbGluYXJpQGt5cm9zLm5ldCA0ODg3OTNiZjQwNDQ2YzFlMjcyY2Y2MmE2OWFlZDFkZQ==
 S: a000 NO AUTHENTICATE Unsupported authentication mechanism, credentials rejected
 C: a001 LOGIN "****************" "******************"
 S: a001 OK LOGIN completed
 C: lsb LSUB "" "*"
 S: * LSUB (\Unmarked) "/" mail/Sent
 S: * LSUB (\Marked) "/" mail/Trash
 S: * LSUB (\Marked) "/" mail/Drafts
 S: * LSUB (\Marked) "/" mail/Misc
 S: * LSUB (\Marked) "/" Sent
 S: * LSUB (\Marked) "/" Trash
 S: * LSUB (\Marked) "/" Junk
 S: lsb OK LSUB completed
 C: I LOGOUT
 S: * OK IMAP4 Server (IMail 9.10)
 C: cp01 CAPABILITY
 S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=CRAM-MD5 AUTH=PLAIN AUTH=LOGIN
 S: cp01 OK CAPABILITY completed
 C: a000 AUTHENTICATE CRAM-MD5
 S: + PDI2OTk2LjQ1Mjc0ODU3OEBrbWFpbD4=
 C: YW1vbGluYXJpQGt5cm9zLm5ldCA4YmYyMjVhODk4N2Y1ODIzYzZjNGY0NTA2NzJlMWNjMg==
 S: a000 NO AUTHENTICATE Unsupported authentication mechanism, credentials rejected
 C: a001 LOGIN "*****************" "*********************"
 S: a001 OK LOGIN completed
 C: sel1 SELECT "INBOX"
 S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
 S: * 54 EXISTS
 S: * 0 RECENT
 S: * OK IMAP4 Server (IMail 9.10)
 C: cp01 CAPABILITY
 S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=CRAM-MD5 AUTH=PLAIN AUTH=LOGIN
 S: * OK [UIDVALIDITY 1197420933] UIDs valid
 S: cp01 OK CAPABILITY completed
 C: a000 AUTHENTICATE CRAM-MD5
 S: * OK [UIDNEXT 497459457] Predicted next UID
 S: + PDI3MDk3LjQ1Mjc0ODYwOUBrbWFpbD4=
 S: sel1 OK [READ-WRITE] SELECT completed
 C: fuid FETCH 54 (UID)
 C: YW1vbGluYXJpQGt5cm9zLm5ldCA3NjlmNjE5MzUyNjZiZTk0MjE5MzNkMjJmNDZiMzY3MA==
 S: * 54 FETCH (UID 497459456)
 S: fuid OK FETCH completed
 C: fhi0 FETCH 1:* (INTERNALDATE BODY.PEEK[HEADER.FIELDS (DATE)])
 S: a000 NO AUTHENTICATE Unsupported authentication mechanism, credentials rejected
 C: a001 LOGIN "***********************" "**************************"
 S: * 1 FETCH (INTERNALDATE "3-Aug-2010 09:48:19 +0200" BODY[HEADER.FIELDS (DATE)] {40}

Offline Granada

  • Jr. Member
  • **
  • Posts: 34
message with attachment is sent but not copied into sent folder
« Reply #8 on: August 12, 2010, 04:50:28 AM »
My imap-log in RC says the following interesting thing:

[12-Aug-2010 10:12:03 +0200]: S: a NO Message contains bare newlines
[12-Aug-2010 10:12:03 +0200]: C: I LOGOUT

The problem seems to bei PHP-related, as a bare testinstallation of RC0.4 on the previously mentioned Solaris server works fine!

Regards
RUediger

Offline Granada

  • Jr. Member
  • **
  • Posts: 34
message with attachment is sent but not copied into sent folder
« Reply #9 on: August 12, 2010, 07:20:53 AM »
Uh oh - I found a solution: disable (i.e. rebuild PHP without) suhosin solves our problem. But it remains strange: on my own private server (OpenSuSE, PHP 5.2.12 with suhosin) I did not discover any problems using RC0.4 (or older/newer/SVN-versions)

Regards
Ruediger

Offline FranzKraus84

  • Newbie
  • *
  • Posts: 3
message with attachment is sent but not copied into sent folder
« Reply #10 on: September 07, 2010, 08:48:32 AM »
Hello. I seem to have the same problem.
I use the 0.4 stable version.
Sending emails (with or without attachments) is always possible.
But saving the mails to the sent folder fails.
Same when trying to save to drafts
(open an empty message, upload attachment and try to save)

Found a way to pass this, but this cannot be seen as a solution.
When using 64 / 128 MB memory limit, it is not possible to save
even the smallest files (i.e. an empty txt attachment)
When i raise the memory limit to 512 MB, messages with approximitaly
5 MB can be saved to the sent / draft folders. Further increasing the limit
to 1024 MB raises the max. size to s.thg. like 10-20 MB too.
But i need to save messages with a maximum size of 50 MB.
To do so, i had to raise the memory limit to 2048 MB !
This way it IS possible to save the files to the sent / drafts folders,
but this surely cannot be seen as a solution.

So i ask you if there is actually another way to fix it?
Or maybe the hint with the memory helps a litte bit for other conclusions...?

Thank you for any hint / advice! :-)

Offline FranzKraus84

  • Newbie
  • *
  • Posts: 3
message with attachment is sent but not copied into sent folder
« Reply #11 on: September 08, 2010, 07:43:59 AM »
Found a solution in another forum.
For all of you with similiar problems, just try to edit your config file
main.inc.php
and edit the following setting

$rcmail_config['mail_header_delimiter'] = "\r\n";

Now it is possible to save mails in drafts / sent without increasing the memory limit

Hope this helps you too! :-)

Offline andislack

  • Newbie
  • *
  • Posts: 3
message with attachment is sent but not copied into sent folder
« Reply #12 on: September 09, 2010, 04:52:53 AM »
no solution mentioned here works for me.
Disable suhosin does not work - same behavior.
Increase memory_limit (up to 1024) does not work for a just 12kb attachment and the mail_header_delimiter setting to \r\n also does not work, the attachment is not shown as attachment anymore -> unusable.

So for me the problem is still active.

PHP 5.2.6-1+lenny9 with (and without) Suhosin-Patch 0.9.6.2

Offline cyc

  • Newbie
  • *
  • Posts: 5
message with attachment is sent but not copied into sent folder
« Reply #13 on: October 06, 2010, 05:58:42 AM »
Quote from: FranzKraus84;29912
Found a solution in another forum.
$rcmail_config['mail_header_delimiter'] = "\r\n";

Now it is possible to save mails in drafts / sent without increasing the memory limit

Hope this helps you too! :-)

Thanks, this seems to help on Ubuntu 10.04 LTS! O0

Offline zamri

  • Jr. Member
  • **
  • Posts: 16
message with attachment is sent but not copied into sent folder
« Reply #14 on: November 02, 2010, 10:26:04 PM »
Some of my users couldn't see list of emails in Sent folder but in INBOX folder  ok. I found out that the INBOX has Threaded option checked but not Sent. After I checked it for the Sent folder everything ok.