Am 26.03.2013 11:23, schrieb James Curtis:
> Now just one more thing. I want to md_graphdefang_log if it is an unknown
> user. Here is what I have put together
> based on the other entries in this post. I'm sure I'm missing something
> because it doesn't work. Please advise for this
> last piece of the puzzle. Obviously I wouldn't log all valid, its for
> testing purposes, what am I missing?
> ------------------code ------------------------
> sub filter_recipient
> {
> my ($retval, $code, $dsn, $text) = md_check_against_smtp_server($sender,
> $recip, "localhost", "192.168.1.10");
> # my($recip, $sender, $ip, $host, $first, $helo, $rcpt_mailer,
> $rcpt_host, $rcpt_addr) = @_;
This line is needed and should be the very first line of the
subroutine. Don't comment it out, and don't insert anything
before it. Just change the "return" in the line below into
"my ($retval, $code, $dsn, $text) = ".
> # return md_check_against_smtp_server($sender, $recip, "mail.hml.com",
> "192.168.1.10");
> if ($retval eq "Reject") {
According to the manpage $retval will be "REJECT", not "Reject"
in the reject case, so you should compare against the string
in all capitals.
> md_graphdefang_log('notauser', $recip, $sender);
> }else{
> md_graphdefang_log('valid', $retval, $code);
> }
Here you are missing a return statement to pass the result of
md_check_against_smtp_server to the caller of filter_recipient.
Ie. insert
return ($retval, $code);
before the closing brace.
> }
> ------------------code---------------------------
HTH
T.
--
Tilman Schmidt
Phoenix Software GmbH
Bonn, Germany
signature.asc
Description: OpenPGP digital signature
_______________________________________________ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list [email protected] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

