Re: How to handle mail for multiple (10-15) domains w/o localpart conflicts?

2003-04-07 Thread Ralf G. R. Bergs
On Sun, 06 Apr 2003 22:04:32 +0200, Markus Welsch wrote:

>> Well, performance is not a problem for me. As I already mentioned I'm just 
>> hosting a dozen of domains with only a couple of (low-use) mailboxes 
>> altogether.
>
>Well that really doesn't make a difference, but nevermind !

Well, I think it does. Solutions that are perfect for my needs are probably 
just inacceptable for "real" ISPs (because of the lack of performance, 
comfort, billing facilities, etc.)

>> Sure, but I like the option of quickly having a glance at them using 
"Mutt," 
>> in case something goes wrong etc. This way I can ssh in and remove 
offending 
>> mails, instead having to telnet to 110 and DELE it.
>
>Well you could also set up webmail if you don't like to telnet.

That's right. I will be doing that, in fact, using OpenWebMail (which seems to 
run great UNLESS the home directories are on NFS, which won't be the case for 
me.)

>What do you count to "offending mails" ?

Well, HUGE messages which users can't (or don't want to) download, and which I 
can easily delete using Mutt on the mbox file.

>> What exactly does the above do? I'm sorry but I don't quite get your point.
>
>Well I thought you meant just for some hosts e. g. the mailserver host 
>you would like to have local deliverage and for all others you would 
>like to use cyrus.

Call me stupid but I still don't quite get you. Maybe you would like to 
explain me your point off-list?

>I don't think not using mbox and rather using a better way is not a 
>mistake. And I wouldn't also limit the decision of which 

You're absolutely right, but as I said (because I'm quite familiar with Exim) 
I would like to stick with it unless there are serious (or even compelling) 
reasons to move away fromit. And "better performance" isn't a reason for me 
since the server will be 99% idle all the time.

>POP3/IMAP-server to use just because a MUA can't handle the format of 
>the server ...

Again you're absolutely right, and now that you have reminded me of webmail 
this point is no longer an issue for me.

>> This option I will only consider if there is NO OTHER WAY. I've once 
started 
>> to do that and I have very soon regretted that I did so, so I don't want to 
>> repeat that mistake again.
>
>Those are just php scripts and a sql database creation script. You do 
>not need to compile anything, etc. All it checks for is if you have 
>webserver, php, etc installed.

Ok, in that case I might use it if I don't find a better "environment" for my 
needs.

Thanks,

Ralf


-- 
   L I N U X   .~.
  The  Choice  /V\
   of a  GNU  /( )\
  Generation  ^^-^^





Re: How to handle mail for multiple (10-15) domains w/o localpart conflicts?

2003-04-07 Thread Ralf G. R. Bergs
On Mon, 07 Apr 2003 10:13:43 +1000 (EST), Brad Lay wrote:

[...]
>I've just setup this exact same thing on my mail server. You don't need
>any debian packages for everything. Heres my configs.

Thanks for sharing this with us. As I already pointed out I would really like 
a solution that can be realized without not-yet-Debianized software (even it's 
unofficial packages that I have to use.)

[...]
>   server_condition = "${if eq{${md5:$3}}{${substr_5:${lookup mysql{select 
password_hash from popbox where local_part='${local_part:$2}' and 
domain_name='${domain:$2}'}{$value{1}{0}}"

But how can I *easily* enter new users into MySQL? I'm not exactly a MySQL 
expert... Is there a web interface for these kind of jobs? Maybe as part of 
"vmail-sql?"

>Hope this helped. If you need more help shoot me an email offlist.

Well, I'm currently only collecting infos. I've still to rent my server (I'm 
already running a private one since 5 years or so, but this time I'm providing 
the service for "customers" (read: friends) in a somewhat larger scale (but 
still it's small-scale for "real" ISPs ;-)

>[1] Debian's exim needs to be recompiled to use mysql (I can give you a
>url to the one I created).

That's no problem for me. I published an Exim4 package I created myself LONG 
before there were even experimental official ones. But thanks for your offer, 
and thanks for taking the time of writing this all up.


-- 
   L I N U X   .~.
  The  Choice  /V\
   of a  GNU  /( )\
  Generation  ^^-^^





Re: How to handle mail for multiple (10-15) domains w/o localpart conflicts?

2003-04-07 Thread Ralf G. R. Bergs
On Mon, 07 Apr 2003 12:12:46 +1000, Donovan Baarda wrote:

[...]
>> I don't want to move away from Exim unless there are serious (or even 
>> compelling) reasons to do so.
>
>This has to rate as a FAQ. Time to start documenting it in the wiki;
>
>http://wiki.debian.net/EmailConfiguration
>
>Includes documentation on configuring Debian for Maildir using procmail
>with exim or postfix.

Thank you for taking the time to provide this.

Now that I've had a look at this I still don't see strong reasons NOT to use 
Exim any longer. I do see reasons to migrate to "maildir"-style mailboxes which 
I might do (altho as I mentioned performance probably won't EVER be an issue at 
all since the server will be running more or less "idle.")


-- 
   L I N U X   .~.
  The  Choice  /V\
   of a  GNU  /( )\
  Generation  ^^-^^





Re: How to handle mail for multiple (10-15) domains w/o localpart conflicts?

2003-04-06 Thread Donovan Baarda
On Mon, 2003-04-07 at 02:36, Ralf G. R. Bergs wrote:
> On Sun, 06 Apr 2003 17:55:04 +0200, Markus Welsch wrote:
> 
> [...]
> >Do you need to use Exim ? Or could you switch to Postfix also ? Postfix 
> 
> I don't want to move away from Exim unless there are serious (or even 
> compelling) reasons to do so.

This has to rate as a FAQ. Time to start documenting it in the wiki;

http://wiki.debian.net/EmailConfiguration

Includes documentation on configuring Debian for Maildir using procmail
with exim or postfix.

-- 

Donovan Baardahttp://minkirri.apana.org.au/~abo/





Re: How to handle mail for multiple (10-15) domains w/o localpart conflicts?

2003-04-06 Thread Brad Lay
On Sun, 6 Apr 2003, Ralf G. R. Bergs wrote:
> On Sun, 06 Apr 2003 20:34:30 +0200, Marcin Sochacki wrote:
>
> [...]
> >http://www.ex-parrot.com/~chris/vmail-sql/
>
> Upon first look this looks nice -- but there's no Debian package available
> (AFAIC gather), and it needs tpop3d which also isn't Debianized yet. :-(
>

I've just setup this exact same thing on my mail server. You don't need
any debian packages for everything. Heres my configs.

I have exim+vmail-sql+spamd+exiscan with tpop3 as pop server and UebiMiau
as a webmail (Which has an attachment bug! :-(). A few things you need to
do.

apt-get install clamav exiscan spamassassin exim[1]

If you read the instructions on how to get vmail-sql setup from chris's
url, that'll get that side of things working. SpamAssassin's mysql stuff
is easily integrated into the php version that controls vmail-sql.

# Spam Assassin TRANSPORTS lines (search google for the rest)
spamcheck:
driver = pipe

command = /usr/sbin/exim -oMr spam-scanned -bS
transport_filter = /usr/bin/spamc -u "${lookup mysql{select unix_user from 
domain left join domain_alias on domain_alias.domain_name = domain.domain_name 
where domain.domain_name = '${quote_mysql:$domain}' or domain_alias.alias = 
'${quote_mysql:$domain}'}{$value}fail}"

[..]

spamcheck_director:

# do not use this director when verifying a local-part at SMTP-time
no_verify

# When to scan a message :
#   -   it isn't already flagged as spam
#   -   it isn't already scanned
#   -   it didn't originate locally (as long as I don't harbor spammers :-))
condition = "${if and { {!def:h_X-Spam-Flag:} {!eq 
{$received_protocol}{spam-scanned}} {!eq {$received_protocol}{local}} } {1}{0}}"
driver = smartuser
transport = spamcheck

And SMTP Auth from mysql [needed so people can relay mail through your
mail server].

 plain:
   driver = plaintext
   public_name = PLAIN
   server_condition = "${if eq{${md5:$3}}{${substr_5:${lookup mysql{select 
password_hash from popbox where local_part='${local_part:$2}' and 
domain_name='${domain:$2}'}{$value{1}{0}}"
   server_set_id = $2

 login:
   driver = plaintext
   public_name = LOGIN
   server_prompts = "Username:: : Password::"
   server_condition = "${if eq{${md5:$2}}{${substr_5:${lookup mysql{select 
password_hash from popbox where local_part='${local_part:$1}' and 
domain_name='${domain:$1}'}{$value{1}{0}}"
   server_set_id = $1


This should get you started on the way, all up this complete setup from
start to finish took me about a day, and the only drawback I have found so
far is that delivery of mail takes around 8-10 seconds. If anybody knows
why I'd really like to know! Otherwise the entire system rocks. Now all I
need a nice php/mysql web hosting company billing system I can integrate
into this setup and finish the project!

One last thing, I've also hacked in quota support on the MTA side, but its
slightly flawed. IE: If user1's quota is 1MB, but somebody sends an email
thats 2MB the mail gets frozen. The mail trys to delivery until the
timeout is reached. How would I go about making it bounce permanently if
the email is larger than the users quota!

Hope this helped. If you need more help shoot me an email offlist.

[1] Debian's exim needs to be recompiled to use mysql (I can give you a
url to the one I created).




Re: How to handle mail for multiple (10-15) domains w/o localpart conflicts?

2003-04-06 Thread Markus Welsch
Well, performance is not a problem for me. As I already mentioned I'm just 
hosting a dozen of domains with only a couple of (low-use) mailboxes 
altogether.
Well that really doesn't make a difference, but nevermind !
Sure, but I like the option of quickly having a glance at them using "Mutt," 
in case something goes wrong etc. This way I can ssh in and remove offending 
mails, instead having to telnet to 110 and DELE it.
Well you could also set up webmail if you don't like to telnet.
What do you count to "offending mails" ?
What exactly does the above do? I'm sorry but I don't quite get your point.
Well I thought you meant just for some hosts e. g. the mailserver host 
you would like to have local deliverage and for all others you would 
like to use cyrus.

I don't think not using mbox and rather using a better way is not a 
mistake. And I wouldn't also limit the decision of which 
POP3/IMAP-server to use just because a MUA can't handle the format of 
the server ...

This option I will only consider if there is NO OTHER WAY. I've once started 
to do that and I have very soon regretted that I did so, so I don't want to 
repeat that mistake again.
Those are just php scripts and a sql database creation script. You do 
not need to compile anything, etc. All it checks for is if you have 
webserver, php, etc installed.

Greetings,
Markus



Re: How to handle mail for multiple (10-15) domains w/o localpart conflicts?

2003-04-06 Thread Ralf G. R. Bergs
On Sun, 06 Apr 2003 19:14:03 +0200, Markus Welsch wrote:

>> I don't want to move away from Exim unless there are serious (or even 
>> compelling) reasons to do so.
>
>Okay everybody should know which MTA to use and why. I moved a way from 
>Exim right after a performance comparison with Postfix, etc :-)

Well, performance is not a problem for me. As I already mentioned I'm just 
hosting a dozen of domains with only a couple of (low-use) mailboxes 
altogether.

>> I read that Cyrus doesn't use mailbox files. This is a "con," IMHO, because 
>> that way I can't easily browse mail using "mutt" (or can I?!)
>
>Well you can use POP3/IMAP to connect to your mailbox :-) And anyways I 

Sure, but I like the option of quickly having a glance at them using "Mutt," 
in case something goes wrong etc. This way I can ssh in and remove offending 
mails, instead having to telnet to 110 and DELE it.

>don't know how Exim handles that but with Postfix you have transport 
>maps like you could say,
>
>   mail.server.tld local:
>
>To avoid the usage of Cyrus for mail.server.tld :-)

What exactly does the above do? I'm sorry but I don't quite get your point.

>> There doesn't seem to be a Debian package available?!
>
>I think there is but not at packages.debian.org. As a hint: Don't rely 
>on that Debian package - it looks a bit faulty. I did a manual install 
>which worked fine ...

This option I will only consider if there is NO OTHER WAY. I've once started 
to do that and I have very soon regretted that I did so, so I don't want to 
repeat that mistake again.

>How do you do your system monitoring BTW?

"mon" and "logcheck" is what I use to monitor my stuff. It pretty much does 
what I want.

Ralf


-- 
   L I N U X   .~.
  The  Choice  /V\
   of a  GNU  /( )\
  Generation  ^^-^^





Re: How to handle mail for multiple (10-15) domains w/o localpart conflicts?

2003-04-06 Thread Ralf G. R. Bergs
On Sun, 06 Apr 2003 20:34:30 +0200, Marcin Sochacki wrote:

[...]
>http://www.ex-parrot.com/~chris/vmail-sql/

Upon first look this looks nice -- but there's no Debian package available 
(AFAIC gather), and it needs tpop3d which also isn't Debianized yet. :-(

Anyway, I've added the above to my bookmarks and will keep that package in mind.

Thanks,

Ralf


-- 
   L I N U X   .~.
  The  Choice  /V\
   of a  GNU  /( )\
  Generation  ^^-^^





Re: How to handle mail for multiple (10-15) domains w/o localpart conflicts?

2003-04-06 Thread Marcin Sochacki
On Sun, Apr 06, 2003 at 06:36:14PM +0200, Ralf G. R. Bergs wrote:
> On Sun, 06 Apr 2003 17:55:04 +0200, Markus Welsch wrote:
> 
> [...]
> >Do you need to use Exim ? Or could you switch to Postfix also ? Postfix 
> 
> I don't want to move away from Exim unless there are serious (or even 
> compelling) reasons to do so.

http://www.ex-parrot.com/~chris/vmail-sql/

Marcin




Re: How to handle mail for multiple (10-15) domains w/o localpart conflicts?

2003-04-06 Thread Markus Welsch
I don't want to move away from Exim unless there are serious (or even 
compelling) reasons to do so.
Okay everybody should know which MTA to use and why. I moved a way from 
Exim right after a performance comparison with Postfix, etc :-)

I read that Cyrus doesn't use mailbox files. This is a "con," IMHO, because 
that way I can't easily browse mail using "mutt" (or can I?!)
Well you can use POP3/IMAP to connect to your mailbox :-) And anyways I 
don't know how Exim handles that but with Postfix you have transport 
maps like you could say,

mail.server.tld local:
To avoid the usage of Cyrus for mail.server.tld :-)
There doesn't seem to be a Debian package available?!
I think there is but not at packages.debian.org. As a hint: Don't rely 
on that Debian package - it looks a bit faulty. I did a manual install 
which worked fine ...

Thanks so far,
No problem :-)
How do you do your system monitoring BTW?
Like a daily report or something alike ...
Greetings,
Markus



Re: How to handle mail for multiple (10-15) domains w/o localpart conflicts?

2003-04-06 Thread Ralf G. R. Bergs
On Sun, 06 Apr 2003 17:55:04 +0200, Markus Welsch wrote:

[...]
>Do you need to use Exim ? Or could you switch to Postfix also ? Postfix 

I don't want to move away from Exim unless there are serious (or even 
compelling) reasons to do so.

>has a very powerful virtual user configuration - virtual_maps. Maybe you 
>should take a look at that one if it's the solution you want.

I've had a look at the Exim config -- this sort of virtual domains seems 
relatively easy with Exim, too. You create a file for every domain you handle 
that contains the list of valid localparts. Exim then delivers incoming mail 
into mailbox files under a directory /var/mail/As POP3/IMAP server I suggest Cyrus. Postfix 2 can communicate with 
>Cyrus using LMTP!

I read that Cyrus doesn't use mailbox files. This is a "con," IMHO, because 
that way I can't easily browse mail using "mutt" (or can I?!)

>About creating mailboxes on the web you maybe want to take a look at 
>Web-Cyradm!

There doesn't seem to be a Debian package available?!

>Hope this helps :-)

At least it's a good start to look at. :-)

Thanks so far,

Ralf


-- 
   L I N U X   .~.
  The  Choice  /V\
   of a  GNU  /( )\
  Generation  ^^-^^





Re: How to handle mail for multiple (10-15) domains w/o localpart conflicts?

2003-04-06 Thread Markus Welsch
Hi,
is there a package, HOWTO, or FAQ that aids in or describes how to setup your 
Debian box (with Exim as the MTA) to handle mail for multiple (some 10-15) 
domains without conflicts in the local part of incoming mail? Maybe even let 
them add/delete/configure mailboxes using a web interface?
Do you need to use Exim ? Or could you switch to Postfix also ? Postfix 
has a very powerful virtual user configuration - virtual_maps. Maybe you 
should take a look at that one if it's the solution you want.

As POP3/IMAP server I suggest Cyrus. Postfix 2 can communicate with 
Cyrus using LMTP!

About creating mailboxes on the web you maybe want to take a look at 
Web-Cyradm!

Considering that people also need to fetch their mail using POP/IMAP I guess I 
need a full-blown virtual user solution (since I don't need (want?) my users to 
have system accounts on the box.)

Suggestions, hints, pointers anyone?
Hope this helps :-)
Greetings,
Markus



How to handle mail for multiple (10-15) domains w/o localpart conflicts?

2003-04-06 Thread Ralf G. R. Bergs
Hi there,

is there a package, HOWTO, or FAQ that aids in or describes how to setup your 
Debian box (with Exim as the MTA) to handle mail for multiple (some 10-15) 
domains without conflicts in the local part of incoming mail? Maybe even let 
them add/delete/configure mailboxes using a web interface?

Considering that people also need to fetch their mail using POP/IMAP I guess I 
need a full-blown virtual user solution (since I don't need (want?) my users to 
have system accounts on the box.)

Suggestions, hints, pointers anyone?

Thanks,

Ralf


-- 
   L I N U X   .~.
  The  Choice  /V\
   of a  GNU  /( )\
  Generation  ^^-^^