Hello Peter, PV> I'm setting up DBmail with postfix at my company. With the PV> database functionality (postgres at this site) it seemed a natural PV> fit for multiple users. Since we have multiple users we would like PV> to the functionality for each user to set up their own whitelist, PV> the belief is that blacklists are flawed. I've searched through PV> the code to get an idea but I can't seem to find the most basic PV> and most important piece of information. I speak of the "From" PV> address to implement the whitelist. Any clues would be very PV> welcome.
As others have said, you're not doing this with dbmail, although what you NEED to use is also needed for dbmail... First thing I'd do is make sure that Postfix can talk to the Postgres database engine, so that you can have it scan the pop-before-smtp table AND the aliases table (to make sure it doesn't accept mail for non-existant addresses). Next you need to implement a table that has three fields of interest; mailfrom (address of sender), mailto (delivery address on your system), and action. This is what the users edit for their "white list", with the action being "OK" if they want the mail, and "REJECT" if they don't. But, now comes the hard part - getting postfix to actually look it up using the delivery address; it normally will search just with the mail from address when doing access checks. I haven't had a chance to look at Postfix 2.x, so I don't know how easily you can call up the destination address, or even if Postfix will do multiple lookups in the case of one person sending to multiple addresses... some of which might want the mail, others who might not. The reason I point this at being a postfix area is that you want to bounce spam as early in the chain as possible; if you don't, you can open up a hole for spammers to send mail through. If you're not concerned about this, though, or you implement a policy of dropping spam rather than bouncing it, you CAN implement it by piping the mail to a script to do the lookups, passing accepted mail to dbmail, while dropping rejected mail. -- Best regards, Jeff mailto:[EMAIL PROTECTED]
