Re: [Exim] pipe v. autoreply v. ... ?

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Paul Makepeace
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] pipe v. autoreply v. ... ?
On Mon, Dec 24, 2001 at 02:04:33AM -0800, I wrote:
> I'd like a scheme whereby a particular mail address will process the
> contents of the mail and reply to the user that sent the original mail.
> The body of this reply would contain information based on the original
> mail. (What I'm trying to do is provide an email address people can send
> attachments which then end up on the Web. The variable data in the reply
> is the URL(s) of their original attachment(s).)
>
> So, autoreply seems closest but its reply info seems restricted by
> either coming out of a file or a small amount of text -- I don't see how
> to return variable data with ${perl}. pipe on the other hand will return
> the program's output but fundamentally seems to treat any output from
> the spawned program's output as failure info.
>
> The only other alternative I can see is if the pipe'd program
> subsequently sends its own independent mail (back again). This doesn't
> seem as "neat".


This latter course is the one I took and it seems to work fine. A few
notes for anyone treading this precipitous path --

stripmime_transport:
driver = pipe
command = /home/paulm/bin/stripmime_junk.pl
user = mail
group = mail
return_output

* Make sure the user/group you pick has permissions to do whatever is
needed within the program.

* The return_output option is real time-saver when debugging otherwise
the best you have to go on is an errno value in the bounce message.

* When sending mail from the program, make sure (in Perl-speak)
$ENV{USER} is set to a valid value (I set it to 'mail', a system user)
since the sending address that exim sees seems to be
$ENV{USER}@machine which if the original recipient was from a virtual
domain it may well not exist: if you have sender_verify = true it may
then not accept it.

This code is now running at junk(at)paulm.com ! (http://junk.paulm.com/)
If anyone would like the source, I'll tidy it up and pass it on.

Merry Xmas,
Paul

--
Paul Makepeace ....................................... http://paulm.com/

"If laughter can heal, then I would wonder."
-- http://paulm.com/toys/surrealism/