Re: [EXIM] Having a program conditionally handle mail

Top Page
Delete this message
Reply to this message
Author: Peter Radcliffe
Date:  
To: exim-users
Subject: Re: [EXIM] Having a program conditionally handle mail
Jason L Tibbitts III <tibbs@???> probably said:
> Well, we need to try to find a list name in the recipient address. This
> basically involves chopping off /-[^-]+$/ until the result is the name of a
> directory in a certain place.
>
> Generally you have only zero or one things to chop off (list-name,
> list-name-owner) and you have to try the longest match first (to
> disambiguate list and list-announce) but if the local separator is '-' then
> Mj2's VERPs look like list-owner-MXXXX-1as123AFd and you have more
> interesting problems.
>
> It would be rather simple if the local separator was always '+', (as then
> you could snip it, then always trim zero or one pieces of the address) but
> I've been informed that it can be changed.


I've written some directors and bits to deal with majordomo 1, without
lots of things in aliasfiles. Its not perfect yet, nor pretty, but if
majordomo 2 takes all majordomo mail to one place that would be a _lot_
nicer and easier. The current things I have do at least allow me to add
a list simply by adding majordomo stuff and one line into an aliasfile
(which has the list owner as the

I do things like:

# Automatic majordomo list recognition and resending
majordomo_request:
driver = aliasfile
domains = list.MDOM
transport = majordomo_request
file = MAJORDIR/dbm/list
search_type = lsearch
user = majordomo
group = majordomo
errors_to = postmaster@MDOM
suffix = -request
suffix_optional
prefix = request-
prefix_optional

I keep a list of valid lists in MAJORDIR/dbm/list
the prefix and suffix mean [request-]<listname>[-request] are all handled,
and the majordomo_request puts the listname into the majordomo call with
command = "request-answer -C MAJORDIR/majordomo.cf ${local_part}"

I'm sure you could do something similar based on the existance of
a directory instead of a list of lists, I'll sit down and think about
it when I get a chance.
Longest match first/lists with - in them is the biggest problem, I'd assume.

Whats the format of the majordomoII call ?

>   Since directors don't take users, the list directories have to be world
>     readable.


Not true, you can run everything as majordomo, I do this currently.

> Perhaps just maintaining an alias file is the way to go, though. I already
> know this method works, but I wanted to at least check to see if there are
> simpler alternatives.


Not sure about 'simpler' but pretty simple to use once written, easier
to maintain and doesn't depend on as many external files.

P.

-- 
pir               pir@???      pir@???      pir@???



--
*** Exim information can be found at http://www.exim.org/ ***