procmail
[Top] [All Lists]

Re: More email middleman (LONG)

1999-05-04 01:06:05
You already got a good reply from Liviu, but I thought I'd point out a
couple of minor things:

On Mon, 3 May 1999 16:38:09 -0500 (CDT), tomcat(_at_)visi(_dot_)com wrote:
Would I strip out the "X-Mailto-Comment:" before
the :0 wci: recipe like this
:0
* ^X-Mailto-Comment:[    ]\/[^   ].*
 ORIG = $MATCH

This syntax is confused. The first character on the action line (after
any whitespace) determines what kind of action you have. There are
exactly four alternatives: forward (!), pipe (|), block ({), or file
(any other first character). What you are saying here is to save to a
file called ORIG. There is no such action as a variable assignment
(well, yes, there is the VAR=| pipe thing, but that's not relevant
here). If you want a variable assignment, you need it to be in a
block.

    :0
    * ^X-Mailto-Comment:[       ]*\/[^  ].*
    { ORIG = $MATCH }

A block can, of course, basically contain anything you can put outside
of a block, i.e. recipes, assignments, comments ...

Somebody told me to include a "From:" in the email
my psuedo server sends out, I also see "Reply-to"
and now "Return-Path:"  Which one is "correct" to
indicate where replies go?

Reply-To:, if present, overrides From:. The (hitherto nonexistent :-)
documentation for how formail -rt deduces where to send a reply might
be worth investigating; <http://www.iki.fi/era/procmail/formail.html>

What complicates matters is that there basically needs to be two
"reply" addresses -- one for delivery error notifications and stuff
like that (don't send to this address unless you absolutely know what
you're doing; this is what formail -r tries to give you) and one for
regular replies (formail -rt gets you this).

(One could make the case for a number of other addresses which it
might make sense to try to contact under certain conditions. One
common problem is when you exchange mail within a group of people -- a
mailing list, for example, but it needn't be centrally run or anything
-- and sometimes want to send "group replies" and sometimes want to
reply "in private" to an individual poster.)

5) Finally, I want the mail server to send the email
replied to by ADMIN to the person who started this
mess, the web page form filler outer.  His email
address should be in "X-Mailto-Comment".  I want
the mail server to bail out at this point, so
any more email exchange via reply goes between
the web page filler outer and ADMIN.

I'm not sure I understand this. You should probably have copied
X-Mailto-Comment to Reply-To when forwarding the message to ADMIN, and
then ADMIN should take care to set Reply-To back to himself (if that's
what's appropriate) if he will be replying from a "role account" or
something.
  (Actually you often want this to work the other way around -- staff
will reply to customer queries from their individual accounts, but
need to take care to point Reply-To: back to a role account so
everybody at the department will see the client's followup if there is
one, and take appropriate action.)

:0
* ^X-Mailto-Comment:[    ]\/[^   ].*
  ORIG = $MATCH
| formail -cz \
| $SENDMAIL -oi $ORIG

(Here's that same error again. You can always have only exactly one
action; if you need more, you need a block.

    :0
    * ^X-Mailto-Comment:[       ]*\/[^  ].*
    {
        ORIG = $MATCH

        :0
        | formail -cz \
        | $SENDMAIL -oi $ORIG
    }

Anyway, do you have a particular reason to want to run stuff through
formail -cz before sending it off? Any correctly working mail program
should be able to cope with continued header lines and extra
whitespace.)

/* era */

-- 
.obBotBait: It shouldn't even matter whether     <http://www.iki.fi/era/>
I am a resident of the state of Washington. <http://members.xoom.com/procmail/>
 * Sign the European spam petition! <http://www.politik-digital.de/spam/en/> *

<Prev in Thread] Current Thread [Next in Thread>