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 || (length($sasllink) && $sasllink eq
$senderlink)
? "action=DUNNO\n\n";
: "action=REJECT Not authorised\n\n"
Paul.
Hi Paul,
I like your suggestion. I didn't realise you could format a TRUE / FALSE
statement like that so I have replaced that particular part of the
script with yours so I have something to refer to later. It was a bit a
bit misleading of me stating $action is declared where it is shown to
be, as it goes through the quota and already blocked sections first
where it can be changed to reject. I have adjusted your suggested script
to keep original $action value if TRUE is returned.
I guess this is sloppy programming on my part. As soon as a rejection is
spotted, I suppose I could just add;
print"action=REJECT reason being..";
exit(0);
.. and end the program.
Here is how that part of the script looks now ;
if($sasl_username ne "\n")
{
$action = $sasl_username eq $sender || (length($sasllink) && $sasllink
eq $senderlink)
? "$action"
: "action=REJECT Not authorised\n\n";
}
Much neater than my burn offerings. Thanks again. The' if($sasl_username
ne "\n") ' is still needed as non SASL authenticated incoming mail would
be rejected otherwise.
Cheers,
Mick.