[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [magicmail-users] country_blacklist doesn't work



----- Original Message ----- 
From: "Michael Peddemors" <michael@linuxmagic.com>
To: <magicmail-users@linuxmagic.com>
Sent: Saturday, June 14, 2003 7:30 PM
Subject: Re: [magicmail-users] country_blacklist doesn't work


> Hmmm.. That is specifically what that piece of code is designed to do.
> Be strange if it didn't work. I know that it is working perfectly on the
> commercial version, but judging by this question, I see that maybe we can
ad
> better logging to this function.  The latest version is waiting on release
> for some feedback on another possible bug, so I will ask the devolopers to
> review that section of the code.

This behaviour might not be a bug. It's only a mostly undocumented (hidden?)
feature.
Should it be a possible, that it refuses to work if both (country_blacklist
AND country_whitelist) are
configured?
Well, i will try this tomorrow - disabling the whitelist-feature. Maybe i
got luck...



Addition, as a little goodie to the community:

Workaround (without qmail-smtpd) - Remember this is just a HACK:
Today i did a small hack in the /var/qmail/supervise/qmail-smtpd/run script.
It currently looks like the following:

exec /usr/local/bin/softlimit -m 2000000 \
    /usr/local/bin/tcpserver -v -P -l$SMTPALIAS -x /etc/tcp.smtp.cdb -c $MAX
    -u $QMAILDUID -g $NOFILESGID 0 smtp \
    /usr/local/bin/rblsmtpd \
    -r bl.spamcop.net \
    -r dev.null.dk \
    -r relays.ordb.org \
    -r list.dsbl.org \
    -r orbs.dorkslayers.com \
    -r relays.osirusoft.com \
    sh -c 'test `ip2country $TCPREMOTEIP` == TW \
    && echo "553 Blocked." \
    || exec /var/qmail/bin/qmail-smtpd' 2>&1

Remember to setup the $SMTPALIAS, $MAX, $QMAILDUID and $NOFILESGID to fit
your needs.


> On June 13, 2003 11:55 pm, Stephan Seitz wrote:

> > I want to keep requests from TW and CN out of my qmail-queue. So i set
up
> > the IP::Country pl-module and double-checked it's functionality. Called
'by
> > hand', this works very well for most of the IP's, also the provided
> > ip2country script does it's job as it should. On the other hand,
> > magic-smtpd (giving log-error's if ip2country is not found as written in
> > /etc/magic-mail/control/country_code_prog) currently seems to use this
> > script (no more errors thrown), but silently ignores
> > /etc/magic-mail/control/country_blacklist. It looks to me, that there is
no
> > country-comparison done at all.
> >
> > /etc/magic-mail/control/country_blacklist contains 3 lines:
> > CN
> > TW
> > YA