Tim Legant <[EMAIL PROTECTED]> writes:

> "Jason R. Mastaler" <[EMAIL PROTECTED]> writes:
> 
> > "Jason R. Mastaler" <[EMAIL PROTECTED]> writes:
> > 
> > > 2. Multiple delivery destination support for both DELIVERY, and in the
> > >    incoming filter file.  See tmda-workers archive for discussion
> > >    about syntax, implementation, etc.
> > >    http://mla.libertine.org/tmda-workers/2003-01/msg00033.html
> > 
> > [...]
> > 
> > > 4. Multiple actions in an incoming filter file line. e.g,
> > >
> > >    from [EMAIL PROTECTED] bounce=warning.txt, deliver=~/Maildir/
> > >
> > >    See the ``Performing multiple actions'' thread starting at
> > >    http://mla.libertine.org/tmda-workers/2003-01/msg00033.html
> > 
> > Welp, we're getting closer.  Just these two left to finish.
> 
> At the end of July we had a brief discussion about the syntax
> necessary for item 4.  We decided to explicitly mention each action,
> meaning that if the user wants to deliver to an mbox, for example
> /var/spool/shared, and to his local ~/Maildir, the syntax would be
> like this:
> 
> <source> <match> deliver=/var/spool/shared, deliver=~/Maildir/
> 
> See http://mla.libertine.org/tmda-workers/2003-07/msg00089.html

Additional notes on this....

The 'deliver' action (synonyms included) is the only action where
multiple options make sense.  Since the address where a bounce or
confirmation request will be sent can't be changed, sending more than
one bounce or confirm is ridiculous.  And rude.  Dropping or holding
the same message twice has logical issues that make me twitch.
So... if a rule has more than one 'bounce', 'confirm', 'drop' or
'hold', the parser will raise an exception (with a useful error
message) and the mail will be deferred as is usual when the parser
finds an error.

I decided to support both syntaxes that had been discussed for
multiple actions, since the version with parentheses had to be
written, more or less, to support the DELIVERY variable.  I thought
that requiring DELIVERY to look like this:

DELIVERY = "deliver=~/Maildir/, deliver=&[EMAIL PROTECTED]"

looked silly, since we already know we are talking about delivery.
Also, putting any action other than 'deliver' in DELIVERY is just
weird; i.e., my filter rule says 'accept' but DELIVERY is set to
'bounce'.  <shudder>

Therefore, DELIVERY is expected to look like this:

DELIVERY = "~/Maildir/, &[EMAIL PROTECTED]"

and a similar filter rule can be written in either of the following
two ways:

<source> <match> deliver=~/Maildir/, deliver=&[EMAIL PROTECTED]
<source> <match> deliver=(~/Maildir/, &[EMAIL PROTECTED])

After the identifcation and removal of the parentheses, the second
variation is obviously the exact same syntax as DELIVERY, which we
have to have anyhow.

Delivery destinations and bounce/confirm template files can have
embedded spaces and commas as long as either the entire destination or
filename is quoted or the embedded space(s)/comma(s) are escaped with
a backslash.

<source> <match> deliver = "~/mail/November, 2003/"
<source> <match> deliver = ~/mail/November\,\ 2003/


Tim

_________________________________________________
tmda-workers mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-workers

Reply via email to