On Fri, 08 Jan 2010 00:50:49 Wietse Venema wrote: > Michael: > > I want to deploy a system whereby it will do an SQL lookup and depending > > on the result will either continue processing the message as per usual or > > issue a 'temporary' reject (Ie: Over quota message). > > > > This is on a relaying/gateway machine so it does not have direct access > > to the mail queue to do it's own calculation so would need to work it out > > based on information available from an SQL table. > > Pointers: > > A) Use an SQL-based access table that is queried at SMTP time: > http://www.postfix.org/access.5.html > http://www.postfix.org/mysql_table.5.html > > B) Use a policy server that queries the database and does the calculation: > http://www.postfix.org/SMTPD_POLICY_README.html
Thanks Wietse. What I was thinking of doing was using check_recipient_access Will a 'NULL' result (ie: no rows returned) be treated as an OK? I can structure a query that will calculate if the user is under quota, however not all queries will return results (as some addresses are sent to other mail servers) What I want is: - check, return OK or DEFER - if no result Postfix treats as 'OK' I have already written and tested the query now I just need to integrate it. Michael