I'm in no sense an authority, but here's my take:
On 2012-03-19 16:19, Todd Lyons wrote:
> MAIL FROM:<user@???> PRDR
>
> In the code which parses args to mail and rcpt commands, it requires
> key=value pairs (for example, BODY=149833),
Actually, despite the comment on extract_option() I don't see it being
called at RCPT. Maybe I'm missing something, or maybe the
comment needs correcting.
> So the extract_option requires a key=value pair. At this point, the
> has not yet verified that the options are valid/invalid, it's just
> splitting them from the email address. With contemporary exim design
> standards in mind:
>
> 1) would it better to pass a variable to extract_option() to indicate
> that "=" is not required?
Given the limited number of callers I'd be happy with such a mod.
The problem is that it's still required for the current options,
and you've not determined what the option is yet.
> 2) would it be better to make a duplicate function that basically just
> does #1 (i.e. not require "=")
> 3) something else?
I'd like a code refactor from the if/elseif chain into a table-driven
approach, using a static data table of acceptable option names
each with a "supplies argument" indicator. This would be in line
with (eg.) the parsing in acl_verify().
Admission: I've been a-refactoring in verify myself (bug 1184).
Good luck; it looks like a worthwhile project.
--
Jeremy