[Mimedefang] set mimedefang to not scan authenticated users

alan premselaar alien at 12inch.com
Thu Apr 17 19:19:18 EDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On 4/18/08 5:18 AM, maillist wrote:
[snip...]

> 
> sub defang_warning {
>  my($oldfname, $fname) = @_;
>  return
>    "An attachment named '$oldfname' was converted to '$fname'.\n" .
>    "To recover the file, right-click on the attachment and Save As\n" .
>    "'$oldfname'\n";
> }
> 
> sub filter_end {
>  my($entity) = @_;
>  return if message_rejected();
> 
>  sub filter_relay($$$) {
>    my ($entity) = @_;
>    if ($SendmailMacros{'auth_authen'}) {
>      return('ACCEPT_AND_NO_MORE_FILTERING', "ok");
>    }
>  }
> 
>  sub filter_relay($$$) {
>    my ($ip, $name, $helo) = @_;
>    if ($ip =~ /127\.0\.0\.1/ || /10\.0\.1\./) {
>      return('ACCEPT_AND_NO_MORE_FILTERING', "ok");
>    }
>    else {
>      return ('CONTINUE', "ok");
>    }
>  }

Two problems that I noticed at quick glance are:

1) you have 2 filter_relay subroutines defined.  that could cause
unexpected results.

2) they're both defined in the scope of the filter_end subroutine which
is definitely not going to do what you are expecting.

you should a) combine the contents of your filter_relay subroutines in
way that makes sense logically, and then b) make sure that the
filter_relay subroutine is defined globally instead of within the scope
of another subroutine.

hope this helps.

Alan


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIB9r2E2gsBSKjZHQRAkutAKCJZG2Dri/we0xN8IWMKRgtIcXaZQCghcv0
ZFlUKdBlWjNGZjDMV/Qm2Iw=
=OYTh
-----END PGP SIGNATURE-----



More information about the MIMEDefang mailing list