Its in the docs, but here is my setup.

in main.cf

mynetworks = 66.152.196.64/27,127.0.0.0/8,mysql:/etc/postfix/my_net.cf
smtpd_client_restrictions = permit_mynetworks, reject




/etc/postfix/mynet.cf

user=<username>
password=<database password>
dbname=<dbmaildatabasename>
hosts = <database host>
table = dbmail_pbsp
select_field = since
where_field = ipnumber
additional_conditions = and unix_timestamp() - unix_timestamp(since) <= <number of seconds you want to allow>

In my case

user = dbmail
password = <password>
dbname = oriondbmail
table = dbmail_pbsp
select_field = since
where_field = ipnumber
additional_conditions = and unix_timestamp() - unix_timestamp(since) <= 36000

that equates to 10 hours.
Also in the main.cf file replace the values in mynetworks (aside from the mysql part with your own networks)



Jorge Bastos wrote:

Guys,

Does anyone has this kind of setup?

I'd like to hear some opinions, and a good howto to get postfix read the ip address from the "my"sql table.

In the dbmail side, I know all to make it start working, only the integration with postfix is missing me.

Jorge

------------------------------------------------------------------------

_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to