{"id":174,"date":"2011-05-05T11:20:44","date_gmt":"2011-05-05T11:20:44","guid":{"rendered":"http:\/\/www.plugged.in\/?p=174"},"modified":"2011-05-05T11:20:44","modified_gmt":"2011-05-05T11:20:44","slug":"push-email-with-dovecot-mail-server","status":"publish","type":"post","link":"https:\/\/www.veriteknik.net.tr\/en\/push-email-with-dovecot-mail-server\/","title":{"rendered":"Push Email with Dovecot Mail Server"},"content":{"rendered":"<p>I have been looking a way to push e-mail since i got my iphone. Just found something for my test server and it works for me\u2026<\/p>\n<p>I have a webserver running cPanel, Dovecot and suPHP. ( centOS 5.4, WHM 11.25 )<\/p>\n<p><strong>Steps:<\/strong><\/p>\n<p>1- You can download z-push from <a href=\"http:\/\/developer.berlios.de\/project\/showfiles.php?group_id=8963\" target=\"_blank\">here<\/a>.<\/p>\n<p>2- Upload z-push to \/usr\/local\/apache\/htdocs<\/p>\n<p>3- Change ownership to nobody because it fails if you leave it as root<\/p>\n<p>4- If you are using suPHP, then Modify index.php<\/p>\n<p>Comment out $requestheaders = apache_request_headers(); and replace it with<\/p>\n<blockquote><p>function getHeaders()<br \/>\n{<br \/>\n$headers = array();<br \/>\nforeach ($_SERVER as $k =&gt; $v)<br \/>\n{<br \/>\nif (substr($k, 0, 5) == &#8220;HTTP_&#8221;)<br \/>\n{<br \/>\n$k = str_replace(&#8216;_&#8217;, &#8216; &#8216;, substr($k, 5));<br \/>\n$k = str_replace(&#8216; &#8216;, &#8216;-&#8216;, ucwords(strtolower($k)));<br \/>\n$headers[$k] = $v;<br \/>\n}<br \/>\n}<br \/>\nreturn $headers;<br \/>\n}<br \/>\n$requestheaders = getHeaders();<\/p><\/blockquote>\n<p>5- Modify config.php<\/p>\n<p>Change <strong>$BACKEND_PROVIDER = \u201cBackendICS\u201d; to $BACKEND_PROVIDER = \u201cBackendIMAP\u201d;<\/strong><\/p>\n<p>6- Add the alias to httpd. conf as explained in the config file, but use \/usr\/local\/apache\/htdocs instead of \/var\/www<\/p>\n<p>7- Restart Apache<\/p>\n<p>8- Go to your iPhone and set up your e-mail account as a Microsoft Exchange account. (Be sure to sync \u201cAll messages\u201d or else you\u2019ll be deleting things twice.)<\/p>\n<p>9- Thats All. You now have push email on your iPhone..<\/p>\n<p>10- You may need to modify backend\/diffbackend.php to make it delete properly.<\/p>\n<p>Find the following code:<\/p>\n<blockquote><p>function ImportMessageMove($id, $newfolder) {<br \/>\nreturn true;<br \/>\n}<\/p><\/blockquote>\n<p>Change to:<\/p>\n<blockquote><p>function ImportMessageMove($id, $newfolder) {<br \/>\n\/\/do nothing if it is in a dummy folder<br \/>\nif ($this-&gt;_folderid == SYNC_FOLDER_TYPE_DUMMY)<br \/>\nreturn true;<\/p>\n<p>\/\/ See if there&#8217;s a conflict<br \/>\n$conflict = $this-&gt;isConflict(&#8220;move&#8221;, $this-&gt;_folderid, $id);<\/p>\n<p>\/\/ Update client state<br \/>\n$change = array();<br \/>\n$change[&#8220;id&#8221;] = $id;<br \/>\n$change[&#8220;newfolder&#8221;] = $newfolder;<br \/>\n$this-&gt;updateState(&#8220;move&#8221;, $change);<\/p><\/blockquote>\n<p>P.S. I am not the author of these information. These were all found in the z-push forums.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been looking a way to push e-mail since i got my iphone. Just found something for my test server and it works for me\u2026 I have a webserver running cPanel, Dovecot and suPHP. ( centOS 5.4, WHM 11.25 ) Steps: 1- You can download z-push from here. 2- Upload z-push to \/usr\/local\/apache\/htdocs 3- [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[439],"tags":[436,437,438,440],"yst_prominent_words":[],"class_list":["post-174","post","type-post","status-publish","format-standard","hentry","category-whm-cpanel","tag-cpanel","tag-push-email","tag-whm","tag-z-push"],"jetpack_featured_media_url":"","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Cevdet Kaymaz","author_link":"https:\/\/www.veriteknik.net.tr\/en\/author\/cevdet-kaymaz\/"},"uagb_comment_info":0,"uagb_excerpt":"I have been looking a way to push e-mail since i got my iphone. Just found something for my test server and it works for me\u2026 I have a webserver running cPanel, Dovecot and suPHP. ( centOS 5.4, WHM 11.25 ) Steps: 1- You can download z-push from here. 2- Upload z-push to \/usr\/local\/apache\/htdocs 3-&hellip;","_links":{"self":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/comments?post=174"}],"version-history":[{"count":0,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/174\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/media?parent=174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/categories?post=174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/tags?post=174"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/yst_prominent_words?post=174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}