Re: [EXIM] Having a program conditionally handle mail

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Peter Radcliffe
Dátum:  
Címzett: exim-users
Tárgy: Re: [EXIM] Having a program conditionally handle mail
Jason L Tibbitts III <tibbs@???> probably said:
> Yes, all mail comes in through mj_email.


That means only one transport, which would make life easier.
Something like ... (MAJORDIR being the location of majordomo schtuff)

majordomo_send:
driver = pipe
return_path_add = true
path = "MAJORDIR:/usr/local/bin:/usr/bin"
command = "mj_email -d ${domain} -Q"
user = majordomo
group = majordomo
home_directory = MAJORDIR
return_output
log_output

> PR> a list simply by adding majordomo stuff and one line into an aliasfile
> PR> (which has the list owner as the
> This was truncated when it got to me...


Sorry, trailing thought I didn't finish after getting interupted with some
real work ;)
(which has the list owner as the other side of the alias so I use it as
a mapping for list-owner)

> virtual domain being served (which generally coincides with the RHS of an
> address), the list name and the function (-owner, -request, -somecommand).
> We can generally figure out everything from the address, but if the MTA
> doesn't allow us to say "nope, it's not ours" then the MTA has to figure
> out if it's ours before sending it to us. That's the tough part.
>
> For qmail, we take '-d dom.ain -Q' (the address is passed in the
> environment). I'd be happy to use '-d dom.ain -E address' but I don't know
> if/how the domain is available in the director/transport.


Domain is easy.
Conditions are harder.

If I understand correctly, <listname>(-.*)? should be passed to majordomo,
where <listname> is the logest matching name of list.
Thats a bit of a pain :/
Passing -owner, -request and other specific -somethings is easy (suffix
list) but unknown things make it more complicated.

A director that runs after all the others that passes anything starting
with <listname>(-.*)? is possible, I think.

Thinking about it, if the destination of all this mail is the same with
the exception of the domain you don't need to know if its the shorter
or longer of two listnames like foo and foo-announce, if it matches
either you're going to send it to the same place:

majordomo:
transport = majordomo_send
require_files = majordomo:MAJORDIR/${local_part}
user = majordomo
group = majordomo
suffix = -*
suffix_optional
errors_to = postmaster@???

If, like me, you use a subdomain for lists you could use:
(making sure you pick out postmaster first)

majordomo:
transport = majordomo_send
domain = list.WHATEVER
user = majordomo
group = majordomo
no_more
errors_to = postmaster@???

> I didn't realize that directors could run as specific users.


You can specify user and group for most everything. The only thing I don't
think you can specify is the user that aliasfile lookups are done as,
so majordomo aliasfiles (not the list files, but aliasfiles such as
my list of lists) have to be readable by the user exim runs as.

P.

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



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