Hi there,
I'm wondering if anyone could point me in the right direction with
regard to an unusual mail setup.
i have a machine that acts as a smtp/pop3/wwwproxy server for multiple
domains in multiple vlans.
i.e. The linux server is connected to a layer 3 vlan switch on one nic
and out to the internet on another, the inside nic has multiple IP
aliases (one in each vlan). For political reasons (the fact that each
VLAN is a seperate company in the building) there are seperate pop
servers bound to each alias and reading mail from multiple mail
directories and reading multiple passwd files.
The layout is as follows,
inet ---- mailserver ------- 10.1.0.0 (vlan 1) customera.com
|
------- 10.2.0.0 (vlan 2) customerb.com
|
------- 10.3.0.0 (vlan 3) customerc.com
...
Direcories for mail (POP3)
/var/spool/mail/customera.com/
/var/spool/mail/customerb.com/
...
Seperate passwd files (used by the POP3 server only)
/etc/passwd/passwd.customera.com
/etc/passwd/passwd.customerb.com
I have all the back end POP3 stuff sorted but here's the fun bit....
I chose exim as the smtp transport because I reckon it's likely to be
the only mailer that will allow me to easily deliver mail into
different directories for each domain... However, I want it to do the
user lookups (finding the local user) not against /etc/passwd but
against /etc/passwd.domain because the pseudo users will not exist in
/etc/passwd in any form. Couple that with the fact that there will
also probably be seperate alias files for each domain, and it makes
for a horrific mess!
I have the transport set up as follows (which should work?):
local_delivery:
driver = appendfile
file = /var/spool/mail/${domain}/${local_part}
delivery_date_add
envelope_to_add
return_path_add
# required for the pop3 server
group = mail
mode = 0660
The problem of course is that my director for local mail is as
follows:
localuser:
driver = localuser
transport = local_delivery
Now, my guess is that I'll probably have to re-write the localuser
lookup code to handle multiple passwd files using a modified getpwnam()
that I wrote for the pop server...
Is this the case? or can anyone point me at an easier way of doing
this?
Ideally I'd like to do this with config options or a system message
filter rather than go hacking around in the exim codebase (again :>)
Any pointers would be greatly appreciated!
Regards
joev
--
joe vaughan it consultant
tel. +353 1 6790832 email. joe.vaughan@???
fax. +353 1 6799634 web. http://www.esat.net
--
*** Exim information can be found at
http://www.exim.org/ ***