LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-26-2008, 07:32 AM   #1
akarayil
LQ Newbie
 
Registered: May 2008
Posts: 4

Rep: Reputation: 0
blocking open relay in qmail


My qmail server open relay is enabled. I added only one domain name in rcpthosts file, for which this server has mailboxes.

still server supports open relay.
What should I do to block open relay?
 
Old 05-27-2008, 05:03 AM   #2
dorian33
Member
 
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 591

Rep: Reputation: 32
set/unset RELAYCLIENT in cdb file used for smtpd start
 
Old 06-02-2008, 07:34 AM   #3
akarayil
LQ Newbie
 
Registered: May 2008
Posts: 4

Original Poster
Rep: Reputation: 0
To block open relay,I installed ucspi-tcp package. Make some changes in tcp.smtp file for relay client. Use tcprules cammand to compile the changes to tcp.smtp.cbd file. Then restart the qmail.After that open relay is blocked.

Now the problem I'm facing is related to receiving mails.all the mail users can send mail to users of other domains.But not receiving any mail to the mailbox (send by locally or remotely).
 
Old 06-02-2008, 08:23 AM   #4
dorian33
Member
 
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 591

Rep: Reputation: 32
check your rcpthosts file
(usually in /var/qmail/control/)
 
Old 06-03-2008, 06:30 AM   #5
akarayil
LQ Newbie
 
Registered: May 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Hi,
kindly help me to restore the removed queue in qmail.

Earlier my qmail server was an open relay.See the telnet output below.From the net I found that if rcpthosts file is there, open relay wiil be blocked. In our server, from rcpthosts file, I removed all entries other than rkcmail.gotdns.com(there were two more entries.). After that also, I couldn't stop open relay.

telnet xx.xx.xx.xx 25
Trying xx.xx.xx.xx...
Connected to xx.xx.xx.xx.static-lvsb.vsnl.net.in.
Escape character is '^]'.
220 rkcmail.gotdns.com ESMTP
helo mail.dyndns.com
250 rkcmail.gotdns.com
mail from:support@dyndns.com
250 ok
rcpt to:support@dyndns.com
250 ok
rcpt to:anyone@anywhere.com
250 ok
rcpt tooorspamvictim@gmail.com
250 ok
rcpt to:doesnot443exist@doesnot443exist.com
250 ok
rcpt toostmaster@rkcmail.gotdns.com
250 ok
data
354 go ahead
Subject:Test

This is a test.
.
250 ok 1211565215 qp 10250
quit
221 rkcmail.gotdns.com
Connection closed by foreign host

Then I download ucspi-tcp-0.88 package to /usr/local directory.cd to /usr/local/ucspi-tcp-0.88, then run # make command. then run #make setup check cmd.
Then qmail is restarted.
Now open relay is blocked. See the output of telnet session.
telnet xx.xx.xx.xx 25
Trying xx.xx.xx.xx...
Connected to rkcmail.gotdns.com (xx.xx.xx.xx).
Escape character is '^]'.
220 rkcmail.gotdns.com ESMTP
helo mail.gotdns.com
250 rkcmail.gotdns.com
mail from:support@dyndns.com
250 ok
rcpt to:akarayil@gmail.com
553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
rcpt to:support@dyndns.com
553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
rcpt to:ashraf@rkcmail.gotdns.com
250 ok
data
354 go ahead
subject:testing
test
.
250 ok 1212121202 qp 4593
quit

But now the problem is, the messages are not delivered to the mail boxes, if it is send locally or remotely. I can send mail to remote recipients. I found that the problem is with queue. So to rebuild the queue, I follow the given steps.


# qmailctl stop
Stopping qmail...

qmail-smtpd
qmail-send
qmail-pop3d
# qmailctl stat
/service/qmail-send: down 5 seconds, normally up
/service/qmail-send/log: down 5 seconds, normally up
/service/qmail-smtpd: down 5 seconds, normally up
/service/qmail-smtpd/log: down 5 seconds, normally up
/service/qmail-pop3d: down 5 seconds, normally up
/service/qmail-pop3d/log: down 5 seconds, normally up
messages in queue: 23
messages in queue but not yet preprocessed: 0
# rm -rf /var/qmail/queue
# cd /usr/local
/usr/local# ls
bin include lib sbin ucspi-tcp-0.88
etc jakarta-tomcat-5.0.30 libexec share ucspi-tcp-0.88.tar
games jakarta-tomcat-5.0.30.tar.gz man src var
/usr/local]# cd ucspi-tcp-0.88
/usr/local/ucspi-tcp-0.88]# make setup check
./load tcpserver rules.o remoteinfo.o timeoutconn.o cdb.a \
dns.a time.a unix.a byte.a `cat socket.lib`
/usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in tcpserver.o
/lib/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [tcpserver] Error 1

But I couldn't recreate the queue. What is the meaning of the error message from the above comds output? What should I do to recreate the queue?

Kindly give me a solution.

Regards,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
qmail relay sachin1361 Linux - Enterprise 1 04-13-2008 11:05 AM
Qmail Appears To Be Open Relay ajayre Linux - Server 2 07-02-2007 10:59 AM
Qmail: Am I an open relay? mustangfanatic01 Slackware 5 05-05-2006 10:53 AM
Qmail OPEN EMAIL RELAY QUESTION kemplej Linux - Security 3 04-02-2004 01:46 PM
qmail open relay iwa Linux - Security 2 11-12-2003 07:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration