Gah.

I was hoping there'd be some means to do a simple pipe to an external application which provided the result. :( I suppose the SMTPD_POLICY_README is the way to go, then. Though it's a little more heavyweight than I anticipated.

Still, it would allow me to easily ignore other domains

Cheers!

On 26 Sep 2008, at 13:34, Wietse Venema wrote:

Alan Boyd:
Hello,

I'm trying to find a way to reject email which is sent to an unknown
user (determined by an external program) at a virtual domain, such
that the email doesn't even enter the mail queue.

Wietse Venema:
For Postfix to reject invalid recipients at the SMTP port, this
information must be available as a lookup table. You will have
to use one of the supported database types: file, SQL, LDAP, and
so on, or add your own table lookup mechanism.

See "man 1 postconf", option "-m".

Alan Boyd:
Hi,

Thanks for the response. Two questions:

1) Which variable in main.cf should this lookup table be referenced in?

Recipient validation is normally done with the lookup tables listed
in http://www.postfix.org/ADDRESS_CLASS_README.html, however you
can also use smtpd_***_restrictions to block recipients.

2) I've read the man page, but it isn't clear in whether I can
reference a database or table which is produced as the output of a
program? For example, whether postfix can read the output of some kind
of generatetable.pl file?

The following mechanisms are implemented as lookups from a static
file: hash, btree, dbm, cdb, regexp, pcre, cidr. In this case you
provide the data in the form of a file, and Postfix will do the
lookups from that file.  See "man postmap".

The following lookups are implemented by sending a query to a
running program:  mysql, pgsql, ldap, tcp, nis, nisplus (see
http://www.postfix.org/mysql_table.5.html etc.); the smtpd policy
protocol (http://www.postfix.org/SMTPD_POLICY_README.html); and
the Milter protocol (http://www.postfix.org/MILTER_README.html).
In this case you provide the running program that answers to
Postfix's queries.

        Wietse

Reply via email to