[Greylist-users] General Q about the milter interface and greylisting.

David F. Skoll dfs at roaringpenguin.com
Fri Jul 18 21:33:14 PDT 2003

On Fri, 18 Jul 2003, Evan Harris wrote:

> > First, how does one tell if the rcpt to: is valid?

> I'm actually in the process of solving this very problem, and think I've
> come up with an elegant solution.  I won't go into it now before I validate
> it, but I expect to have something workable after the weekend.

In general, this problem is not easily solvable.  One option is to
invoke sendmail again from inside the milter using the "-bv" flag, and
see if the mail is deliverable.  However, it's not reliable unless you
run it as root, or you have loose permissions on your alias files.

This only works with "normal" local mailers.  If you're delivering with
Cyrus, for example, where valid users do not necessarily have UNIX logins
associated with them, you have to go through more hoops and simulate
a Cyrus delivery or user lookup -- not even sure how to do that.

If you're just relaying to other machines, you can use something
similar to MIMEDefang's md_check_against_smtp_server() routine, which
attempts a RCPT TO: on the target machine before accepting it.  This
won't work if you're using M$ Exchange (which doesn't validated
addresses at RCPT time); in that case, you need to do an LDAP lookup
or something similar.

So how you do it depends on how your mail is set up.  Hope that helped! :-)


More information about the Greylist-users mailing list