View Single Post

  #2 (permalink)  
Old 03-13-2008
Dave Sill
 
Posts: n/a
Default Re: Redirect without local account

antigg@tlen.pl writes:

> I'd like to like to redirect mails for all users @ one domain let's
> say testdomain.net (mx record (testdomain.net . 8888 IN MX
> mypostdomain.net)) specify my mail server with installed qmail:
> mypostdomain.net) to different one mail account @ different domain
> (user@destination.net). How can I set up it with qmail?


You want *@testdomain.net redirected to user@destination.net?

On mypostdomain.net you'd create a virtualhosts entry for testdomain,
e.g.:

echo "testdomain.net:alias-testdomain" >>/var/qmail/control/virtualdomains

Next, create a catch-all .qmail file to do the redirection:

echo "&user@destination.net" >/var/qmail/alias/.qmail-testdomain-default

Add testdomain to rcpthosts:

echo testdomain.net >>/var/qmail/control/rcpthosts

And send qmail-send a HUP signal, e.g.:

qmailctl hup

--
Dave Sill Oak Ridge National Lab, Workstation Support
Author, The qmail Handbook <http://web.infoave.net/~dsill>
<http://lifewithqmail.org/>: Almost everything you always wanted to know.
Reply With Quote