Mail Server Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationMail Server Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old November 4th, 2003, 06:16 AM
prashant_!012 prashant_!012 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Chennai
Posts: 5 prashant_!012 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to prashant_!012
Controlling relay in qmail

Hi

i had configured qmail,qmail pop3d ,vpopmail and sqwebmail on a redhat 8.0 linux system,

my problem is even as it mentioned in rcpthosts file that only my virtual domains need to send mails everyone is able to relay mails using it which is a serious security threat.

i didn't used the smtpauth module while configuring the mail server ,

even using telnet on port 25 i can able to send mails

How can i control the relay and supress the
sending mails using the telnet

Thanks in advance
Prashant

Reply With Quote
  #2  
Old November 5th, 2003, 03:52 PM
alexgreg's Avatar
alexgreg alexgreg is offline
Full Access
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jun 2000
Location: London, UK
Posts: 2,019 alexgreg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 sec
Reputation Power: 11
Quote:
i had configured qmail,qmail pop3d ,vpopmail and sqwebmail on a redhat 8.0 linux system,

OK
Quote:
my problem is even as it mentioned in rcpthosts file that only my virtual domains need to send mails everyone is able to relay mails using it which is a serious security threat.

This makes no sense at all. If you list only your domains in rcpthosts, then only mail from those domains will be accepted. Exception: the RELAYCLIENT environmental variable set by /etc/tcp.smtp.cdb or another method, will allow certain clients to relay. You haven't provided any information (such as the contents of /etc/tcp.smtp or the output of /var/qmail/bin/qmail-showctl), so it's impossible to tell what you're getting upset about.
Quote:
even using telnet on port 25 i can able to send mails

To whom can you send mails, and why does this cause you concern?
Quote:
How can i control the relay and supress the sending mails using the telnet

Without more information about your server configuration and why you're concerned, it's impossible to answer this question.

Summary:

Provide the full, unedited contents of:

/etc/tcp.smtp
/var/qmail/supervise/qmail-smtpd/run


Provide the full, unedited output of:

/var/qmail/bin/qmail-showctl
__________________
Alex
(http://www.alex-greg.com)

Reply With Quote
  #3  
Old November 6th, 2003, 12:24 AM
prashant_!012 prashant_!012 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Chennai
Posts: 5 prashant_!012 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to prashant_!012
Hi there my /var/qmail/supervise/qmail-smtpd/run look like this

#!/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 QMAILDUDID, 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 2000000 \
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c
"$MAXSMTPD" \
-u "QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd
2>&1


The output of qmail-showctl is here

./qmail-showctl
qmail home directory: /var/qmail.
user-ext delimiter: -.
paternalism (in decimal): 2.
silent concurrency limit: 120.
subdirectory split: 23.
user ids: 501, 502, 503, 0, 504, 505, 506, 507.
group ids: 501, 502.

badmailfrom: (Default.) Any MAIL FROM is allowed.
bouncefrom: (Default.) Bounce user name is MAILER-DAEMON.
bouncehost: (Default.) Bounce host name is merlin.brilliant-it.com.
concurrencylocal: (Default.) Local concurrency is 10.
concurrencyremote: (Default.) Remote concurrency is 20.
databytes: (Default.) SMTP DATA limit is 0 bytes.
defaultdomain: Default domain name is brilliant-it.com.
defaulthost: (Default.) Default host name is merlin.brilliant-it.com.
doublebouncehost: (Default.) 2B recipient host: merlin.brilliant-it.com.
doublebounceto: (Default.) 2B recipient user: postmaster.
envnoathost: (Default.) Presumed domain name is merlin.brilliant-it.com.
helohost: (Default.) SMTP client HELO host name is merlin.brilliant-it.com.
idhost: (Default.) Message-ID host name is merlin.brilliant-it.com.
localiphost: (Default.) Local IP address becomes merlin.brilliant-it.com.
locals:
Messages for merlin.brilliant-it.com are delivered locally.
me: My name is merlin.brilliant-it.com.
percenthack: (Default.) The percent hack is not allowed.
plusdomain: Plus domain name is brilliant-it.com.
qmqpservers: (Default.) No QMQP servers.
queuelifetime: (Default.) Message lifetime in the queue is 604800 seconds.

rcpthosts:
SMTP clients may send messages to recipients at pra.com.
SMTP clients may send messages to recipients at brilliant-it.com.

morercpthosts: (Default.) No effect.
morercpthosts.cdb: (Default.) No effect.
smtpgreeting: (Default.) SMTP greeting: 220 merlin.brilliant-it.com.
smtproutes: (Default.) No artificial SMTP routes.
timeoutconnect: (Default.) SMTP client connection timeout is 60 seconds.
timeoutremote: (Default.) SMTP client data timeout is 1200 seconds.
timeoutsmtpd: (Default.) SMTP server data timeout is 1200 seconds.
virtualdomains:
Virtual domain: pra.comra.com
Virtual domain: brilliant-it.com:brilliant-it.com

defaultdelivery: I have no idea what this file does.
concurrencyincoming: I have no idea what this file does.
rcpthosts.lock: I have no idea what this file does.
virtualdomains.lock: I have no idea what this file does.
locals.lock: I have no idea what this file does.


/etc/tcp.smtp
127.:allow,RELAYCLIENT=""

/var/qmail/control/rcpthosts
pra.com
brilliant-it.com

Reply With Quote
  #4  
Old November 6th, 2003, 04:14 AM
alexgreg's Avatar
alexgreg alexgreg is offline
Full Access
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jun 2000
Location: London, UK
Posts: 2,019 alexgreg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 sec
Reputation Power: 11
Your configuration looks fine. Now, what were you concerned about?

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationMail Server Help > Controlling relay in qmail


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway