>I wish to develop an application that needs to scan messages while they >are on an IMail server set up as a gateway. To be more precise, I wish >to run a filter to block spam, scan for viruses, hadle attachements, >etc. and I wish to implement this with my IMail server acting as a >gateway for other servers on other domains.
This can be done using the SendName registry entry (see the Knowledge Base for details). Be aware that beyond the IMail implementation (the registry hook, locking files, etc), there is a huge amount of work for reliable virus scanning ( http://www.av-test.org has a 'test set' that is similar to our 'test virus sender' at http://www.declude.com/tools , but theirs includes about 300 different E-mails that use various tricks to try to bypass virus scanners). For virus scanning, you will likely need to write your own file handling routines, and for spam scanning you will likely need to write your own DNS engine. >The way I wish to accomplish this is by changing the MX of the other >domain so that mail for othercompany.com is sent through mydomain.com. I >have set up my IMail server to be a gateway as you have explained very >well in your KB. Mail for otherdomain.com now passes through >mydomain.com as it should. While we're on it, RFCs are *very* important for software that scans all E-mail through a gateway. For example, you should learn to start using "example.com" (the RFC-specified address for examples) rather than actual domains names that people own when giving out examples. It may sound like nit-picking, but that's exactly what the RFCs are all about. <G> >However, I am unable to 'catch' the messages as they pass through. Since >both servers are online 24/7 (or should be) mail is instantly relayed to >othercompany.com the second it arrives. How are you trying to catch the E-mails? Through the spool files? If so, you need to use the IMail locking mechanism, and make sure that you aren't accessing them while IMail is. >My only solution so far is building av filesystemwatcher, remove the >file as it enters the spool dir, filter it, and reinsert the file into >the queue after filtering. Although this is a fairly trivial solution to >create, I am not sure about how stable, accurate and scalable it would >be. Stability, accuracy, and scalability are key issues when scanning all E-mail. You're on the right track. :) The SendName registry entry is the place to start. -Scott --- Declude: Anti-virus, Anti-spam and Anti-hijacking solutions for IMail. http://www.declude.com --- [This E-mail was scanned for viruses by Declude Virus (http://www.declude.com)] To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/ Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
