<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hy,<br>
<br>
Today, and yesterday, I had search an error, which is a great
problem of one of my clients, and if I think about it, probably for
others, too. (And here comes the solution/bugfix, because 6.0 don't
fix this at this moment)<br>
<br>
If I configure the MailScanner with an Google Mail Account, it set
the \SEEN flag on every mail, it scanned.<br>
But this is not an error of google mail, because they follow the
IMAP specification in this point.<br>
<br>
This specification say, that every fetch of the body set the read
state, if the body request is done without the PEEK flag.<br>
<br>
Vtiger fetch the maibody with the imap_body or imap_fetchbody
function and don't set this PEEK flag.<br>
<br>
I think this is a bug, because there are a special option to set the
\SEEN flag in mailscanner, after scanning.<br>
<br>
You have to change only two lines to change this behaviour. Later, I
will upload an patch into trac, too.<br>
In file modules/Settings/MailScanner/core/MailRecord.php there are
the function calls <br>
<br>
imap_fetchbody($imap,$messageid,$partno): // multipart<br>
imap_body($imap,$messageid); // not
multipart<br>
<br>
and you should add the last parameter:<br>
<br>
imap_fetchbody($imap,$messageid,$partno, FT_PEEK): //
multipart<br>
imap_body($imap,$messageid, FT_PEEK); //
not multipart<br>
<br>
This sould be work also with all correct configured mailservers and
don't set the read state!<br>
<br>
Stefan<br>
<br>
<div class="moz-signature">---<br>
<small><small><b>Web</b>: <a href="http://www.stefanwarnat.de">http://vtiger.stefanwarnat.de</a></small></small><br>
<small><small><b>Xing</b>: <a
href="https://www.xing.com/profile/Stefan_Warnat2">https://www.xing.com/profile/Stefan_Warnat2</a></small></small><br>
<small><small><b>eMail</b>: <a href="mailto:ich@stefanwarnat.de">ich@stefanwarnat.de</a></small></small><br>
</div>
</body>
</html>