从 iPhone 上的 Exchange IMAP 邮箱删除邮件

发布于 2024-07-04 18:08:38 字数 443 浏览 5 评论 0原文

我在 iPhone 上使用 IMAP 配置了辅助 Exchange 邮箱。 这一切似乎工作正常,除非在手机上删除邮件后,它仍然在 Outlook 中正常显示。 我在手机上设置“删除已删除的消息”设置似乎并不重要。

我了解这是由于手机未删除已删除的邮件以及 Exchange 在 Outlook 中显示已删除但未删除的邮件所致。

我正在寻找一种自动解决方案,该解决方案在删除手机上的邮件和在 Outlook 中消失之间没有很大的延迟。 从手机中删除后,该消息还应显示在“已删除邮件”中。


我考虑过创建一个后台进程,通过 IMAP 连接到邮箱并处于空闲模式,直到文件夹中存在已删除的邮件。 然后它将清除该文件夹并返回到空闲模式。 这不适用于多个文件夹(没有多个实例),但它可能可以完成这项工作。

关于支持 IMAP IDLE 的易于编写脚本的工具或库有什么建议吗?

I have a secondary Exchange mailbox configured on my iPhone using IMAP. This all appears to work fine except when a message is deleted on the phone, it still shows normally in Outlook. It does not seem to matter what I set the "remove deleted messages" setting to on the phone.

I understand this is due to a combination of the phone not expunging the deleted messages and Exchange showing deleted but not expunged messages in Outlook.

I'm looking for an automated solution to this that does not have a large delay between deleting the message on the phone and it disappearing in Outlook. The message should also show in the Deleted Items when deleted from the phone.


I've thought about creating a background process which connects to the mailbox via IMAP and sits in IDLE mode until there's a deleted message in the folder. It will then expunge the folder and return to IDLE mode. This wouldn't work with more than one folder (without multiple instances) but it would probably do the job.

Any recommendations on an easily scriptable tool or library that supports IMAP IDLE?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不再见 2024-07-11 18:08:39

我衷心推荐使用 Mail::MAPClient 模块通过简单的 Perl 客户端编写这样的过程。

#!/usr/bin/perl -w
use strict;
use Mail::IMAPClient;

# returns an unconnected Mail::IMAPClient object:
my $imap = Mail::IMAPClient->new(  
                    Server => $host,
                    User    => $id,
                    Password=> $pass,
)       or die "Cannot connect to $host as $id: $@";
$imap->expunge();

然后可以从 crontab 或其他调度程序运行它。

I can wholeheartedly recommend writing such a process with a simple Perl client using the Mail::MAPClient module.

#!/usr/bin/perl -w
use strict;
use Mail::IMAPClient;

# returns an unconnected Mail::IMAPClient object:
my $imap = Mail::IMAPClient->new(  
                    Server => $host,
                    User    => $id,
                    Password=> $pass,
)       or die "Cannot connect to $host as $id: $@";
$imap->expunge();

This can then be run from the crontab or some other scheduler.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文