procmail
[Top] [All Lists]

Re: procmail not right for `virtual domain'

2001-03-08 02:51:43

Subject: Re: procmail not right for `virtual domain'


Kevin Handy <kth(_at_)srv(_dot_)net> writes:
I've been working on the problem of mail/virtual hosts and have
been implementing the following (on a Linux system, sendmail,
procmail, qpopper)
If you would please install linuxconf I can show you this in 2 minutes,


 ...
2. Store mail in '/var/spool/mail/host/user(_at_)host' instead of just
  '/var/spool/mail/user' (requires change to sendmail.cf and
  procmail). The procmail change just adds a '-s' option to
  specify the host part of spool directory. Local users
  (ie. root without a hostname) are sent to standard location
  so that cron can send messages there.
...
These changes allow for a user 'john' to be used on the same
machine for different virtual domains. (john(_at_)net1, john(_at_)net2,
etc) I can send mail to the users, and can (manually) connect
up to my test machines pop3 port, login, and access mail.
yes, john can have domains, however if john exists as a local user you are
screwed.  Once again LinuxConf


Mail send to 'john(_at_)host1' goes into
'/var/spool/mail/host1/john(_at_)host1'
...
The changes are all small, and a little rough yet, but they
work well for me. Am willing to share them if there is intrest
in anyone going this direction.

Hmm, I assume you use a database other than the normal password file
for qpopper's authentication, no?  This'll also have to be a closed
server (no logins from mere mortals) because the 'real' user john owns
the spools for all the virtual johns.  Rcfile content will have to be
tightly controlled for the same reason.

No, John owns nothing.  The account name becomes
john(_at_)domain(_dot_)com

This allows the server to seperate the email.  I have done this many times
now.  My customers are all pleased.

Given those constraints, it would seem that this could be done with an
unaltered procmail using the -a flag to pass the virtual domain info
into the /etc/procmailrc file, which would then reset DEFAULT and ORGMAIL
(this is safe only because it is a closed server).

Or am I missing something?

Yes, LinuxConf allows this setup and makes it simple.

(You idea is interesting, I'm just not sure I understand it enough
to see any benefits.)

The benefits are incredible.  What if you had one box
RAQ2.YOURDOMAIN.COM

you have a user called somedomain
somedomain now pops us several times... I have ten users called john, and 20
named Bill they all have unique email addresses.  bill(_at_)dom1(_dot_)com
bill(_at_)dom2(_dot_)com Works well. As I said, I run my servers this way. 
Anyone want
a complete HOWTO?

Regards
Andrew

Philip Guenther
Procmail Maintainer
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail