.qmail - deliveries and bounces
I'm still using qmail-1.01 on that machine. Today I noticed something did (no longer) work, what I thought already did (and I have a few of the emails in my folder dated later than the last modification date of the .qmail file) I want to create a bounce message for accounts of ppl that no longer work here, but I also want to drop the mail into a valid users mailbox. ~alias/.qmail-joe: [EMAIL PROTECTED] | (cat /var/qmail/alias/NO-WORKER.TXT; exit 100) (which I thought already worked, doesn't any longer) only a bounce message is delivered. However if I use ~alias/.qmail-joe: |forward [EMAIL PROTECTED] | (cat /var/qmail/alias/NO-WORKER.TXT; exit 100) it works as expected. WHY? :-)) and are the few messages I had in my box "an accident" ? \Maex -- SpaceNet GmbH | http://www.Space.Net/ | Yeah, yo mama dresses Research Development| mailto:[EMAIL PROTECTED] | you funny and you need Joseph-Dollinger-Bogen 14 | Tel: +49 (89) 32356-0| a mouse to delete files D-80807 Muenchen | Fax: +49 (89) 32356-299 |
Re: .qmail - deliveries and bounces
On Tue, 7 Sep 1999, Markus Stumpf wrote: ~alias/.qmail-joe: [EMAIL PROTECTED] | (cat /var/qmail/alias/NO-WORKER.TXT; exit 100) (which I thought already worked, doesn't any longer) only a bounce message is delivered. However if I use ~alias/.qmail-joe: |forward [EMAIL PROTECTED] | (cat /var/qmail/alias/NO-WORKER.TXT; exit 100) it works as expected. WHY? :-)) and are the few messages I had in my box "an accident" ? Because forward deliveries () are always processed at last, and exit code 100 means permanent failure which prevents all not processed deliveries, which includes all forwards, because the failing delivery was a program delivery, so all forwards were to be processed. If you use 99, then it will process all previous delivery instructions in file order, so even if they were forwards, but no deliveries of the unread part of the .qmail file. This imitates the mentioned behaviour most closely, but this does not give an error message. Or of course you can use exit 0. See more at the end of the manpage of dot-qmail. Robert Varga
Re: .qmail - deliveries and bounces
Markus Stumpf writes: I want to create a bounce message for accounts of ppl that no longer work here, but I also want to drop the mail into a valid users mailbox. ~alias/.qmail-joe: [EMAIL PROTECTED] | (cat /var/qmail/alias/NO-WORKER.TXT; exit 100) (which I thought already worked, doesn't any longer) only a bounce message is delivered. No, it never worked. However if I use ~alias/.qmail-joe: |forward [EMAIL PROTECTED] | (cat /var/qmail/alias/NO-WORKER.TXT; exit 100) it works as expected. Right. That's because program deliveries are handled in order, while forwards ('' deliveries) are done all at once at the end. Actually, what you're doing in the second version is unreliable in the general case. What if the second program delivery sometimes succeeded, sometimes exited 100 and sometimes 111 (depending on the contents of the email message, say). Well, every time it exited 111, the |forward delivery would be re-executed and you'd get mail duplication. The reliable way to do two program deliveries is to do one of them in one .qmail file, and the other in another. Like this: cat ~alias/.qmail-joe EOF |forward [EMAIL PROTECTED] joe-bounce EOF cat ~alias/.qmail-joe-bounce EOF |cat NO-WORKER.TXT; exit 100 EOF BTW, you don't need to put those commands in parens -- those two commands don't need to be executed by the same shell invocation. Also, the current directory for a program delivery in a .qmail is the controlling user's home directory. -- -russ nelson [EMAIL PROTECTED] http://russnelson.com Crynwr sells support for free software | PGPok | Government schools are so 521 Pleasant Valley Rd. | +1 315 268 1925 voice | bad that any rank amateur Potsdam, NY 13676-3213 | +1 315 268 9201 FAX | can outdo them. Homeschool!