|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Jeremie Le Hen (jeremie
le-hen.org)
Date: Wed Aug 01 2007 - 07:33:16 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi list,
I'm experiencing SMTP Access Policy Delegation.
I've written a very dumb policy daemon:
% #!/usr/bin/perl
%
% open LOG, '>> /tmp/policystub.log';
% while (<STDIN>) {
% print LOG $_;
% print LOG "HEX: ".(unpack "H*", $_)."\n";
% chomp;
% print "action=DUNNO\n\n" if ($_ eq '');
% }
% close LOG;
Testing it manually, it seems to work as expected:
% postfix1# printf 'attribute=value\n\n' | /root/policystub.pl
% action=DUNNO
%
% postfix1# cat /tmp/policystub.log
% attribute=value
% HEX: 6174747269627574653d76616c75650a
%
% HEX: 0a
I've set it up in master.cf(5):
% stub unix - n n - 0 spawn user=nobody argv=/root/policystub.pl
And main.cf(5):
% smtpd_recipient_restrictions =
% check_policy_service unix:private/stub,
% permit_mynetworks,
% reject_unauth_destination
Unfortunately, this simply doesn't work. I'm pretty sure I've missed
something, but I didn't manage to understand what. I've tried to use
an inet socket as well, without success. Nevertheless when I look in
/tmp/policystub.log I can see all attributes sent by Postfix as well
as the final empty line, which means the communication from Postfix
to the policy server though spawn(8) works correctly, but the reply
doesn't find its path.
I've added -v to smtpd and spawn, but saw nothing relevant.
I've not attached the log file with this mail as it contains more than
500 lines, but it is available here:
http://tataz.chchile.org/~tataz/postfix.log.gz
Thank you very much for your future help :-).
Best regards,
--
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]