Grinch is a Perl script that verifies if a specific address is an open mail relay host. It's small in size and can be utilized for this purpose.
In addition to its use in Postfix environments, Grinch can also be used in arbitrary shell script environments. When used in this manner, the hostname is simply read from stdin while the error code is written to stdout. This flexibility in the use of the software tool makes it incredibly versatile and user-friendly.
The primary goal of Grinch is to ensure that checks are performed "on the fly" to determine whether a host accepts mail to a particular destination it may not relay for. In the event that it does, Grinch will wait for the sent mail to return for a configurable period. During this time, the software tool will return a soft error (450) for that particular host.
If the mail returns and the suspected host is verified as an open open relay, it will be rejected until its cache entry times out. Ultimately, Grinch is an incredibly useful and reliable software tool that is well worth considering if you need to check whether a particular address is an open mail relay host.