On Fri 1999-01-29 (22:33), Paul Halliday wrote:
> Hi folks,
[snip]
> What's the best strategy to approach this with qmail?
>
> Thus far I'd decided on a virtualdomain as follows:
>
> companydomain:alias-companydomain
>
> and in ~alias/.qmail-company-domain:
>
> | preline -d -f swap_from | qmail-remote relay.ourdomain $SENDER
> $RECIPIENT
>
> 'swap_from' is obviously a program to explicitely change the From: field
> to the company required one one.
I think what you need is new-inject from Dan's mess822 package. It rewrites
mail addreses according to rules that you specify and then reinserts the
message into the queue. You can get the package from:
http://pobox.com/~djb/software.html
Take a look at the new-inject(1) and rewriting(5) man pages. I've not used it
before but as I understand it you'd put:
| newinject
in ~alias/.qmail-company-domain, putting the rewriting rules in
control/rewrite.
> This solution works OK in normal circumstances but is not at all robust
> because if the relay is down then the mail gets lost. It seems as though
> qmail-send isn't designed to listen to what a virtualdomain returns - it
> just deletes it from the queue and assumes the piped programs will know
> what to do with it(?)
I think reinserting the rewritten message into the queue will solve the
problem of the remote relay not being available.
> I hope someone can tell me that I'm doing it all wrong and that there's a
> simpler and more robust way of solving this header re-writing problem
> efficiently!
The mess822 package is even cooler than I though it was :-)
> Many thanks in advance,
> Paul
- Keith
--
Keith Burdis - MSc (Com Sci) - Rhodes University, South Africa
Email : [EMAIL PROTECTED]
WWW : http://www.rucus.ru.ac.za/~keith/
IRC : Panthras JAPH
"Any technology sufficiently advanced is indistinguishable from a perl script"
Standard disclaimer.
---