Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

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
0
lugnut1221
Asked:
lugnut1221
  • 2
1 Solution
 
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
 
dkietaCommented:
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now