qmail-verify uses the files control/me, control/envnoathost, control/locals, control/percenthack, control/virtualdomains, users/cdb, the system password file entries (typically in /etc/passwd ) as well as the existence or not of users' home directories and .qmail[-xxx] files to determine if a given address is valid.
Where a qmail system uses .qmail-default files on a per-domain basis in a virtual domains setup, this is likely to result in all addresses being considered 'valid'. This may not in fact be the case in certain situations, such as with extensions/adaptations to qmail like vpopmail which use .qmail-default files throughout (delivery in this case is subsequently handled by a vpopmail component). In these cases a replacement for qmail-verify will be required that can determine address validity.
Other customised qmail installations that use different methods to locate users' mailboxes are likely to need alternatives to qmail-verify or a modified version of it for address verification.
By default, qmail-verify listens on localhost (127.0.0.1) on port 11113. This behaviour can be changed by setting the environment variable LISTEN to specify the IP address and/or port: Set this to the desired IP address, optionally followed by a colon and port, thus for example LISTEN="192.168.1.1:10101".
The response packet contains a single byte to indicate the validity of the address and a string, the 'controlling user', i.e. system user that owns the mailbox for the address being tested. The lowest-order bit of this byte indicates the result: 0 for 'valid', 1 for 'invalid'. Other bits of this response byte are set by qmail-verify to give further debugging information; these other bits should generally be disregarded.
Although not especially designed as a new protocol, extensions to qmail-verify could require the query string to be 0 terminated to separate it from other data to follow. Currently the response packet contains the response byte and the 'Controlling user'; more information could potentially be returned if required.
If you are using different machines for qmail-verify and qmail-smtpd you should ensure that the machine providing the qmail-verify service has a full set of control files as well as the mailboxes; the machine running qmail-smtpd still needs control/me, control/rcpthosts (and/or control/morercpthosts ) to be setup.