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

exim: my contrib :)



hi debianers,
after some struggling with exim (mostly due to myself, not to this nice
program) i've found a setup that could be interesting for other people
beside me. so i'd like to contribute it, with the hope it can help someone
and maybe help myself too in bettering my config.

BACKGROUND
i've a small net at home. i've some mboxes at my ISP. i've always had the
problem to separate outbound mail (goint to the Net) from locan (lan) mail.
exim seemed to offer a simpler way, compared to sendmail, and i never liked
smail that much. so i started playing with exim. i couldn't get anything
working with 1.62 (coming with debian 1.3), but i could get something
useful with 1.92 (coming with debian 2.0). here it is.

RELEVANT CONFIG LINES
i set up exim as a permanently connected machine (don't remember how it is 
called during the setup, but i hope you can get it), and i added those 
lines at the very beginning of exim.conf, my isp address as a macro, to be 
used after:

ISPname = my.isp

then, in the router config, i create those two routers:

lan:
  driver = lookuphost
  transport = smtp
  # my.home is my local domain
  domains = "*.my.home"

internet:
  driver = domainlist
  transport = smtp
  route_list = "* mail.my.isp bydns-a"

NOTE:mail.my.isp is my isp smarthost

to rewrite address on outgoing mail, i used this rewriting rule:

*@*.my.home	"${if !match{$header_to:} {@*.my.home\\$} {$1@ISPname} fail
} Ffr

that should mean: if the mail is not going to anything inside my.home,
change domain to ISPname.

TEST
i haven't fully tested my config. i tried with different addresses and saw
that:
- local delivery is still working
- lan delivery is working
- internet messages get spooled, waiting for delivery with adresses
  properly rewritten
in the next future, i'll try to test the whole process

STILL TO BE DONE
what i'd like to get is the ability to properly rewrite headers based on
sender identity and message destination. this set up would be more general
and usefull if i could do something like this:

msg from		msg to		proper sender address
==================================================================
me@my.home		a@inter.net	my_isp_accout@my.isp
me@my.home		a@my.home	me@my.home
you@my.home		c@inter.net	my-new_isp@my.other.isp

i've tried with rewriting rules with linear lookup, but failed until now
i've also tried adding and removing headers, but nothing happens

DISCLAIMER
i'm not smart enough to promise anything, forget about any warranty. :)

CREDITS
much of what i obtained is derived (when correct) from messages by:
- exim docs
- george bonser
- mike orr
- paul sloothman
- martin madlik
thanks to all of them. i hope i didn't forget anyone

WISHES
i'd like to see exim as the debian default MTA

PS: if anyone wants my complete exim.conf, feel free to e-mail me.
-- 
||    || |||||||  Marco Frattola                     Microsoft is not the answer
||`..'|| |||...   Piacenza, Italy                    Microsoft is the question
|||  ||| |||''    mfrattola@enjoy.it                 "No" is the answer
|||  ||| |||      www.enjoy.it/users/~mk/index.html  Live Linux, live free!


Reply to: