[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Perhaps strange mail question



On Thu, May 25, 2000 at 11:21:13AM -0400, Dan Brosemer wrote
> I would like to accept mail for many domains and put them in
> separate spool directories.  IE mail to user@foo.domain.org
> would go in /var/mail/foo/user and mail to user@bar.domain.org
> would go in /var/mail/bar/user.
> 
> Q1:  Is this possible?

Yes.
> Q2:  Is this possible with exim?

It looks like it.

A typical exim.conf contains transports including (e.g.):
localuser:
  driver = localuser
  transport = local_delivery

Replace or precede this with
foouser:
  driver = localuser
  transport = foo_delivery
  domains = foo.domain.org

baruser:
  driver = localuser
  transport = bar_delivery
  domains = bar.domain.org

And add local transports for them:
foo_delivery:
  driver = appendfile
  group = mail
  mode = 0660
  mode_fail_narrower = false
  file = /var/mail/foo/${local_part}

bar_delivery:
  driver = appendfile
  group = mail
  mode = 0660
  mode_fail_narrower = false
  file = /var/mail/bar/${local_part}

You would probably also want to customise the other
directors (system_aliases, userforward) to differentiate
between the different domains.

> Q3:  How could I authenticate that user existed at
> bar.domain.org (when user may not have an account on the
> system) before writing to his/her spool file?
> 

Here is where the problems start.  Exim has to know the UID
to use to write the mailbox; if they don't have an account on
your system then there's no good way with spool mailboxes
to make it so that the legitimate user can access it (without
an account, how do you authenticate them?  without an account,
how can you ensure that they can read the mailbox but others
can't?)

> I think I'd have to use procmail, but then I'd have no idea
> how to tell exim to route _all_ mail through procmail except
> the mail _actually_intended_ for the local machine.
> 
> TIA!
> -Dan
> 


HTH,


John P.
-- 
huiac@camtech.net.au
john@huiac.apana.org.au
http://www.mdt.net.au/~john Debian Linux admin & support:technical services



Reply to: