qmail relaying

I just installed qmail and am having some trouble with relaying (at least that what i think)  when i delete my /var/qmail/control/rhcphost file everything works fine. but when its there i cant send a message to anybody whos domain is not in that file.  I thought that relaying was just to prevent people from sending messages through your smtp from places that were not specified.  I didnt think it mattered where the messages were addressed.

what i want to happen is relaying only to be allowed from localhost and my internal network. But i want to be able to send mail to anyone with out adding there domain to the rhcpfile

Any help would be great
lugnut1221
lugnut1221Asked:
Who is Participating?
 
dkietaConnect With a Mentor Commented:
You only want to allow relaying for your local net, not anyone else.

If you set up the tcpserver as cReverd explains, and define your entire internal network in the SMTP database. That will allow for relaying for local machines and deny relaying to anyone that is not defined in that database. (The internal machines will be able to send mail to ANYONE, external machines will only be able to send mail to YOU!)

Just put your domain in the rcpthosts file, and all should work for you.
0
 
cReverdCommented:
Hi,

You just have to set up both /var/qmail/control/rcpthosts and /var/qmail/control/virtualdomains with a fully qualified domain names list.

Then using the TCPserver you have to setup the SMTP database access with your authorized IP address :

192.168.0.*:allow,RELAYCLIENT=""
10.0.0.*.*:allow,RELAYCLIENT=""
:allow

Dan Bernstein's ucspi-tcp package is available at http://cr.yp.to/ucspi-tcp.html

And finally rebuild the SMTP database :

tcprules tcp.smtp.cdb tcp.smtp.temp < tcp.smtp

It should works as you expect !

Christophe Reverd
Xon-Xoff, Paris.
0
 
lugnut1221Author Commented:
Thats what i did do but i cant possible put all ips that i want to recieve from or send to...i thought the relaying only limited where you could send the mail from.
0
 
cReverdCommented:
Relay option is for YOUR local IP range not worlwide one !

Try this please.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.