I think this is less of a Perl problem than an issue of Postfix configuration. So, at the risk of being off-topic:...
When are you running your filter? If you are doing it as a recipient check, e.g., hanging off smtpd_recipient_restriction, you will not yet have the received that DATA. You will need to hang it off smtpd_data_restrictions instead.
If you are not concerned about rejecting the message, but only to send a message back if they fail the database check, I would be inclined to take your script as is, and fire it off from a procmail rule, and leave Postfix out of the picture. Which would have the added advantage of simplifying your Postfix configuration, since it becomes less bound to the application level, and simply does its job as a Mail Transfer Agent. Besides, as you have already shown, it's easier to test from the command line anyway.
- another intruder with the mooring in the heart of the Perl
In reply to Re: postfix filter...
by grinder
in thread postfix filter...
by Ang-st
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |