Re: [EXIM] Having a program conditionally handle mail

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Jason L Tibbitts III
Dátum:  
Címzett: exim-users
Tárgy: Re: [EXIM] Having a program conditionally handle mail
>>>>> "PH" == Philip Hazel <ph10@???> writes:

PH> How simple is the regex manipulation? Exim can do regexs and stats.


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.

PH> You can write things like


PH> majordomo:
PH> driver = smartuser
PH> transport = majordomo_pipe
PH> require_files = majordomo:/some/thing/$local_part
PH> condition = ${if match{some regex}{$local_part}{yes}{no}}


Perhaps this comes from a lack of familiarity with Exim, but I'm confused
about the following?

  How to deal with -request, -owner?  Is this handled in $local_part?
    If so, how are list names with dashes handled?
  Dependence on the internal layout of Majordomo (which should be
    encapsulated within Majordomo, not exposed to the MTA).
  Since directors don't take users, the list directories have to be world
    readable.


I suppose I should state what I'm trying to emulate here. A qmail user of
Mj2 pointed out that all configuration for a certain domain could be
handled by one line in .qmail-default:

|/path/to/mj_email -d dom.ain -Q

and indeed Mj2 now does that. If the message isn't destined for Majordomo,
we exit with a return code that indicates that we didn't handle the
message and qmail then bounces it.

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.

- J<

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