You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by MAYER Hans <ma...@iiasa.ac.at> on 2015/01/08 16:41:29 UTC
starttls verify=OK not recognized by rule
Dear All,
I am using SA in combination with mimedefang over many years very successfully. Thanks to the SA team for this great peace of software.
My environment SpamAssassin version 3.3.2 running on Perl version 5.12.4 on Sparc Solaris 11.2
My local rules are saved in /etc/mail/sa-mimedefang.cf
These days I tried to implement a new rule. It should trigger if within the received header line a text "verify=OK" can be found. This is the rule I made:
header LOCAL_VRY_OK Received =~ /verify=ok/i
score LOCAL_VRY_OK -2.0
describe LOCAL_VRY_OK starttls_verify_is_OK
This rule is never triggered, even if this text is available. I know this because I add a X-Spam-Score header line to each e-mail, which lists all triggered rules.
I saved such an e-mail ( just the header ) and run:
spamassassin -x -p /etc/mail/sa-mimedefang.cf -D < email.txt
Here I can see, that this rule is activated. So the rule can't be written so bad.
I made several experiments but couldn't find a solution. My question why is it not recognized if executed "on the fly" by mimedefang for incoming e-mails ?
Not to say, that other local rules in my config file are executed properly.
Any hints and tips are welcome.
// Hans
Re: Milter (was Re: starttls verify=OK not recognized by rule)
Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
On 1/12/2015 10:06 AM, MAYER Hans wrote:
> Dear David,
>
> Thanks for your information.
> I expected something like this.
>
>> If you want to check for TLS verification, you need to do it outside SpamAssassin and pass the Sendmail macro ${verify} down into MIMEDefang.
>> All in all, a bit of a mess.
> I agree.
> And then it has to be passed to SA again. Because SA is doing the spam score calculation and not MD.
> Now I know why I didn't find so many information in the internet.
>
> That's bad. Because I had the idea, a systems administrator who configured his outgoing mail server with real certificates did also invest time in configuration not to have an open relay gateway.
>
> OK, I give up this idea.
>
You don't have to give up.
But you should switch to discussing the issue on the right mailing list
since you need a MIMEDefang solution.
See my post from 8 years ago at
http://lists.roaringpenguin.com/pipermail/mimedefang/2007-August/033241.html
which I believe may have the solution you need.
regards,
KAM
RE: Milter (was Re: starttls verify=OK not recognized by rule)
Posted by MAYER Hans <ma...@iiasa.ac.at>.
Dear David,
Thanks for your information.
I expected something like this.
> If you want to check for TLS verification, you need to do it outside SpamAssassin and pass the Sendmail macro ${verify} down into MIMEDefang.
> All in all, a bit of a mess.
I agree.
And then it has to be passed to SA again. Because SA is doing the spam score calculation and not MD.
Now I know why I didn't find so many information in the internet.
That's bad. Because I had the idea, a systems administrator who configured his outgoing mail server with real certificates did also invest time in configuration not to have an open relay gateway.
OK, I give up this idea.
Kind regards
Hans
-----Original Message-----
From: David F. Skoll [mailto:dfs@roaringpenguin.com]
Sent: Friday, January 09, 2015 2:00 PM
To: users@spamassassin.apache.org
Subject: Milter (was Re: starttls verify=OK not recognized by rule)
On Fri, 9 Jan 2015 10:15:13 +0100
MAYER Hans <ma...@iiasa.ac.at> wrote:
> What is the sequence of processing data ?
> I assume the MTA ( I am using sendmail 8.15.1 ) is receiving the
> complete e-mail and afterwards mimedefang and spamassassin is
> processing the content.
No. The milter makes various callbacks during the SMTP session. It's documented here: https://www.milter.org/developers/overview
The final callback after DATA passes the milter the entire message headers and body, but *only* exactly what was received over the wire.
It will *not* include any headers added by Sendmail or the milter, or any other changes to the message.
If you want to check for TLS verification, you need to do it outside SpamAssassin and pass the Sendmail macro ${verify} down into MIMEDefang.
All in all, a bit of a mess.
Regards,
David.
Milter (was Re: starttls verify=OK not recognized by rule)
Posted by "David F. Skoll" <df...@roaringpenguin.com>.
On Fri, 9 Jan 2015 10:15:13 +0100
MAYER Hans <ma...@iiasa.ac.at> wrote:
> What is the sequence of processing data ?
> I assume the MTA ( I am using sendmail 8.15.1 ) is receiving the
> complete e-mail and afterwards mimedefang and spamassassin is
> processing the content.
No. The milter makes various callbacks during the SMTP session. It's
documented here: https://www.milter.org/developers/overview
The final callback after DATA passes the milter the entire message
headers and body, but *only* exactly what was received over the wire.
It will *not* include any headers added by Sendmail or the milter, or any
other changes to the message.
If you want to check for TLS verification, you need to do it outside
SpamAssassin and pass the Sendmail macro ${verify} down into MIMEDefang.
All in all, a bit of a mess.
Regards,
David.
RE: starttls verify=OK not recognized by rule
Posted by MAYER Hans <ma...@iiasa.ac.at>.
Dear Kavin,
Thanks for your reply.
I restarted the whole group of sendmail, MD, SA+... several times. But didn't help.
What is the sequence of processing data ?
I assume the MTA ( I am using sendmail 8.15.1 ) is receiving the complete e-mail and afterwards mimedefang and spamassassin is processing the content. Isn't it ?
At that time the new inserted header line should be available.
Any ideas ?
Kind regards
Hans
From: Kevin A. McGrail [mailto:KMcGrail@PCCC.com]
Sent: Thursday, January 08, 2015 5:20 PM
To: MAYER Hans; 'users@spamassassin.apache.org'
Subject: Re: starttls verify=OK not recognized by rule
On 1/8/2015 10:41 AM, MAYER Hans wrote:
I am using SA in combination with mimedefang over many years very successfully. Thanks to the SA team for this great peace of software.
My environment SpamAssassin version 3.3.2 running on Perl version 5.12.4 on Sparc Solaris 11.2
My local rules are saved in /etc/mail/sa-mimedefang.cf
These days I tried to implement a new rule. It should trigger if within the received header line a text "verify=OK" can be found. This is the rule I made:
header LOCAL_VRY_OK Received =~ /verify=ok/i
score LOCAL_VRY_OK -2.0
describe LOCAL_VRY_OK starttls_verify_is_OK
This rule is never triggered, even if this text is available. I know this because I add a X-Spam-Score header line to each e-mail, which lists all triggered rules.
I saved such an e-mail ( just the header ) and run:
spamassassin -x -p /etc/mail/sa-mimedefang.cf -D < email.txt
Here I can see, that this rule is activated. So the rule can't be written so bad.
I made several experiments but couldn't find a solution. My question why is it not recognized if executed "on the fly" by mimedefang for incoming e-mails ?
Not to say, that other local rules in my config file are executed properly.
Any hints and tips are welcome.
Have you restarted MD because most likely it is using the API and doesn't load the rules each time it runs but rather only at start (or when a child reaches the maximum execution limit)?
Re: starttls verify=OK not recognized by rule
Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
On 1/8/2015 10:41 AM, MAYER Hans wrote:
> I am using SA in combination with mimedefang over many years very
> successfully. Thanks to the SA team for this great peace of software.
>
> My environment SpamAssassin version 3.3.2 running on Perl version
> 5.12.4 on Sparc Solaris 11.2
>
> My local rules are saved in /etc/mail/sa-mimedefang.cf
>
> These days I tried to implement a new rule. It should trigger if
> within the received header line a text “verify=OK” can be found. This
> is the rule I made:
>
> header LOCAL_VRY_OK Received =~ /verify=ok/i
>
> score LOCAL_VRY_OK -2.0
>
> describe LOCAL_VRY_OK starttls_verify_is_OK
>
> This rule is never triggered, even if this text is available. I know
> this because I add a X-Spam-Score header line to each e-mail, which
> lists all triggered rules.
>
> I saved such an e-mail ( just the header ) and run:
>
> spamassassin -x -p /etc/mail/sa-mimedefang.cf -D < email.txt
>
> Here I can see, that this rule is activated. So the rule can’t be
> written so bad.
>
> I made several experiments but couldn’t find a solution. My question
> why is it not recognized if executed “on the fly” by mimedefang for
> incoming e-mails ?
>
> Not to say, that other local rules in my config file are executed
> properly.
>
> Any hints and tips are welcome.
>
Have you restarted MD because most likely it is using the API and
doesn't load the rules each time it runs but rather only at start (or
when a child reaches the maximum execution limit)?