> Sending mail from host1.my.domain.com through mailer.my.domain.com works,
> but the from:-header still shows [EMAIL PROTECTED] as sender.
> Receiving mail should work because even host1.my.domain.com isn't
> resolvable from the internet, there's the MX-record for my.domain.com
> pointing to mailer.my.domain.com. mailer.my.domain.com has to
> forward mail
> to the other hosts depending on the receipient host.

Incorrect. If an external user attempts to send e-mail to
host1.my.domain.com, then their SMTP relay will lookup that FQDN and see
where e-mail should be delivered. If there is no A, CNAME or MX record for
it, it won't be delivered. Simple. MX records only work for [EMAIL PROTECTED],
not any hosts further down the tree.

> But I'd like to have the outgoing from:-header rewritten by
> mailer.my.domain.com. When it sends out a mail from
> [EMAIL PROTECTED], the from:-line should be translated into
> something like [EMAIL PROTECTED] or maybe
> [EMAIL PROTECTED] (or something similar, it doesn't really
> matter to me how the translated address looks like, as long as
> any user can
> send mail this way). On the incoming side, a mail to
> [EMAIL PROTECTED] should be forwarded to
> [EMAIL PROTECTED]

Get your users to change their From addresses in their mail clients, or edit
control/me in qmail to be the domain name not the hostname. Either that or
patch qmail yourself to rewrite headers, but no doubt that is breaking a few
RFCs...

> I don't know how I should start - I could setup .qmail-files for
> every user
> I want to forward mail from mailer.my.domain.com to another host in the
> local network, but that's not a real solution because any user on
> any host
> in my local network should be able to send mail. I guess it maybe
> could be
> realized with virutal domains - but I haven't completly understood how to
> set it up.

Well, fastforward would be more efficient and easier to manage than .qmail
files, but still what I do is have a master server, and all the other hosts
around the place export NFS shares. The master server mounts these shares,
and all mail to [EMAIL PROTECTED] ends up in their $HOME/Maildir/ (the home
directory simply read from passwd, of course). It doesn't matter where their
computer is. Since NFS is simply 'mounting' a remote directory, it appears
local. Then all other computers can simply route mail to the master server
to be delivered. I don't do this, because we have many servers around the
city and we try to be as efficient as possible (we don't want local mail to
be rerouted across the city, and back again). I have NIS in place and
various other things designed to make bandwidth usage as small and sane as
possible, but I've just described a simplistic but reasonable approach that
you can implement without too much trouble.

Hope this has helped.

/BR

Manager
InterPlanetary Solutions
http://ipsware.com/

Reply via email to