Virtual Hosts/Aliases With QMail (and POP3?)

I just can't seem to understand how to do to three(3) things I want to do.

First: I want to specify 'For all mail sent to user1@mydomain.com, foward to user1@external-arbitrary-domain.com'

Second: I have several domains pointing to one box. After much hassle, I finally got vhosts working with Apache. I want to be able to create mailboxes for 'user1@mydomain.com'; 'user1@myotherdomain.com' etc. With the possibility of usernames being repeated across domains.

Finally: I want users that actually have mailboxes (those not set to forward) to be able to POP3 their messages.  I am thinking I cannot do this with qmail.  How can I?

*sigh*

Thanks in advance.
WarriorPoet42Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gabriel OrozcoSolution ArchitectCommented:
1.- create a .qmail in users home directory, with "&user1@external-arbitrary-domain.com" and nothing else.
also you can do without the user existing:
su - alias
vi .qmail-user1
and enter "&user1@external-arbitrary-domain.com"

(without quotes)

2.- just install vpopmail: http://www.inter7.com/?page=vpopmail

3.- qmail has already a pop3 server. what you need to add is a imap server, I like for courier imap for imap access.

just remember to setup carefully you tcpserver.

also there are some scripts that download, compile install and setup everything for you. I like this one a lot:
http://lazyinstaller.net/

hope this help
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
WarriorPoet42Author Commented:
For question 1 you gave instructions on how I could set up forwarding to an external domain without the mail user having an actual Unix account, but I didn't quite follow.  This is exactly what I wanted, though.

For question 2, I need to install a seperate program to get qmail to answer to multiple domains?  It seemed like it could already do this (rcpthosts or something like that), but I just didn't know how to get everything aligned.

For question 3, I don't want IMAP.  I want users to be able to get their mail via POP3.  If qmail can already do this, how do I set it up?
0
Gabriel OrozcoSolution ArchitectCommented:
1.- when you install qmail, you create an alias account. this is it's username: alias.
 as root, "su - alias" and then create a .qmail-userthatdonotexist
inside put an ampersand and the email address you want. if it is internal, the username part is enough. if it is external, put the whole email address.

2.- qmail can answer multiple domains, but if you want the same username to be a different person on each domain, I recommend you vpopmail. it's easier.

3.- if you want pop3, just follow qmail install steps. my qmail line for that is:

  echo "Starting POP3 Server with tcpserver"
  /usr/local/bin/tcpserver -R -H 0 pop3 /var/qmail/bin/qmail-popup xmtp.mydomain.com \
  /bin/checkpassword \
  /var/qmail/bin/qmail-pop3d Maildir &
  echo "... OK"

0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

WarriorPoet42Author Commented:
1(and 2) To be honest, I would rather give up same user/different domain then deal with new program.

With that in mind, how would I make an alias for a (non) user on a different domain than my main?

0
WarriorPoet42Author Commented:
I tried adding the .qmail-alias file as you said, but the message seem to have ... disappeared.  It is not in the queued for delivery section (where emails to bad recipients seem to go), it has not been rubberbanded back to sender, and it has not been delivered to the forward-recipient
0
Gabriel OrozcoSolution ArchitectCommented:
tail -35 /var/log/maillog should have tell you where qmail sent such email.

if you want many domains to be received with the same users, just add those domains to rcpthosts.

let's make an exercise with the .qmail-alias

I have an email account on another server. say, redimido@experts-exchange.com (I do not have such account in reality)

for your domain, i would do:
su - alias
vi .qmail-redimido
&redimido@experts-exchange.com
(save)

and then,  redimido@yourdomain.com, would be redirected (resent, in fact) to the other email account: redimido@experts-exchange.com

hope this helps
0
WarriorPoet42Author Commented:
I'm not sure what 'tail -35' means, but the logfile at /var/log/maillog says only

"Nov 13 00:00:00 mydomain newsyslog[38682]: logfile turned over"

Once I get this alias thing down, I will be good to go, I think.
0
Gabriel OrozcoSolution ArchitectCommented:
¿?  does your mail server log to another place? which kind of system you're on? I use Linux Slackware, but on Redhat and SuSE I always have seen mail logging to such file...
0
WarriorPoet42Author Commented:
I am running NetBSD.  I should not that it doesn't actually say 'mydomain'.  Names have been changed to protect the ignorant.

Do you know where in the qmail conf files it might specify where it logs to?
0
Gabriel OrozcoSolution ArchitectCommented:
let me read... I would not be able to answer today, as I never worked with qmail on openbsd...

I did some hacks to send log to another place, but working with syslog. on bsd I don't know if you use syslog at all...

could you please try to find the mail log on your logs?

Regards
0
wesly_chenCommented:
Hi,

   Qmail doesn't use syslogd. So you might want to check your qmail config file for "multilog <path of log file>".

Regards,

Wesly
0
wesly_chenCommented:
Hi,

   The FAQs of Qmail have some information, you might want to take a look:
http://cr.yp.to/qmail/faq.html

Wesly
0
WarriorPoet42Author Commented:
Thanks to everyone that helped.  Unfortunately, on a seperate question I was advised to recompile Apache to add in a module I needed . . .  and now it is missing about half a dozen modules I need.  So I will have to re-image the machine.  I can't ask you to wait, so I will just give the lions share of points to Redimido, since he worked with me the longest.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.