This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Actions based on milter macros

Hello,

I'm running Puremessage for Unix as a milter for Sun Messaging Server. Is it possible to check values of certain milter macros? Specifically, Sun Messaging Server sets {optin} macro for the messages and I'd like to check the value of it in the policy.

If that's not possible, what options do I have to pass information from SJMS to Puremessage? I tried to add a custom header but it seems that the milter checks get done before the addition of the header.

:4318


This thread was automatically locked due to age.
  • Hello Eino,

    Are you using the JSMS milter or the JSMS connector? 

    Cheers,

    Mark.

    :4405
  • Hi Mark,

    I'm using milter.

    I did some custom modifications, but it would be nice if this can be done in a supported way...

    :4408
  • Hey Eino,

    JSMS is the least used MTA with PMX.  I would encourage you to open a Feature Request with support outlining how you would like to use JSMS with the milter.  We can consider this for a future release.  Did you modify PMX product code to achieve your needs?

    Cheers,

    Mark.

    :4409
  • Hi Mark,

    Thanks for the support. 

    Yes, I did modify the source. I replaced pmx_mta_macro function in PureMessage/Policy/Base.pm with this:

    sub pmx_mta_macro {
        my $msg   = shift;
        my $args  = shift;
        my $name  = $args->param(0)->[0];
        my $value = $args->param(1)->[0];
    
        if (grep {"macro_$name" eq $_} $msg->attrs) {
            $args->tag('contains') and return 1 + index($msg->get_attr("macro_$name"), $value);
            $args->tag('matches') and warn "pmx_mta_macro: ':matches' not implemented (only :is and :contains)";
            $args->tag('re') and warn "pmx_mta_macro: ':re' not implemented (only :is and :contains)";
            return ($msg->get_attr("macro_$name") eq $value);
        }
        return 0;
    }

     then, I added  tag_set = "MATCH-TYPE" into  <test pmx_mta_macro> in file etc/data/policy/base.conf.

    Now I'm able to check a macro value in policy.siv, e.g.

    if pmx_mta_macro :contains "optin" "spam" { ...

    How can I file an RFE?

    :4411
  • Hello Eino,

    You can submit a Feature Request the same way you do a normal support ticket.

    support@sophos.com

    Please reference this forum posting in your request.

    Cheers,

    Mark.

    :4447