On Wed, May 05, 1999 at 04:03:01PM -0400, Russell P. Sutherland wrote:
> I have configured a qmail machine to be a pure email gateway/relay
> (no local delivery in terms of deliverying a message to a local mailbox)
> using virtualdomains.
>
> All incoming email gets routed based upon the recipient address
> as follows:
>
> rcpt address smtp host
>
> [EMAIL PROTECTED] -> name.domain.com
> [EMAIL PROTECTED] -> smtp.domain.com
> user@*.domain.com -> smtp.domain.com
> etc...
>
> The MX records for domain.com and the wildcard *.domain
> are pointing at my gateway machine (gateway.domain.com).
>
> I have implemented the routing of incoming email on the relay
> by configuring qmail as follows:
>
> /var/qmail/control:
>
> me: gateway.domain.com
>
> rcpthosts: domain.com
> .domain.com
>
> virtualdomains: domain.com:alias-smtp
> name.domain.com:alias-name
> .domain.com:alias-smtp
>
> smtproutes: smtp.domain.com:[IP addr of smtp.domain.com]
> name.domain.com:[IP addr of name.domain.com]
>
> There are no other files in the control directory.
>
> Note: [ The gateway has no DNS date for any of the machines names
> that it relays data to ].
>
> /var/qmail/alias:
>
> .qmail-smtp-default: |forward ${EXT2}@smtp.domain.com
>
> .qmail-name-default: |forward ${EXT2}@name.domain.com
>
> This configuration seems to "work".
>
> Any comments on items I may have missed or perhaps a "better way"
> to configure this relay?
It can be much simpler than that. Remove the virtualdomains file altogether,
and in smtproutes put:
name.domain.com:[IP addr of name.domain.com]
domain.com:[IP addr of smtp.domain.com]
.domain.com:[IP addr of smtp.domain.com]
That's all you need.
Chris