Re: exim4 for virtual domains

2005-01-16 Thread David Schmitt
On Sunday 16 January 2005 02:51, Stephen Gran wrote:
 This one time, at band camp, David Schmitt said:
  I also have my virtual_domain list in a file:
   [EMAIL PROTECTED]:~$ grep
 
  virtual_domains /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs
 
   domainlist virtual_domains = lsearch*;/etc/mail/virtual-domains

 Why an lsearch* for virtual_domains?  Aah, I see, so that you can make
 [EMAIL PROTECTED], [EMAIL PROTECTED] all work with a *.domain.com?
 I never thought of having that work like that - I like it.  Am I
 correct in this?

Yes, though you have to implement a fallback strategy: 
if /etc/mail/aliases/bar.example.com doesn't exist, /.../example.com should 
be used.

Regards, David




Re: exim4 for virtual domains

2005-01-15 Thread Antonio Rodriguez
I am also interested in this thread, but I find some parts obscure.
Would you please be more explicit in the following

 
 * put this into /etc/exim4/conf.d/router/160_local_virtual_users
 * add a domainlist virtual_domains =  ... to conf.d/main/

that is, what is the syntax for '...' ? would that be
'domainlist virtual_domains =  site1.net:site2.com' ?
 
 /etc/mail/aliases/$domain contains local_part - local_part and 
 local_part - [EMAIL PROTECTED] mappings.
 

and 
/etc/mail/aliases/$domain would be a directory with multiple files,
symlinks, one file in tabular form? 




Re: exim4 for virtual domains

2005-01-15 Thread David Schmitt
On Saturday 15 January 2005 16:16, Antonio Rodriguez wrote:
 I am also interested in this thread, but I find some parts obscure.
 Would you please be more explicit in the following

  * put this into /etc/exim4/conf.d/router/160_local_virtual_users
  * add a domainlist virtual_domains =  ... to conf.d/main/

 that is, what is the syntax for '...' ? would that be
 'domainlist virtual_domains =  site1.net:site2.com' ?

Yes. This list holds all domains for which you want to do these aliases.


  /etc/mail/aliases/$domain contains local_part - local_part and
  local_part - [EMAIL PROTECTED] mappings.

 and
 /etc/mail/aliases/$domain would be a directory with multiple files,
 symlinks, one file in tabular form?

for each domain in virtual_domains you need one aliases-style file to map 
localparts (string in front of the @) from this domain to real email 
adresses.

for example, on my mail server:

 [EMAIL PROTECTED]:~$ cat /etc/mail/aliases/black.co.at 
 postmaster: david
 abuse: david
 david: [EMAIL PROTECTED]
 [EMAIL PROTECTED]:~$ 

I also have my virtual_domain list in a file:
 [EMAIL PROTECTED]:~$ grep 
virtual_domains /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs 
 domainlist virtual_domains = lsearch*;/etc/mail/virtual-domains
 

You also want to go through the acl/ section and add the virtual_host list to 
all domain= tests which test for local_domains.


Regards, David




Re: exim4 for virtual domains

2005-01-15 Thread Stephen Gran
This one time, at band camp, TR RCPG said:
 Would someone kindly post the relevant parts of an
 exim4 configuration for a machine that works as isp
 with virtual domains, and different users (with
 possible not empty intersection set of users for
 different domains)? Some directions about combined
 remote mail retrieval + web access will be
 appreciated.
 thankyouall in advance

I tend to use arrangements like the following:

First, the filesystem:
/etc/exim4/virt_domains/domainA:
  john:  [EMAIL PROTECTED]
  joe:   [EMAIL PROTECTED]
  abuse: [EMAIL PROTECTED]
  *: [EMAIL PROTECTED]
  domainB:
  fred:  [EMAIL PROTECTED]
  abuse: joe

So, one alias file for each domain, stored somewhere.  In the example
above, all addresses in domainA get forwarded to someone at aol.com, but
[EMAIL PROTECTED] gets delivered to the local user joe, while [EMAIL PROTECTED]
ultimately gets forwarded to [EMAIL PROTECTED]

Then, my domainlist is just:

domainlist virt_domains = dsearch;/etc/exim4/virt_domains

Router:
virtual_aliases:
  debug_print = R: virtual_aliases for [EMAIL PROTECTED]
  driver = redirect
  domains = +virtual_domains
  allow_fail
  allow_defer
  require_files = /etc/exim4/virt_domains/$domain
  data = ${lookup{$local_part}lsearch*{/etc/lfrr/exim4/virt_domains/$domain}}
  file_transport = address_file
  no_more

This works best on systems where virtual domains are mostly forwarded,
rather than delivered locally, though.  You can do the same tricks with
SQL, if you prefer faster access once things get too big for file
lookups.

If you want users delivered locally, Wouter's advice is probably very
good.  But, this is the fun and difficult part about exim - the
configuration file is not just about setting config variables that have
a predefined meaning - you get to write your own logic for an
arrangement that works for you.  It can make it more difficult (except
that there are usually snippets floating around for all the common uses),
but it is also way more flexible.
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :[EMAIL PROTECTED] |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


pgp3sOyDOcvEr.pgp
Description: PGP signature


Re: exim4 for virtual domains

2005-01-15 Thread Stephen Gran
This one time, at band camp, David Schmitt said:
 I also have my virtual_domain list in a file:
  [EMAIL PROTECTED]:~$ grep 
 virtual_domains /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs 
  domainlist virtual_domains = lsearch*;/etc/mail/virtual-domains

Why an lsearch* for virtual_domains?  Aah, I see, so that you can make
[EMAIL PROTECTED], [EMAIL PROTECTED] all work with a *.domain.com?
I never thought of having that work like that - I like it.  Am I 
correct in this?
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :[EMAIL PROTECTED] |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


pgps2urXbg2ZB.pgp
Description: PGP signature


Re: exim4 for virtual domains

2005-01-14 Thread Moritz Kobel
Am Thursday den 13. January 2005 schrieb TR RCPG:

 Would someone kindly post the relevant parts of an
 exim4 configuration for a machine that works as isp
 with virtual domains, and different users (with
 possible not empty intersection set of users for
 different domains)? Some directions about combined
 remote mail retrieval + web access will be
 appreciated.
 thankyouall in advance


Hello,

have a look at vexim [1]. this configuration allows you to mamange
multiple domains on one machine using a sql server to configure.
you probably only want to use some parts of the configuration files...

[1] http://silverwraith.com/vexim/


- Moritz

-- 
Erst wenn der letzte Programmierer eingesperrt und die
letzte Idee patentiert ist, werder ihr merken, dass
Anwaelte nicht porgrammieren koennen.
   -- that, in einen Forum auf heise.de


signature.asc
Description: Digital signature


Re: exim4 for virtual domains

2005-01-14 Thread Wouter Verhelst
On Thu, Jan 13, 2005 at 06:14:05PM -0800, TR RCPG wrote:
 --- Wouter Verhelst [EMAIL PROTECTED] wrote:
[...]
 Hi Walter,

It's Wouter :-)

 thank you for answering. Would you recommend following some other
 route, may be postfix or some different combination?

That's up to you. I prefer exim, and it certainly is up for the task;
but if you feel more comfortable with a different MTA, why not use that
one?

 I need something simple and yet with enough power.

Well, then exim will certainly do. One of its original design decisions
was let's not make things needlessly complicated, but it is extremely
powerful.

-- 
 EARTH
 smog  |   bricks
 AIR  --  mud  -- FIRE
soda water |   tequila
 WATER
 -- with thanks to fortune




Re: exim4 for virtual domains

2005-01-14 Thread TR RCPG

--- Wouter Verhelst [EMAIL PROTECTED] wrote:

 On Thu, Jan 13, 2005 at 06:14:05PM -0800, TR RCPG
 wrote:
  --- Wouter Verhelst [EMAIL PROTECTED] wrote:
 [...]
  Hi Walter,
 
 It's Wouter :-)

I'm sorry. My eyes are getting old. {*_|*}

  thank you for answering. Would you recommend
 following some other
  route, may be postfix or some different
 combination?
 
 That's up to you. I prefer exim, and it certainly is
 up for the task;
 but if you feel more comfortable with a different
 MTA, why not use that
 one?
 
  I need something simple and yet with enough power.
 
 Well, then exim will certainly do. One of its
 original design decisions
 was let's not make things needlessly complicated,
 but it is extremely
 powerful.
I agree, but the manual is so BIG! Thats the greatest
problem: reading it all and remembering details. Any
shorter doc that you know about it? Browsing I found
the following:
http://www.marlow.dk/site.php/tech/ispworks
Has anybody used this, how does it rate? It somewhat
seems to fit.




__ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250




Re: exim4 for virtual domains

2005-01-14 Thread Jean-Christophe Montigny
Hello,
TR RCPG wrote:
I agree, but the manual is so BIG! Thats the greatest
problem: reading it all and remembering details. Any
shorter doc that you know about it? Browsing I found
the following:
http://www.marlow.dk/site.php/tech/ispworks
Has anybody used this, how does it rate? It somewhat
seems to fit.
If my memory is good it uses postfix+mysql and courier.
I didn't like it too much, personally. I've looked at what it does with 
the mysql bases and I found it to be a little of a mess.

If you need something very simple, i'm sorry if i introduce yet another 
solution :) but there's qmail + vmailmgr. It uses no mysql base, which 
can be good if you've got a ton of accounts (think of the load on the 
mysql base if that's the case) and uses databases written on the disk 
(cdb format). There's a web interface for that, oMail, which is quite 
simple and is very convenient to use, well, personnally i prefer it to 
ispworks'.

Try 
http://www.faqs.org/docs/Linux-HOWTO/Qmail-VMailMgr-Courier-imap-HOWTO.html

It explains how to get a working qmail (the smtp program) + vmailmgr (to 
have virtual domains) and courier-imap (an imap delivery system, but you 
can have pop3 as well of course)

It will have a link to oMail.
it might sound a little complicated to install, but then the omail 
system is easy to use, if that's what you want. It supports email quotas 
too. I let people who're not techies at all manage their own domain, so 
it tells you how easy it is to use it :)
--
Jean-Christophe Montigny
Responsable serveurs assoces.com
Etudiant à Grenoble Ecole de Management
begin:vcard
fn:Jean-Christophe Montigny
n:Montigny;Jean-Christophe
org;quoted-printable:Association [EMAIL PROTECTED]
adr;quoted-printable:;;12, rue Pierre S=C3=A9mard;Grenoble;FR;38000;France
email;internet:[EMAIL PROTECTED]
title:Responsable Com Web
x-mozilla-html:FALSE
url:http://planetes.assoces.com/
version:2.1
end:vcard



Re: exim4 for virtual domains

2005-01-14 Thread Wouter Verhelst
Op vr, 14-01-2005 te 01:47 -0800, schreef TR RCPG:
   I need something simple and yet with enough power.
  
  Well, then exim will certainly do. One of its
  original design decisions
  was let's not make things needlessly complicated,
  but it is extremely
  powerful.
 
 I agree, but the manual is so BIG!

:-)

 Thats the greatest problem: reading it all and remembering details.

I never read the entire manual; doing that makes no sense at all. What
you really want to do is to get yourself acquainted with the most
important concepts, and search the manual (hit '/' in info) when you
need to know a specific detail; and if you can't find the detail, ask
here or over on [EMAIL PROTECTED]

In my view, those 'most important concepts' are routers, transports,
ACLs, and (especially) string expansion. If you read the manual's
introduction on those topics and make sure you understand the example
configuration file (/usr/share/doc/exim4/examples/example.conf.gz),
you'll know where to go from there.

 Any shorter doc that you know about it? 

I only ever used the manual and the example config file :-)

-- 
 EARTH
 smog  |   bricks
 AIR  --  mud  -- FIRE
soda water |   tequila
 WATER
 -- with thanks to fortune




Re: exim4 for virtual domains

2005-01-14 Thread David Schmitt
TR RCPG wrote:
Would someone kindly post the relevant parts of an
exim4 configuration for a machine that works as isp
with virtual domains, and different users (with
possible not empty intersection set of users for
different domains)? Some directions about combined
remote mail retrieval + web access will be
appreciated.
# This router handles aliasing using the per-domain alias files from
# /etc/mail/aliases/
#
# Piping to programs is disabled per default.
# If that is a problem for you, see
#   /usr/share/doc/exim4-config/README.system_aliases
# for explanation and some workarounds.
virtual_users:
  debug_print = R: virtual_users for [EMAIL PROTECTED]
  driver = redirect
  domains = +virtual_domains
  allow_fail
  allow_defer
  data = [EMAIL PROTECTED]/etc/mail/aliases/$domain}}
  qualify_preserve_domain
  no_more
* put this into /etc/exim4/conf.d/router/160_local_virtual_users
* add a domainlist virtual_domains =  ... to conf.d/main/
/etc/mail/aliases/$domain contains local_part - local_part and 
local_part - [EMAIL PROTECTED] mappings.

Regards, David



exim4 for virtual domains

2005-01-13 Thread TR RCPG
Would someone kindly post the relevant parts of an
exim4 configuration for a machine that works as isp
with virtual domains, and different users (with
possible not empty intersection set of users for
different domains)? Some directions about combined
remote mail retrieval + web access will be
appreciated.
thankyouall in advance



__ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 




Re: exim4 for virtual domains

2005-01-13 Thread Wouter Verhelst
Op do, 13-01-2005 te 11:38 -0800, schreef TR RCPG:
 Would someone kindly post the relevant parts of an
 exim4 configuration for a machine that works as isp
 with virtual domains, and different users (with
 possible not empty intersection set of users for
 different domains)? Some directions about combined
 remote mail retrieval + web access will be
 appreciated.

Exim4 is way too flexible to provide a generic answer to this question.
What you should have is a router that looks up whether the local address
exists in some file or database, and a transport that writes out the
file to an mbox or maildir, possibly in a directory based on the domain.
Something like:

virthost_transport:
  driver = appendfile
  file = /mail/$domain/$local_part

will create an mbox '/mail/grep.be/wouter' for mail sent to
'[EMAIL PROTECTED]'.

Next up is the router. I'll give an example using an lsearch lookup,
because that is by far the easiest way to do this, but if you're
expecting more than a few tens of users and performance is an issue,
you'll want to replace that by another type of lookup (a cdb or ldbm
file, or perhaps something more sophisticated such as an SQL or LDAP
server). Run 'info exim4' and head for 'File and database lookups' for
more info on those.

virthost_router:
  transport = virthost_transport
  condition = ${if match\
{${lookup{$domain}lsearch{/etc/mail/users}}}\
{$local_part}   \
{yes}{no}}

whereby /etc/mail/users is a file containing lines like:

grep.be: wouter roel leen
lists.debian.org: debian-user debian-isp

and so on.

-- 
 EARTH
 smog  |   bricks
 AIR  --  mud  -- FIRE
soda water |   tequila
 WATER
 -- with thanks to fortune




Re: exim4 for virtual domains

2005-01-13 Thread TR RCPG
--- Wouter Verhelst [EMAIL PROTECTED] wrote:

 Op do, 13-01-2005 te 11:38 -0800, schreef TR RCPG:
  Would someone kindly post the relevant parts of an
  exim4 configuration for a machine that works as
 isp
  with virtual domains, and different users (with
  possible not empty intersection set of users for
  different domains)? Some directions about combined
  remote mail retrieval + web access will be
  appreciated.
 
 Exim4 is way too flexible to provide a generic
 answer to this question.
 What you should have is a router that looks up
 whether the local address
 exists in some file or database, and a transport
 that writes out the
 file to an mbox or maildir, possibly in a directory
 based on the domain.
 Something like:
 
 virthost_transport:
   driver = appendfile
   file = /mail/$domain/$local_part
 
 will create an mbox '/mail/grep.be/wouter' for mail
 sent to
 '[EMAIL PROTECTED]'.
 
 Next up is the router. I'll give an example using an
 lsearch lookup,
 because that is by far the easiest way to do this,
 but if you're
 expecting more than a few tens of users and
 performance is an issue,
 you'll want to replace that by another type of
 lookup (a cdb or ldbm
 file, or perhaps something more sophisticated such
 as an SQL or LDAP
 server). Run 'info exim4' and head for 'File and
 database lookups' for
 more info on those.
 
 virthost_router:
   transport = virthost_transport
   condition = ${if match  \
   {${lookup{$domain}lsearch{/etc/mail/users}}}\
   {$local_part}   \
   {yes}{no}}
 
 whereby /etc/mail/users is a file containing lines
 like:
 
 grep.be: wouter roel leen
 lists.debian.org: debian-user debian-isp
 
 and so on.
 

Hi Walter, thank you for answering. Would you
recommend following some other route, may be postfix
or some different combination? I need something simple
and yet with enough power. I will definitely check on
your info. Thank you



__ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail