开发者

How to get reports from my badmail folder?

开发者 https://www.devze.com 2023-03-24 07:53 出处:网络
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 act

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号