[NTLUG:Discuss] qmail virtual mail help please
Shane Wickson
grover at kludge.org
Thu Sep 30 11:40:40 CDT 1999
On Thu, Sep 30, 1999 at 11:01:14AM -0500, Keith From wrote:
> I have RTFM, man pages, and qmail archives and I dont
> see why this doesnt work. Perhaps someone here can
> see what I am overlooking.
>
> I am setting up 4 mail boxes for laiken.com
> Here are my files and what I have done.
>
> /var/qmail/control/virtualdomains
> laiken.com:laiken001
> laiken.com:laiken002
> laiken.com:laiken003
> laiken.com:laiken004
> southwestern-av.com:swav001
Ok, delete all these laiken references. You want one reference to one
mailbox in the virtualdomains file. This mailbox will handle all the
mail for the domain. If you don't understand, just trust me for a sec,
all will be made clear.
Now, add a line in virtualdomains like:
laiken.com:laiken
Now, all email will go to the user laiken. So, we need to split it up.
In the homedir for "laiken", add the .qmail-brian file. Inside that
file should be one line that reads:
&laiken001 at localhost
******************
NOTE: localhost may not work. You would do well to expand this
to your local host's fully qualified domain name. For instance, if
this computers name is mail.cbssolutions.com, you'd want to put:
&laiken001 at mail.cbssolutions.com
******************
In .qmail file, the & beginning a line instructs qmail to deliver the
message to the email address following it.
Now, repeat this for the rest of the addresses. So
.qmail-info contains "&laiken002 at ..."
.qmail-webmaster contains "&laiken003 at ..."
.qmail-postmaster contains "&laiken004 at ..."
> and last, but not least, when I was finished, I did:
> killall -HUP qmail-send
After you change the virtualhosts file, you need to do this command.
However, you won't need to do this after modifying .qmail files.
So, whenever an email message comes that's destined for laiken.com,
qmail looks in the virtualhosts file to find out which user account
handles mail for that domain. Finding "laiken", it then looks in laiken's
home directory for .qmail-* files to direct it to where to deposit the
message.
Make sense? If I need to elaborate on anything, let me know. I worked
for an ISP running a qmail server for over two years, and I might have
glossed over something important.
Shane
More information about the Discuss
mailing list