[Mimedefang] Mailmunge API discussion (was Re: MIMEDefang 3.0-rc1)
Dianne Skoll
dianne at skoll.ca
Tue May 17 16:56:03 EDT 2022
Hi,
I'm replying to both the MIMEDefang and Mailmunge lists, but we should
probably make all followups go to mailmunge at lists.mailmunge.org
On Sat, 14 May 2022 00:18:48 -0500
Richard Laager via MIMEDefang <mimedefang at lists.mimedefang.org> wrote:
> * Most annoyingly, there are still the two return styles for message
> dispositions depending on whether we are in filter_message() or
> something earlier.
Fixed in recent commits. Now any of the filter_* functions can return
a Mailmunge::Response object, which is respected. However, you can
still use the old-style action_whatever calls and everything will Just Work.
> * Unless it's impossible (or unreasonable) to do optional arguments
> in Perl, I don't see why there are both action_add_header() and
> action_insert_header(). Just have the insert, with $pos defaulting
> to -1 or something to get the add behavior.
Fixed in https://git.skoll.ca/Skollsoft-Public/mailmunge/commit/bd03caa35290760d7bb2b86d26c3a3f8505c08f6
Likewise for
> action_{accept,drop}_with_warning(); just have an optional
> $warning parameter on action_{accept,drop}().
Fixed in https://git.skoll.ca/Skollsoft-Public/mailmunge/commit/ef8a966d3be40b3d14f8c52d7ff41dad89f7076f
> * In the Mailmunge example video, $ctx->recipients[0] is
> '<bob at example.org>'. IMHO, mailmunge should be stripping off the
> angle brackets before the filter see it. They are just an
> annoyance. Perhaps it should be lowercasing too, i.e. using
> canonical_email().
Added $ctx->canonical_sender and $ctx->canonical_recipients; commit
https://git.skoll.ca/Skollsoft-Public/mailmunge/commit/a83a841837e16584af550ed7ea9af8b9d86f5a62
> * This is minor, since it's boilerplate, but I'm not sure what the
> run() method is about. What is "server mode" (as opposed to
> multiplexor mode)?
Docs have been fixed to remove mention of "server mode"
Regards,
Dianne.
More information about the MIMEDefang
mailing list