CGI/ISAPI modules

Advanced Maillist Verify can be easy integrated into practically any web-server worked under Windows. There are two ways to do it:

- Through AMV COM/ActiveX interface. See "Code samples" article in "Information for programmers" part. It contains links to the examples (supplied with program) of integration into Microsoft IIS and ColdFusion server from Adobe Corporation. Unfortunately, some web-servers and its extensions don't allow to create the scripts, that will be executed on server and support COM/ActiveX objects.

- Through CGI/ISAPI modules. CGI (Common Gateway Interface) is a platform-independent interface of programs working in common with web-server. Because of its unique simplicity and some historical reasons, CGI interface is supported by all web-servers except some specialized web-servers, which don't support scripts and programs execution on server side at all. ISAPI is an alternative to CGI in Microsoft IIS web-server. The interface repeats CGI interface in many respects, but has greater efficiency and more capabilities.

CGI (AmvCgi.exe) and ISAPI (AmvIsapi.dll) modules don't differ from each other in setup and setting, so we'll call them both just modules. The modules are located in COM\AmvCGI\ and COM\AmvISAPI\ subdirectories of AMV.

The modules aren't independent programs and use "Advanced Maillist Verify Component - Email Verifier" COM-object to check address. So for their functioning you have to setup Advanced Maillist Verify and set the corresponding access right for the component using DCOMCNFG.EXE utility, if web-server works with not usual user rights. The component can be executed on any computer in network by using DCOM (Distributed COM). It also can be setting through DCOMCNFG.EXE utility.

The usual Advanced Maillist Verify user licence is not enough to use COM-component (and COM/ISAPI modules). So you have to buy the developer licence.

The setting of modules working is realized through configuration files with .INI extension. They must have the same name as script file and be located in the same directory as it (e.g., AmvCgi.EXE and AmvCgi.INI, AmvCgi1.EXE and AmvCgi1.INI). You can create a several module copies with different names in one directory, with different setting files, of course. In web-server settings, the directory with scripts must be accessible for execution, but inaccessible for reading.

The modules callings are realized with email transfer to them by POST or GET methods. The modules don't have a hard argument for address transfer and determine address from '@' sign in argument body. For example, the following GET callings will be processed correctly:

/AmvCgi.exe?my@email.com

/AmvCgi.exe?email=my@email.com

/AmvCgi.exe?test=off&my@email.com

/AmvCgi.exe?test=off&eml=my@email.com

In the next examples will be checked the first argument with '@' sign:

/AmvCgi.exe?my@email.com&my2@email.com

/AmvCgi.exe?test=@&email=my@email.com

If there is no argument contained '@' sign, then, depending on script settings, either the error message appears or the first argument of the first parameter will be chosen to check. Note, that the module processes only one parameter (email). The processing of cases, when a several parameters were transfered to module, was added only to increase the program compatibility.

The module executes email checking using Advanced Maillist Verify settings (DNS server addresses, timeouts, specific SMTP protocol settings, etc). After end of checking, the module executes one from the actions (browser redirection or HTML-page displaying) according to settings in configuration file. The principle difference between that actions consists in the method of result transfer.

In the first case (redirection), the script can code the checking results in URL, to which the redirection is realized. To specify URL you can use %EMAIL%, %RESULT%, %COMMENT% macros, which will be extended with corresponding values by script. For example:

http://www.mycompany.com/goodemail?email=%EMAIL%

In the second case (HTML-page displaying), you can use %EMAIL%, %COMMENT%, %RESULT%, %LOG% macros within the page template. They will be replaced by the real values during page displaying.

Please, see the script configurational files and page templates in COM subdirectory of AMV for details.

See also: Information for programers