[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

re: [LI] Qmail won't send mail



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

> Sorry._Although_I'm_listed_as_a_best-preference_MX_or_A_for_that_host,
> /it_isn't_in_my_control/locals_file,_
> so_I_don't_treat_it_as_local._(#5.4.6)/

- From the qmail FAQ 

http://www.qmail.org/qmail-manual-html/misc/FAQ.html#5.4.

5.4. How do I allow selected clients to use this host as a relay? I see
that qmail-smtpd rejects messages to any host not listed in
control/rcpthosts. I know I could entirely disable this feature by
removing control/rcpthosts, but I want to be more selective.

Answer: Three steps. First, install tcp-wrappers, available separately,
including hosts_options. Second, change your qmail-smtpd line in
inetd.conf to

   smtp stream tcp nowait qmaild /usr/local/bin/tcpd
   /var/qmail/bin/tcp-env /var/qmail/bin/qmail-smtpd

(all on one line) and give inetd a HUP. Third, in tcpd's hosts.allow, 
make a line setting the environment variable RELAYCLIENT to the 
empty string for the selected clients:  

   tcp-env: 1.2.3.4, 1.2.3.5: setenv = RELAYCLIENT

Here 1.2.3.4 and 1.2.3.5 are the clients' IP addresses. qmail-smtpd 
ignores control/rcpthosts when RELAYCLIENT is set. (It also appends 
RELAYCLIENT to each envelope recipient address. See question 5.5 
for an application.)  

Alternative procedure, if you are using tcpserver: Install tcpcontrol
(http://pobox.com/~djb/tcpcontrol.html). Create /etc/tcp.smtp 
containing

   1.2.3.6:allow,RELAYCLIENT=""
   127.:allow,RELAYCLIENT=""

to allow clients with IP addresses 1.2.3.6 and 127.*. Run

   tcpmakectl /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp

Finally, insert

   tcpcontrol /etc/tcp.smtp.cdb

before /var/qmail/bin/qmail-smtpd in your tcpserver line

Hope this helps
- --s


-----BEGIN PGP SIGNATURE-----
Version: PGP 6.0.2 -- QDPGP 2.60 

iQA/AwUBOBLrHpqQidQMDLaoEQLpagCg/gtDV0Ufy7gEWUWFRCnRIcKRpHAAoJJs
sMqrOhGTcpwAZUqXdQXS6W9o
=v9dx
-----END PGP SIGNATURE-----

Smeagol Gollum | Smeagol@xxxxxxxxxxxx | (aka) Suresh R.
http://www.kcircle.com | http://www.angen.net/~pegasus/
Phone: +(91-40)3736553/3745398 | eFax: +(1-603)590-5437
    Beer is proof that God loves us and wants us to be happy.
            -- Benjamin Franklin 

--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.