On Sun, 3 Oct 1999, Bernard Karmilowicz wrote:
> Does a user masquerading solution exist in which it is not necessary to
> add MAILHOST and MAILUSER environment variables for every user on a
> system hosting a half dozen virtual domains with hundreds of users? I
> have read FAQ sections 1.1 and 1.2:
If the mail sent by the users does not come via smtp, qmtp, qmqp, but via
qmail-inject then it is quite easy:
1. move qmail-inject to qmail-inject-bin
2. qmail-inject should contain the following script:
#!/bin/sh
<determine_if_user_should_be_masqueraded>
<if_he_should_be_masqueraded>
export QMAILINJECT="f$QMAILINJECT"
export QMAILNAME="name"
export QMAILHOST="host"
export QMAILUSER="localpart"
export QMAILDEFAULTHOST=$QMAILHOST
<path_to_qmail-inject-bin>/qmail-inject-bin $*
That's all. I am using it and it is working correctly.
Instead of ... you should put in code that extracts from a global
configuration file the appropriate values. This way mail will be
originated from:
name <localpart@host>
Robert Varga