--
On Fri, 2003-07-18 at 12:36, Arnar Birgisson via COM.BOX TEMA wrote:
> This is the thing: I want to make Exim act as a mail hub for an
> internal network. This network has only one domain address, say
> mydomain.com. Now, some of the users are running groupware clients and
> their mail should be redirected to the grouware server for storage.
> Other users are using POP-only clients or unix mailboxes and their
> message should either be forwarded to a different smtp host, or stored
> locally (depending if the mail hub will be the same box as the internal
> mail server).
>
> However, the address domain should be the same both for the groupware
> users and others. What ways do I have of looking up the local part,
> possibly in a SQL database, and deciding which transport to use?
If you don't want to use alias databases, you can do it in exim.conf.
This here should be close to a working setup:
# Router 1 looks up the local part in mysql and, if found,
# calls the transport "exchange_weenies" (which is just SMTP delivery)
sort_users_out:
driver = manualroute
domains = mydomain.com
local_parts = mysql;SELECT * FROM gw_users WHERE username='$key'
transport = exchange_weenies
host_find_failed = defer
route_list = * 1.2.3.4 [1.2.3.4 = your groupware server]
no_more
# Router 2 catches the local users on this machine. If you want to
# send them somewhere else, use another manualroute router with a
# different IP address.
localuser:
driver = accept
domains = mydomain.com
check_local_user
transport = local_delivery
#
# and these would be the mentioned transports
#
exchange_weenies:
driver = smtp
local_delivery:
driver = appendfile
file = /var/spool/mail/$local_part
delivery_date_add
group = mail
mode = 0660
mode_narrower = false
- Torsten
--
Content-Description: This is a digitally signed message part
[ signature.asc of type application/pgp-signature deleted ]
--