Re: Policy attributes to PERL script

2015-03-06 Thread Mick
Paul Hoffman wrote: $action= action=DUNNO\n\n; if ($sasl_username ne $sender) { if(length($sasllink)0 length($senderlink)0 $sasllink eq $senderlink) {} else { $action= action=REJECT Not authorised\n\n;} } } Suggestion: $action = $sasl_username eq $sender ||

Re: Policy attributes to PERL script

2015-03-06 Thread Paul Hoffman
On Fri, Mar 06, 2015 at 01:54:54AM +, Mick wrote: Hi Markus, I am pleased to say my 'moonshine' perl based policy is now up and running. Benning, Markus wrote: The reject_sender_login_mismatch in smtpd_sender_restriction already does that as a native postfix check: I didn't know

Re: Policy attributes to PERL script

2015-03-05 Thread Mick
Hi Markus, I am pleased to say my 'moonshine' perl based policy is now up and running. Benning, Markus wrote: The reject_sender_login_mismatch in smtpd_sender_restriction already does that as a native postfix check: I didn't know that. There is a lot I don't know or understand, which is why

Re: Policy attributes to PERL script

2015-03-01 Thread Mick
Hello Markus, Thanks very much for your reply. I didn't come across Cookbook in my searches but I don't think I will need it now as I'm very pleased to report I got my first test policy implemented yesterday evening. Don't laugh, all it does so far is block senders where 'sender' doesn't

Re: Policy attributes to PERL script

2015-03-01 Thread Benning, Markus
Am 2015-02-27 14:45, schrieb MickTW8: This issue I have is knowing how to read any of the attributes listed here www.postfix.org/SMTPD_POLICY_README.html#protocol Hello Mick, it may be an option for your to implement your code as a plugin for mtpolicyd. There's documentation for wrinting a

Re: Policy attributes to PERL script

2015-03-01 Thread Benning, Markus
Am 2015-03-01 12:38, schrieb Mick: Hello Markus, Thanks very much for your reply. I didn't come across Cookbook in my searches but I don't think I will need it now as I'm very pleased to report I got my first test policy implemented yesterday evening. Don't laugh, all it does so far is block

Re: Policy attributes to PERL script

2015-02-27 Thread Jan P. Kessler
This issue I have is knowing how to read any of the attributes listed here www.postfix.org/SMTPD_POLICY_README.html#protocol I have tried using $attr = @_; and local(*attr) =@ _; to retreive the variables but $attr always remains empty. I have also set up the script to write the contents and

Re: Policy attributes to PERL script

2015-02-27 Thread Scott Kitterman
On Friday, February 27, 2015 06:45:07 AM MickTW8 wrote: Hello all, I am having trouble accessing postfix attributes from within a PERL script sent using smtpd_data_restrictions. I ought to say I am a novice to both postfix and PERL. The Postfix config files look like this ; Master.cf ;

Policy attributes to PERL script

2015-02-27 Thread MickTW8
: http://postfix.1071664.n5.nabble.com/Policy-attributes-to-PERL-script-tp75306.html Sent from the Postfix Users mailing list archive at Nabble.com.

Re: Policy attributes to PERL script

2015-02-27 Thread MickTW8
Thanks for pointing out STDIN Jan. It really helps to know what I am looking for. Thanks Scott for the working example. I've got something to go on now. Both your replies are very much appreciated. Mick. -- View this message in context: http://postfix.1071664.n5.nabble.com/Policy-attributes