{"id":4683,"date":"2014-06-13T16:15:01","date_gmt":"2014-06-13T14:15:01","guid":{"rendered":"http:\/\/www.limilabs.com\/blog\/?p=4683"},"modified":"2014-06-13T16:15:01","modified_gmt":"2014-06-13T14:15:01","slug":"sentbefore-doesnt-work-correctly-on-yahoo-imap-server","status":"publish","type":"post","link":"https:\/\/www.limilabs.com\/blog\/sentbefore-doesnt-work-correctly-on-yahoo-imap-server","title":{"rendered":"SENTBEFORE doesn&#8217;t work correctly on Yahoo IMAP server"},"content":{"rendered":"<p><em>Expression.SentBefore<\/em> doesn&#8217;t work correctly on Yahoo IMAP server.<\/p>\n<p>IMAP protocol equivalent of this expression is SENTBEFORE. It examines email&#8217;s Date: header.<\/p>\n<p>It appears that although SENTSINCE doesn&#8217;t work, SENTSINCE (<em>Expression.SentSince<\/em>), BEFORE (<em>Expression.Before<\/em>) and SINCE (<em>Expression.Since<\/em>) do work correctly. BEFORE and SINCE use email&#8217;s INTERNALDATE recorded by the IMAP server instead of Date: header.<\/p>\n<p><code>C: 0895789b79c64868 UID FETCH 14622 (UID RFC822.SIZE INTERNALDATE ENVELOPE)<br \/>\nS: * 1 FETCH (UID 14622<br \/>\n    INTERNALDATE <strong>\"10-Jun-2014 13:02:08 +0000\"<\/strong><br \/>\n    ENVELOPE (<strong>\"Wed, 10 Jun 2014 15:02:08 +0000\"<\/strong> \"test2\" NIL NIL NIL NIL NIL NIL NIL NIL))<br \/>\nS: 0895789b79c64868 OK UID FETCH completed<br \/>\nC: 2b535791f07e4515 UID SEARCH <strong>BEFORE 12-Jun-2014<\/strong><br \/>\n<font style=\"color: green\">S: * SEARCH 14622 <\/font><br \/>\nS: 2b535791f07e4515 OK UID SEARCH completed<br \/>\nC: b726a850e61c4082 UID SEARCH <strong>SENTBEFORE 12-Jun-2014<\/strong><br \/>\n<font style=\"color: red\">S: * SEARCH <\/font><br \/>\nS: b726a850e61c4082 OK UID SEARCH completed<br \/>\nC: 3e479e518dc04915 UID SEARCH <strong>BEFORE 13-Jun-2014<\/strong><br \/>\n<font style=\"color: green\">S: * SEARCH 14622 <\/font><br \/>\nS: 3e479e518dc04915 OK UID SEARCH completed<br \/>\nC: 31b7f9ffbe4f4934 UID SEARCH <strong>SENTBEFORE 13-Jun-2014<\/strong><br \/>\n<font style=\"color: red\">S: * SEARCH <\/font><br \/>\nS: 31b7f9ffbe4f4934 OK UID SEARCH completed<br \/>\nC: 2fd2d29b90a24f16 LOGOUT<br \/>\nS: * BYE IMAP4rev1 Server logging out<br \/>\nS: 2fd2d29b90a24f16 OK LOGOUT completed<\/code><\/p>\n<p>The fact is that Yahoo IMAP implantation is buggy. Once, the server assigned &#8220;17-Jan-1970 05:37:46 +0000&#8221; as an INTERNALDATE to one of my emails, just to change that on the next login.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Expression.SentBefore doesn&#8217;t work correctly on Yahoo IMAP server. IMAP protocol equivalent of this expression is SENTBEFORE. It examines email&#8217;s Date: header. It appears that although SENTSINCE doesn&#8217;t work, SENTSINCE (Expression.SentSince), BEFORE (Expression.Before) and SINCE (Expression.Since) do work correctly. BEFORE and SINCE use email&#8217;s INTERNALDATE recorded by the IMAP server instead of Date: header. C: 0895789b79c64868 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[98,28,69],"class_list":["post-4683","post","type-post","status-publish","format-standard","hentry","category-news","tag-bug","tag-imap","tag-yahoo"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/4683"}],"collection":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/comments?post=4683"}],"version-history":[{"count":8,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/4683\/revisions"}],"predecessor-version":[{"id":4692,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/4683\/revisions\/4692"}],"wp:attachment":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/media?parent=4683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/categories?post=4683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/tags?post=4683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}