如何从我的死信文件夹中获取报告?

发布于 2024-11-26 21:24:41 字数 154 浏览 2 评论 0原文

使用 Win Server 2003,我们每次发送 20 万多封电子邮件时都会发送一次,显然死信文件夹会被填满。删除它们很容易,但我开始寻找某种方法来实际从坏邮件中获取一些统计数据,但我找不到任何工具?

我如何找出有多少未交付/延迟交付以及可能的每个列表。或者我是从底部看这个?

Using Win Server 2003 we send once every while we send out 200k+ emails and obviously the badmail folder get filled up. Its easy to delete them but I started looking for some way to actually get some statistics back from the bad mail but I cannot find any tools?

How can I find out how many Non Deliveries/ Delayed there are and possibly a list for each. Or am I looking at this from the bottoms end?

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

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

发布评论

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

评论(1

我还不会笑 2024-12-03 21:24:41

监控死信文件夹的唯一原因是您的
传入邮箱不接受电子邮件或不存在。所以 SMTP
IIS/Exchange 会将它们放入坏邮件文件夹中。如果你有一个
邮箱然后它会将这些文件放入邮箱文件夹中
完全相同的文件,但也会接受传入的退回邮件
来自其他服务器的支持/回复。

编写我自己的服务来使用 .NET FileSystemWatcher

我遇到的第 1 类问题是 FileSystemWatcher 在 Create 时报告文件创建 - 但如果您尝试查询它,父程序仍然可以写入文件,因此它将抛出异常。fileNotAccessible。 (确定文件是否正在使用的唯一方法是尝试打开它并捕获异常)

为了解决这个问题,我只是捕获该异常并将文件名放入 Queue 并在 1-5 分钟的计时器中重新查询Queue 文件名 - 那时该文件应该已由父程序写入并关闭。

然后,我根据错误代码、原因等(退回邮件)解析电子邮件内容,并将其插入到我的数据库中 - 我也收到了不在办公室的邮件。
我没有使用任何电子邮件解析器 DLL,但为了实现强大的电子邮件解析,我建议您找到一些东西,因为电子邮件似乎遵循一个标准..但不是很严格,而且它们往往会略有不同。
电子邮件解析器示例

我完成了使我的课程成为服务所需的所有魔法,将其安装在您的邮件服务器上,然后让它监视它。

The only reason to monitor the badmail folder is because your
incomming mailbox does not accept emails or does not exist. So SMTP
IIS/Exchange will put them in the bad mail folder. If you have a
mailbox then it will put these files in the mailbox folder with
exactly the same files, but also will accept incomming bounce
backs/replies from other servers.

Write my own service to monitor a file using the .NET FileSystemWatcher Class

1 Problem i encountered was that FileSystemWatcher reports filecreations onCreate-- but the Parent program can still be writting the file if you try to query it so it will thrown an exception.fileNotAccessible. (The only way to determine if a file is in use is trying to open it and catch the exception)

To overcome that problem i just catch that exception and put the file name into a Queue and in a Timer of 1-5minutes i re query the Queue filenames- by then the file should have been written and closed by the parent program.

I then parse the email content based on error code, reason, etc (bounced mails) and insert it into my DB - I get allot of out of office mails too.
I did not use any email parser DLL's but for robust email parsing i would suggest you find something as it seems emails follow a standard.. but not very strict and they tend to vary slighlty.
Email Parser example

I do all the magic required to make my class a service, install it on your mail server and let it monitor it.

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