can only send and receive emails if -r relays.ordb.org removed from /qmail-smptd/run

This is a discussion on can only send and receive emails if -r relays.ordb.org removed from /qmail-smptd/run within the Linux Security forums, part of the System Security and Security Related category; Hi, I am having a strange problem..I have qmail+vpopmail up and running fine on a Redhat Linux9 machine.....


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-20-2004
Ann
 
Posts: n/a
Default can only send and receive emails if -r relays.ordb.org removed from /qmail-smptd/run

Hi,

I am having a strange problem..I have qmail+vpopmail up and running
fine on a Redhat Linux9 machine..But recently i supected we were
getting spammed. So i wanted to add -r relays.ordb.org line to
/var/qmail/supervise/qmail-smptd/run, i am not able to end/receive
mails from other domains. i can send emails to the same domain, it
works fine..

If i remove it, it works alright..

but i want this added in...

Also what are the best methods to prevent spam and make sure i am not
acting as an open relay?

Thanks,
Ann

/var/qmail/supervise/qmail-smptd/run file

#!/bin/sh

QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`

if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z
"$LOCAL" ]; then
echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
echo /var/qmail/supervise/qmail-smtpd/run
exit 1
fi

if [ ! -f /var/qmail/control/rcpthosts ]; then
echo "No /var/qmail/control/rcpthosts!"
echo "Refusing to start SMTP listener because it'll create an open
relay"
exit 1
fi

exec /usr/local/bin/softlimit -m 110000000 \
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c
"$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp -r relays.ordb.org
/var/qmail/bin/qmail-smtpd 2>&1
Reply With Quote
  #2 (permalink)  
Old 07-21-2004
Olivier
 
Posts: n/a
Default Re: can only send and receive emails if -r relays.ordb.org removedfrom /qmail-smptd/run




>
> Also what are the best methods to prevent spam and make sure i am not
> acting as an open relay?


Prevent spam: no 100% solution AFAIK.
Use rbls ( xbl.spamhaus and njabl are fine )
and try spamassassin if you have the time to check its work ( check
false positives, train bayes database etc.. )

Open relay: check your /etc/tcp.smtp and virtualdomains and rcpthosts files
Make certain you don't have open proxies on you network ( apache for
example, etc)
Prevent qmail to bounce: take care you do not bounce in your
..qmail-default files ( vpopmail generates bounces by default )

Add this in your file:
---------
# rebuild smtp rules
[ -r /etc/tcp.smtp ] && tcprules $CDB
/var/service/qmail-smtpd/tcp.smtp.tmp < /etc/tcp.smtp

To make certain to have up-to-date rules before launching qmail-smtpd
----

>
> exec /usr/local/bin/softlimit -m 110000000 \
> /usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c
> "$MAXSMTPD" \
> -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp -r relays.ordb.org
> /var/qmail/bin/qmail-smtpd 2>&1


the -r options applies to rblsmtpd

Change your command to:
COMMAND="/usr/local/bin/recordio rblsmtpd -b -r combined.njabl.org -r
xbl.spamhaus.org qmail-smtpd"

recordio is useful to have a logging of rbl blocking
modify your
qmail-smtpd/log/run files with this:
exec setuidgid $LOGUSER multilog t $FILENO $FILESIZE '-* * > *' '-* *
< *' '+* * > 5*' '+* * > 4*' ./main
( last line )
So that you see the 553 errors generated by rblsmtpd





Reply With Quote
  #3 (permalink)  
Old 07-21-2004
Travis Casey
 
Posts: n/a
Default Re: can only send and receive emails if -r relays.ordb.org removed from /qmail-smptd/run

Ann wrote:

> Also what are the best methods to prevent spam and make sure i am not
> acting as an open relay?


I don't know much of anything about qmail, so I can't help on the parts
specific to it, but to check if you're acting as an open relay, you can go
to:

http://www.abuse.net/relay.html

and use their testing service.

--
ZZzz |\ _,,,---,,_ Travis S. Casey <efindel@earthlink.net>
/,`.-'`' -. ;-;;,_ No one agrees with me. Not even me.
|,4- ) )-,_..;\ ( `'-'
'---''(_/--' `-'\_)
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:36 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0