<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tony Bhimani's Blog &#187; IMAP</title>
	<atom:link href="http://www.tonybhimani.com/tag/imap/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tonybhimani.com</link>
	<description>Where I Share my Linux and Programming Experiences</description>
	<lastBuildDate>Sun, 01 Jun 2008 02:48:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Dovecot IMAP SquirrelMail Cannot Append Error</title>
		<link>http://www.tonybhimani.com/2008/05/31/dovecot-imap-squirrelmail-cannot-append-error/</link>
		<comments>http://www.tonybhimani.com/2008/05/31/dovecot-imap-squirrelmail-cannot-append-error/#comments</comments>
		<pubDate>Sun, 01 Jun 2008 02:48:34 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SquirrelMail]]></category>
		<category><![CDATA[IMAP]]></category>

		<guid isPermaLink="false">http://www.tonybhimani.com/?p=29</guid>
		<description><![CDATA[If you&#8217;re a user of SquirrelMail and Dovecot 1.x, you may run across this error &#8220;ERROR: Bad or malformed request.  Server responded: Error in IMAP command APPEND:&#8221; after sending a message. The composed email message still sends, but you get that annoying error. I don&#8217;t know exactly what caused it other than a possible [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re a user of SquirrelMail and Dovecot 1.x, you may run across this error &#8220;<strong>ERROR: Bad or malformed request.  Server responded: Error in IMAP command APPEND:</strong>&#8221; after sending a message. The composed email message still sends, but you get that annoying error. I don&#8217;t know exactly what caused it other than a possible Dovecot upgrade, but nevertheless, this is how to alter SquirrelMail to resolve the issue.</p>
<p>In the <em>functions</em> directory of your SquirrelMail install, open the <strong>imap_general.php</strong> file.</p>
<p>Alter the <strong>sqimap_append</strong> PHP function by commenting out the line that starts with the fputs function and type in the replacement so it reads as:</p>
<pre class="code">function sqimap_append ($imap_stream, $sent_folder, $length) {
//    fputs ($imap_stream, sqimap_session_id() . " APPEND \"$sent_folder\" (\\Seen) \{$length}\r\n");
    fputs ($imap_stream, sqimap_session_id() . " APPEND \"$sent_folder\" (\\Seen) {" . $length . "}\r\n");
    $tmp = fgets ($imap_stream, 1024);
    sqimap_append_checkresponse($tmp, $sent_folder);
}</pre>
<p>Save the changes and the problem should be solved. FYI: Upgrading to the latest version of SquirrelMail will resolve this issue as well, but applying this code change is less of a hassle.</p>
<p><strong>Fix Source:</strong> <a href="http://xmailforum.homelinux.net/index.php?showtopic=3023" title="XMail Forum -&gt; dovecot imap cannot append">XMail Forum -&gt; dovecot imap cannot append</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tonybhimani.com/2008/05/31/dovecot-imap-squirrelmail-cannot-append-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
