sb_imapfilter with Hotmail causes loss of emails

Skip Montanaro <[email protected]> Mon, 1 Feb 2021 15:40:37 -0600
Newsgroups gmane.mail.spam.spambayes.devel
Message-ID <CANc-5UxLVz94=EA9nd3R8A8WWSt83OFRTqTZ0MmUQiSdnWwsQg@mail.gmail.com>
--===============3862408214235450225==
Content-Type: multipart/alternative; boundary="0000000000001e8e3905ba4d32d3"

--0000000000001e8e3905ba4d32d3
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I'm passing this along in case there is anyone still listening to
spambayes-dev who might have some relevant/recent IMAP experience. In a
non-SpamBayes application I just dumped imaplib in favor of IMAPClient in
part because I didn't want to mess with IMAP4, so I'm not able to help
(willinging, at least). I will poke around a bit though.

Thanks,

Skip

---------- Forwarded message ---------
From: Alexei Potashnik <notifications-9UaJU3cA/F/[email protected]>
Date: Mon, Feb 1, 2021 at 2:38 PM
Subject: Re: [smontanaro/spambayes] sb_imapfilter with Hotmail causes loss
of emails (#6)
To: smontanaro/spambayes <[email protected]>
Cc: Skip Montanaro <[email protected]>, Comment <
[email protected]>


are you implying that you have used sb_imapfilter with other IMAP servers
and not experienced message lossage
No, this is my first time trying sb_imapfilter

My expectation is that SpamBayes should never delete email
I suspect this comment in sb_imapfilter points to what might be happening:

"""Warnings:
o We never delete mail, unless you use the -e/purge option, but we do
mark a lot as deleted, and your mail client might remove that for
you. We try to only mark as deleted once the moved/altered message
is correctly saved, but things might go wrong. We *strongly*
recommend that you try this script out on mail that you can recover
from somewhere else, at least at first.
"""

Now if I look at gmail vs hotmail IMAP settings there are these extra
options that gmail provides and hotmail doesn't:

When I mark a message in IMAP as deleted:
Auto-Expunge on - Immediately update the server. (default)
Auto-Expunge off - Wait for the client to update the server.

When a message is marked as deleted and expunged from the last visible IMAP
folder:
Archive the message (default)
Move the message to the Trash
Immediately delete the message forever

I have a feeling hotmail behaves like gmail with "Auto-Expunge on" and
"Immediately delete the message forever".

I'm wondering if someone with IMAP expertise can comment on the above
theory or maybe propose a workaround for hotmail.

Can you attach your config file with your Hotmail credentials xxxxxx-d out
[imap]
server:outlook.office365.com
use_ssl:True
username:
filter_folders:Inbox
spam_folder:Inbox/spam.90
unsure_folder:Inbox/spam
ham_train_folders:Inbox/train.ham
spam_train_folders:Inbox/train.spam

=E2=80=94
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/smontanaro/spambayes/issues/6#issuecomment-771142187>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2E3IKXUEUAHEZMFM7FBXLS=
44GM7ANCNFSM4W277FCQ>
.

--0000000000001e8e3905ba4d32d3
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:arial,sa=
ns-serif">I&#39;m passing this along in case there is anyone still listenin=
g to spambayes-dev who might have some relevant/recent IMAP experience. In =
a non-SpamBayes application I just dumped imaplib in favor of IMAPClient in=
 part because I didn&#39;t want to mess with IMAP4, so I&#39;m not able to =
help (willinging, at least). I will poke around a bit though.</div><div cla=
ss=3D"gmail_default" style=3D"font-family:arial,sans-serif"><br></div><div =
class=3D"gmail_default" style=3D"font-family:arial,sans-serif">Thanks,</div=
><div class=3D"gmail_default" style=3D"font-family:arial,sans-serif"><br></=
div><div class=3D"gmail_default" style=3D"font-family:arial,sans-serif">Ski=
p</div><div class=3D"gmail_default" style=3D"font-family:arial,sans-serif">=
<br></div><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">=
---------- Forwarded message ---------<br>From: <strong class=3D"gmail_send=
ername" dir=3D"auto">Alexei Potashnik</strong> <span dir=3D"auto">&lt;<a hr=
ef=3D"mailto:notifications-9UaJU3cA/F/[email protected]" target=3D"_blank">notifications@gith=
ub.com</a>&gt;</span><br>Date: Mon, Feb 1, 2021 at 2:38 PM<br>Subject: Re: =
[smontanaro/spambayes] sb_imapfilter with Hotmail causes loss of emails (#6=
)<br>To: smontanaro/spambayes &lt;<a href=3D"mailto:[email protected]=
b.com" target=3D"_blank">[email protected]</a>&gt;<br>Cc: Skip M=
ontanaro &lt;<a href=3D"mailto:[email protected]" target=3D"_blank">=
[email protected]</a>&gt;, Comment &lt;<a href=3D"mailto:comment@nor=
eply.github.com" target=3D"_blank">[email protected]</a>&gt;<br></=
div><br><br><p></p>
<blockquote>
<p>are you implying that you have used sb_imapfilter with other IMAP server=
s and not experienced message lossage<br>
No, this is my first time trying sb_imapfilter</p>
</blockquote>
<blockquote>
<p>My expectation is that SpamBayes should never delete email<br>
I suspect this comment in sb_imapfilter points to what might be happening:<=
/p>
</blockquote>
<p>&quot;&quot;&quot;Warnings:<br>
o We never delete mail, unless you use the -e/purge option, but we do<br>
mark a lot as deleted, and your mail client might remove that for<br>
you.  We try to only mark as deleted once the moved/altered message<br>
is correctly saved, but things might go wrong.  We <em>strongly</em><br>
recommend that you try this script out on mail that you can recover<br>
from somewhere else, at least at first.<br>
&quot;&quot;&quot;</p>
<p>Now if I look at gmail vs hotmail IMAP settings there are these extra op=
tions that gmail provides and hotmail doesn&#39;t:</p>
<p>When I mark a message in IMAP as deleted:<br>
Auto-Expunge on - Immediately update the server. (default)<br>
Auto-Expunge off - Wait for the client to update the server.</p>
<p>When a message is marked as deleted and expunged from the last visible I=
MAP folder:<br>
Archive the message (default)<br>
Move the message to the Trash<br>
Immediately delete the message forever</p>
<p>I have a feeling hotmail behaves like gmail with &quot;Auto-Expunge on&q=
uot; and &quot;Immediately delete the message forever&quot;.</p>
<p>I&#39;m wondering if someone with IMAP expertise can comment on the abov=
e theory or maybe propose a workaround for hotmail.</p>
<blockquote>
<p>Can you attach your config file with your Hotmail credentials xxxxxx-d o=
ut<br>
[imap]<br>
server:<a href=3D"http://outlook.office365.com" target=3D"_blank">outlook.o=
ffice365.com</a><br>
use_ssl:True<br>
username:<br>
filter_folders:Inbox<br>
spam_folder:Inbox/spam.90<br>
unsure_folder:Inbox/spam<br>
ham_train_folders:Inbox/train.ham<br>
spam_train_folders:Inbox/train.spam</p>
</blockquote>

<p style=3D"font-size:small;color:#666">=E2=80=94<br>You are receiving this=
 because you commented.<br>Reply to this email directly, <a href=3D"https:/=
/github.com/smontanaro/spambayes/issues/6#issuecomment-771142187" target=3D=
"_blank">view it on GitHub</a>, or <a href=3D"https://github.com/notificati=
ons/unsubscribe-auth/AA2E3IKXUEUAHEZMFM7FBXLS44GM7ANCNFSM4W277FCQ" target=
=3D"_blank">unsubscribe</a>.<img src=3D"https://github.com/notifications/be=
acon/AA2E3IPUUSEBUBQXQET3BYTS44GM7A5CNFSM4W277FC2YY3PNVWWK3TUL52HS4DFVREXG4=
3VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFX3LEKY.gif" height=3D"1" width=3D"1" alt=
=3D""></p>
</div></div>

--0000000000001e8e3905ba4d32d3--

--===============3862408214235450225==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
spambayes-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/spambayes-dev

--===============3862408214235450225==--