On Wed, Nov 17, 1999 at 11:27:53AM +0100, Thomas Breder wrote:
> Example:
> [EMAIL PROTECTED] should be delivered locally
> and
> [EMAIL PROTECTED] should be directed to another server
>
> using the workaround with |forward "$LOCAL"@yourorg" (refer to FAQ 4.1) is
> not suiteable, because it changes the domain-component from myorg.com to
> yourorg.com.
>
> I found the following working solution:
> I insert the following line in ~/alias/.qmail-default
> |/var/qmail/bin/qmail-remote "$HOST" "$SENDER" "$RECIPIENT"
>
> Am I running in any trouble using this solution??
This is dangerous. qmail-remote _always_ exits with a code of 0, so the
delivery will always appear to be successful. If the remote host is
unreachable, the message will be lost. I have another idea for you:
virtualise your domain, so that you can selectively treat some addresses
as local, and other as remote.
MAKE SURE TO REMOVE myorg.com FROM control/locals.
in control/smtproutes:
myorg.com:name.of.the.other.machine
in control/virtualdomains:
myorg.com:
[EMAIL PROTECTED]:alias-myorglocal
[EMAIL PROTECTED]:alias-myorglocal
The above 3 lines mean:
1. [EMAIL PROTECTED] and [EMAIL PROTECTED] are really local, and their
mail is handled by ~alias/.qmail-myorglocal-default
[ in ~alias/.qmail-myorglocal-default you would put
|forward "$EXT2"@localhost ]
2. <anything else>@myorg.com is remote, and will therefore be handled by
qmail-remote, which will look up the smtproutes file and deliver the
email to the other machine.
Finally, send a HUP signal to qmail-send.
See the qmail-send man page for more details on handling addresses with
virtualdomains.
--
See complete headers for more info