Re: Disable envnoathost?

2000-12-19 Thread Peter Samuel

On Mon, 18 Dec 2000, Charles Cazabon wrote:

 Kris Kelley [EMAIL PROTECTED] wrote:
  
   To save some work, you could use Bruce Guenter's QMAILQUEUE patch, and
   insert your filter inbetween qmail-inject and qmail-queue instead...
  
  Actually, there are no local users on these boxes, per se, so the filter
  would have to be between qmail-smtpd and qmail-queue.  Otherwise, this makes
  sense.  I'll keep it in mind.
 
 If I'm not mistaken, qmail-smtpd calls qmail-inject, which calls qmail-queue.

This time you are mistaken :) qmail-smtpd calls qmail-queue. See the
INTERNALS file that is shipped with the source.

 I belive Bruce's patch changes _all_ qmail programs which call qmail-queue
 to look at the contents of QMAILQUEUE (or similar) environment variable, and
 if set, to call that instead of qmail-queue directly.  Therefore it would
 work in this case.  Just have tcpserver set QMAILQUEUE to 
 "/path/to/my/filter", and filter calls qmail-queue.

Correct.

-- 
Regards
Peter
--
Peter Samuel[EMAIL PROTECTED]
http://www.e-smith.org (development)http://www.e-smith.com (corporate)
Phone: +1 613 368 4398  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

"If you kill all your unhappy customers, you'll only have happy ones left"




Re: Disable envnoathost?

2000-12-19 Thread Kris Kelley

Charles Cazabon wrote:
 If I'm not mistaken, qmail-smtpd calls qmail-inject, which calls
qmail-queue.

According to DJB's schematics, qmail-smtpd calls qmail-queue directly.
From the INTERNALS file (also noted by Peter Samuel):

 qmail-smtpd --- qmail-queue --- qmail-send --- qmail-rspawn ---
qmail-remote
   / |  \
qmail-inject _/ qmail-clean  \_ qmail-lspawn --- qmail-local

 I belive Bruce's patch changes _all_ qmail programs which call
qmail-queue...
 Therefore it would work in this case.

You're right, it would.  I was just being a tad anal. :)

Also, to be completely fair, you provided a solution that's exactly what I
asked for.  Mark Delany's solution will still result in the message being
accepted and then bounced, but in this case the bounce will have a more
accurate explanation about why it was bounced.  That's good enough for me.

Again, thanks for the help!

---Kris Kelley




Re: Disable envnoathost?

2000-12-18 Thread Charles Cazabon

Kris Kelley [EMAIL PROTECTED] wrote:
 Is there a way to disable qmail-send's use of the envnoathost control file,
 so that any message bound for an address without an @ sign is simply
 refused?

Write a wrapper script around qmail-queue, perhaps, which checks that
a domain was specified for addresses.  Exit with 100 or 111 if your
preconditions aren't met properly.  Then rename qmail-inject to
real-qmail-inject and have your wrapper call it after its satisfied with
its input.

To save some work, you could use Bruce Guenter's QMAILQUEUE patch, and
insert your filter inbetween qmail-inject and qmail-queue instead.  The
filter would be easier, as well, because you wouldn't have to parse the
message for recipient addresses.  There's pointers to Bruce's work at
www.qmail.org, or have a look at http://em.ca/~bruceg/ .

Charles
-- 
---
Charles Cazabon[EMAIL PROTECTED]
GPL'ed software available at:  http://www.qcc.sk.ca/~charlesc/software/
Any opinions expressed are just that -- my opinions.
---



Re: Disable envnoathost?

2000-12-18 Thread Mike Jackson



On Mon, 18 Dec 2000, Kris Kelley wrote:

 Is there a way to disable qmail-send's use of the envnoathost control file,
 so that any message bound for an address without an @ sign is simply
 refused?

 I know I could put something like nonexistenttrashdomain.com in envnoathost
 so that all such messages would get bounced back to the sender, but I'm
 hoping for a cleaner solution, and hopefully one that doesn't involve code
 hacking.

 Thanks!

 ---Kris Kelley



 Its really simple. Just delete the envnoathost file and it doesnt get
used.

Mike





Re: Disable envnoathost?

2000-12-18 Thread Kris Kelley

Charles Cazabon wrote:
 Write a wrapper script around qmail-queue, perhaps, which checks that
 a domain was specified for addresses...

 To save some work, you could use Bruce Guenter's QMAILQUEUE patch, and
 insert your filter inbetween qmail-inject and qmail-queue instead...

Actually, there are no local users on these boxes, per se, so the filter
would have to be between qmail-smtpd and qmail-queue.  Otherwise, this makes
sense.  I'll keep it in mind.

Mark Delaney wrote:
 Put nonexistenttrashdomain.com in envnoathost *and* virtualdomains
 with a catch-all .qmail-default that has something like:

 | bouncesaying "No recipient domain = No delivery"

Think I'll try this one first. :)

Thanks for the help!

---Kris Kelley




Re: Disable envnoathost?

2000-12-18 Thread Charles Cazabon

Kris Kelley [EMAIL PROTECTED] wrote:
 
  To save some work, you could use Bruce Guenter's QMAILQUEUE patch, and
  insert your filter inbetween qmail-inject and qmail-queue instead...
 
 Actually, there are no local users on these boxes, per se, so the filter
 would have to be between qmail-smtpd and qmail-queue.  Otherwise, this makes
 sense.  I'll keep it in mind.

If I'm not mistaken, qmail-smtpd calls qmail-inject, which calls qmail-queue.
I belive Bruce's patch changes _all_ qmail programs which call qmail-queue
to look at the contents of QMAILQUEUE (or similar) environment variable, and
if set, to call that instead of qmail-queue directly.  Therefore it would
work in this case.  Just have tcpserver set QMAILQUEUE to 
"/path/to/my/filter", and filter calls qmail-queue.

Charles
-- 
---
Charles Cazabon[EMAIL PROTECTED]
GPL'ed software available at:  http://www.qcc.sk.ca/~charlesc/software/
Any opinions expressed are just that -- my opinions.
---