Discussion:
postfix as prescanner with mysql
(too old to reply)
k***@ibo.net
2016-01-18 23:05:54 UTC
Permalink
Hi
I am setting up postfix to be a prescanner for my mail system. I want all incoming mail to go to it first and get scanned for virus, spam and legitimize recipient. I have the mysql.cf file set up and it does query the database. It returns the customer number and exits 0 when the email address exists and no results and exits 1 when the address does not exist. It will not however reject the address if the address does not exist.

main.cf(snipit)

local_recipient_maps = mysql:/etc/postfix/mysql.cf
transport_maps = hash:/etc/postfix/transport.cf

The sql query works and the transport map forwards all mail for that domain to my inside server. if I use

local_recipient_maps = hash:/etc/postfix/users.cf

and the address is not in the file it rejects the address like it should.

Any ideas as to why it is not working with the mysql table look up.

Thanks

Kelly
k***@ibo.net
2016-01-19 16:14:18 UTC
Permalink
Post by k***@ibo.net
Hi
I am setting up postfix to be a prescanner for my mail system. I want all incoming mail to go to it first and get scanned for virus, spam and legitimize recipient. I have the mysql.cf file set up and it does query the database. It returns the customer number and exits 0 when the email address exists and no results and exits 1 when the address does not exist. It will not however reject the address if the address does not exist.
main.cf(snipit)
local_recipient_maps = mysql:/etc/postfix/mysql.cf
transport_maps = hash:/etc/postfix/transport.cf
The sql query works and the transport map forwards all mail for that domain to my inside server. if I use
local_recipient_maps = hash:/etc/postfix/users.cf
and the address is not in the file it rejects the address like it should.
Any ideas as to why it is not working with the mysql table look up.
Thanks
Kelly
Hi
Sorry it was a mistak in the current mail server. Some one had added an email that was simply @mydomain.com and it was acting as a wildcard letting all mail through for that domain. It is working perfect now that that account has been removed.

Thanks

Kelly

Loading...