[Mimedefang] Need help with filter
Alexander Dalloz
ad+lists at uni-x.org
Wed Dec 15 07:51:42 EST 2004
Am Mi, den 15.12.2004 schrieb Ronald Vazquez NLM um 13:12:
> I have the following code as part of my:
>
> sub filter_bad_filename ($) {
Following code really in this mimedefang-filter part? If yes, then wrong
place.
> #blah, blah...
>
> use Socket;
>
> sub relayIsTrusted($) {
>
> my ($address) = @_;
> syslog('warning', "Address is $address");
>
> my %trustedSubnets = (
> # Looopback
> '127.0.0.1' => '255.255.255.255',
Subnet mask 255.0.0.0 would be correct for loopback.
> # Home Network
> '192.168.1.0' => '0.255.255.255',
You mean subnet mask 255.255.255.0.
> };
>
>
> my $trustedRelay = 0;
>
> my $addr = inet_aton $address;
> while (my ($networkString, $netmaskString) = each %trustedSubnets) {
> my $network = inet_aton $networkString;
> my $netmask = inet_aton $netmaskString;
> #md_syslog("warning","Network is $network, netmask is $netmask, addr is $addr");
> if (($addr & $netmask) eq $network) { $trustedRelay = 1; last; }
> }
>
> return $trustedRelay;
> }
>
>
> Now, I am getting the following error on my maillog:
>
> Dec 15 07:08:13 vw02 mimedefang-multiplexor: Slave 0 stderr: Use of uninitialized value in concatenation (.) or string at /etc/mail/mimedefang-filter-10025 line 107.
> Dec 15 07:08:13 vw02 mimedefang.pl[27338]: Address is
> Dec 15 07:08:13 vw02 mimedefang-multiplexor: Slave 0 stderr: Use of uninitialized value in subroutine entry at /etc/mail/mimedefang-filter-10025 line 163.
> Dec 15 07:08:13 vw02 mimedefang-multiplexor: Slave 0 stderr: Use of uninitialized value in bitwise and (&) at /etc/mail/mimedefang-filter-10025 line 167.
> Dec 15 07:08:13 vw02 mimedefang-multiplexor: Slave 0 stderr: Use of uninitialized value in bitwise and (&) at /etc/mail/mimedefang-filter-10025 line 167. Use of uninitialized value in bitwise and (&) at /etc/mail/mimedefang-filter-10025 line 167. Use of uninitialized value in bitwise and (&) at /etc/mail/mimedefang-filter-10025 line 167. Use of uninitialized value in bitwise and (&) at /etc/mail/mimedefang-filter-10025 line 167. Use of uninitialized value in bitwise and (&) at /etc/mail/mimedefang-filter-10025 line 167. Use of uninitialized value in bitwise and (&)
> Dec 15 07:08:13 vw02 mimedefang-multiplexor: Slave 0 stderr: . Use of uninitialized value in bitwise and (&) at /etc/mail/mimedefang-filter-10025 line 167. Use of uninitialized value in bitwise and (&) at /etc/mail/mimedefang-filter-10025 line 167. Use of uninitialized value in bitwise and (&) at /etc/mail/mimedefang-filter-10025 line 167. Use of uninitialized value in bitwise and (&) at /etc/mail/mimedefang-filter-10025 line 167. Use of uninitialized value in bitwise and (&) at /etc/mail/mimedefang-filter-10025 line 167. Use of uninitialized value in bitwise and (&
>
> Could somebody point me to the problem with my code?
Check the lines to be wrong: 107, 163, 167.
> Ronald Vazquez
Alexander
--
Alexander Dalloz | Enger, Germany | new address - new key: 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora GNU/Linux Core 2 (Tettnang) on Athlon kernel 2.6.9-1.6_FC2smp
Serendipity 13:49:14 up 5 days, 8:30, load average: 0.19, 0.22, 0.27
More information about the MIMEDefang
mailing list