Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Virtual Hosts/Aliases With QMail (and POP3?)

Posted on 2004-11-12
13
Medium Priority
?
453 Views
Last Modified: 2010-03-18
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.
0
Comment
Question by:WarriorPoet42
  • 6
  • 5
  • 2
13 Comments
 
LVL 19

Accepted Solution

by:
Gabriel Orozco earned 1440 total points
ID: 12570351
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
 

Author Comment

by:WarriorPoet42
ID: 12570883
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
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 12571020
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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 

Author Comment

by:WarriorPoet42
ID: 12571207
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
 

Author Comment

by:WarriorPoet42
ID: 12571268
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
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 12571464
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
 

Author Comment

by:WarriorPoet42
ID: 12571489
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
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 12571519
¿?  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
 

Author Comment

by:WarriorPoet42
ID: 12571535
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
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 12571636
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
 
LVL 38

Assisted Solution

by:wesly_chen
wesly_chen earned 60 total points
ID: 12572208
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
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12572221
Hi,

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

Wesly
0
 

Author Comment

by:WarriorPoet42
ID: 12574643
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

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question