Discussion:
[Mimedefang] add_header all RelaysUntrusted _RELAYSUNTRUSTED_
Marcus Schopen
2016-12-12 22:30:02 UTC
Permalink
Hi,

I'd like to set a "add_header all RelaysUntrusted _RELAYSUNTRUSTED_" to
my headers, to see in case of IPs in trusted_networks on which IPs
dnsrbl and dnswl checks run on. But putting this to sa-mimedefang.cf has
no effect.

Ciao
Marcus




_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list ***@lists.roaringpenguin.com
http://lists.roaringpenguin.c
Kevin A. McGrail
2016-12-12 22:46:08 UTC
Permalink
Post by Marcus Schopen
I'd like to set a "add_header all RelaysUntrusted _RELAYSUNTRUSTED_" to
my headers, to see in case of IPs in trusted_networks on which IPs
dnsrbl and dnswl checks run on. But putting this to sa-mimedefang.cf has
no effect.
My first thought is if you have restarted MD. Darxus on the SA Mailing
List might also have some input if it's not something simple because
that is the right command.
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list ***@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedef
Marcus Schopen
2016-12-12 22:57:09 UTC
Permalink
Post by Kevin A. McGrail
Post by Marcus Schopen
I'd like to set a "add_header all RelaysUntrusted _RELAYSUNTRUSTED_" to
my headers, to see in case of IPs in trusted_networks on which IPs
dnsrbl and dnswl checks run on. But putting this to sa-mimedefang.cf has
no effect.
My first thought is if you have restarted MD. Darxus on the SA Mailing
List might also have some input if it's not something simple because
that is the right command.
Hmmm ... I did a reread and after your email a stop/start, but the
header doesn't come up.

Ciao!
--
Hobbes : Well, you still have afternoons and weekends
Calvin : That's when I watch TV.

_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list ***@lists.roaringpenguin.com
http
Kevin A. McGrail
2016-12-13 00:01:17 UTC
Permalink
Post by Marcus Schopen
Hmmm ... I did a reread and after your email a stop/start, but the
header doesn't come up.
I always forget that we have SA glued into MD in an odd way. If you are
using something like the default example windows filter, you have a call
in your filter that calls spam_assassin_check().

Based on that logic, you now have a yes this is spam boolean result (and
some other data like hits, etc.). The modifications SA made to the
message are not carried through unless you implement logic for them.
Sorry, I led you down the completely wrong path. Someone will correct
me, I'm sure.

Regards,
KAM
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list ***@lists.roaringpenguin.com
http://lists.roaringp
Marcus Schopen
2016-12-14 11:54:38 UTC
Permalink
Post by Marcus Schopen
Hi,
I'd like to set a "add_header all RelaysUntrusted _RELAYSUNTRUSTED_" to
my headers, to see in case of IPs in trusted_networks on which IPs
dnsrbl and dnswl checks run on. But putting this to sa-mimedefang.cf has
no effect.
Any ideas?


_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list ***@lists.roaringpenguin.com
http://lists.r
Dianne Skoll
2016-12-14 14:42:19 UTC
Permalink
On Wed, 14 Dec 2016 12:54:38 +0100
Post by Marcus Schopen
Post by Marcus Schopen
I'd like to set a "add_header all RelaysUntrusted
_RELAYSUNTRUSTED_" to my headers, to see in case of IPs in
trusted_networks on which IPs dnsrbl and dnswl checks run on. But
putting this to sa-mimedefang.cf has no effect.
Any ideas?
MIMEDefang only uses SpamAssassin's analysis portion. It does **NOT**
permit SpamAssassin to make any message modifications. To add headers,
you need to use MIMEDefang's built-in action_add_header function.

Regards,

Dianne.
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list ***@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimede
Marcus Schopen
2016-12-15 00:23:32 UTC
Permalink
Hi Dianne,

thanks for your time.
Post by Dianne Skoll
On Wed, 14 Dec 2016 12:54:38 +0100
Post by Marcus Schopen
Post by Marcus Schopen
I'd like to set a "add_header all RelaysUntrusted
_RELAYSUNTRUSTED_" to my headers, to see in case of IPs in
trusted_networks on which IPs dnsrbl and dnswl checks run on. But
putting this to sa-mimedefang.cf has no effect.
Any ideas?
MIMEDefang only uses SpamAssassin's analysis portion. It does **NOT**
permit SpamAssassin to make any message modifications. To add headers,
you need to use MIMEDefang's built-in action_add_header function.
Yes, I use action_change_header and action_delete_header to set X-Spam
headers in mimedefang-filter. What I don't understand is how the get the
value from SA's _RELAYSUNTRUSTED_ inside mimedefang-filter to put it to
action_add_header function.

Ciao
Marcus


_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list ***@lists.roaringpenguin.com
http://lists.roaringpenguin.com/
Paul Murphy
2016-12-15 10:59:23 UTC
Permalink
You call SpamAssassin like this in your filter:

($hits, $threshold, $names, $report) = spam_assassin_check();

The "names" variable lists all of the rules in SA which were triggered, so you can apply some logic based on this:

if ( $names =~ /RELAYSUNTRUSTED/ ) {
# add header to message
}

If instead you want to get at the value that SA would have put into the header, you'll need to either parse the headers and compute this for yourself, or find a way to get SA to return that information to you in a different way. One approach might be to scan the matching rule names, and if that rule was triggered, re-run SA directly on the INPUTMSG file, capture the output, and then grep out the header which SA added.

Best Wishes,

Paul.

-----Original Message-----
From: MIMEDefang [mailto:mimedefang-***@lists.roaringpenguin.com] On Behalf Of Marcus Schopen
Sent: Thursday, December 15, 2016 12:24 AM
To: ***@lists.roaringpenguin.com
Subject: Re: [Mimedefang] add_header all RelaysUntrusted _RELAYSUNTRUSTED_

Yes, I use action_change_header and action_delete_header to set X-Spam headers in mimedefang-filter. What I don't understand is how the get the value from SA's _RELAYSUNTRUSTED_ inside mimedefang-filter to put it to action_add_header function.

Ciao
Marcus


_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list ***@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list ***@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimede

Loading...