You'll need to specify a virtual_maps file.  Take a look at the
sample_virtual.cf file (probably in /etc/postfix/), which should get you
pointed in the right direction.

The virtual file will need to contain something like the following:

domainname.com virtual
address at domainname.com username
address2 at domainname.com username
otherdomain.com virtual
address at otherdomain.com username

Whitespace is significant in this file.  Don't forget to run 'postalias'
on this file after you make changes (it needs to be hashed, much like
/etc/aliases).

Username above represents the user on the system that should get e-mail
sent to that address.  If you've got lots of domains that you're hosting
it can be a pain to maintain, but it does allow you to do neat things like
having info at domainname.com and info at otherdomain.com go to their respective
domain owners (which I could never figure out how to do under sendmail,
but I'm sure sendmail could do it also).  You do not need to specify a
virtual entry for whatever domain your box is set to respond as in
/etc/postfix/main.cf.

Also, if you feel like spending some money, I'd recommend a book:
'Postfix' by Richard Blum, published by SAMS.  The ISBN is 0-672-32114-9.

Jeff


On Sat, 22 Dec 2001, Florin Iucha wrote:

> On Sat, Dec 22, 2001 at 09:08:44AM -0600, Timothy Wilson wrote:
> > Hi everyone,
> >
> > Santa's going to be delivering a domain name and little Web page to my
> > parents this year. There's starting up a very small business and I
> > noticed that the domain name was available and registered it. I plan to
> > host a little Web page on my home server for them and I'm hoping to be
> > able to handle some email with that domain as well.
> >
> > I've got a single static IP from Visi and I know that I can do
> > name-based virtual hosting with Apache for the Web page. I'm wondering
> > about the email though. My current domain is qwerk.org and I can send
> > and receive mail through there. Can I, using a single IP address, get
> > Postfix to handle email transparently for littlecreektrees.com as well?
>
> Coming in it's easy: append littlecreektrees.com to "mydestination" in
> /etc/postfix/main.cf .
>
> Going out it's trickier: if that box handles email only for
> littlecreektrees.com then add "myorigin = littlecreektrees.com" and
> "append_at_myorigin = yes" to /etc/postfix/main.cf . That is called "trivial
> rewrite".
>
> If that box has to handle more mailhosts then... I don't know but for
> sure it can be done.
>
> florin
>
>