Use check_vrfy to change rejection messageIf you prefer to reject SMTP VRFY commands with a less helpful message than sendmail uses, you can set up something such as the following in your mc configuration file: LOCAL_RULESETS Scheck_vrfy R $* $# error $@ 2.5.2 $: "252 VRFY forbidden" For this rule set to be called, you need to omit goaway or novrfy from your PrivacyOptions option's setting (PrivacyOptions). Thereafter, whenever a SMTP VRFY command is received, sendmail will call the check_vrfy rule set. In this version of that rule set, we simply match all addresses (the LHS $*). Every address is rejected by the RHS using the $#error delivery agent (error) with a message such as this: 252 2.5.2 VRFY forbidden Use check_vrfy to select addresses to verifyThe goaway and novrfy PrivacyOptions option settings (PrivacyOptions) reject all SMTP VRFY commands. But at your site, you might instead wish to allow selected addresses to be verified, and others to be rejected. One way to do that is by adding lines such as the following to your mc configuration file: LOCAL_RULESETS Scheck_vrfy R $* $: $>canonify $1 focus on the host R $* <@ $=w . > $* $: $1 isolate the user R postmaster $# error $@ 2.5.1 $: "251 <postmaster@$j>" R abuse $# error $@ 2.5.1 $: "251 <abuse@$j>" R $* $# error $@ 2.5.2 $: "252 VRFY forbidden" For this rule set to be called, you need to omit goaway or novrfy from your PrivacyOptions option's setting (PrivacyOptions). Thereafter, whenever a SMTP VRFY command is received, sendmail will call the check_vrfy rule set. The address given to the SMTP VRFY command is provided to the check_vrfy rule set in its workspace. The first rule passes that address to the canonify rule set 3 (Section 19.3), which focuses on the host part by surrounding that part in angle braces. The second rule finds the user portion of that address and places just that user portion into the workspace. This is done only for addresses recognized as local. The next two rules look for specific users that you wish to verify. Here, you wish to let others know that you will accept mail to postmaster and to abuse. Attempts to verify any other users will result in a rejection of the request. |