Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Arrange together 2 Header rulesets
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
RICCARDO  
View profile  
 More options Nov 30 2008, 4:11 am
Newsgroups: comp.mail.sendmail
From: RICCARDO <ric.castell...@alice.it>
Date: Sun, 30 Nov 2008 01:11:45 -0800 (PST)
Local: Sun, Nov 30 2008 4:11 am
Subject: Arrange together 2 Header rulesets
I'm going to check two headers (which I have always in my emails)
content by rulesets:

HX-Spam-Status:   $>ruleset1
HSubject:              $>ruleset2

Sruleset1
ROK $*                  ....... ?!

Sruleset2
RSPAM                    $#error $: 553 rejected spam mail

The second rule result must depend of first rule result.
I'd like ruleset2 reject email only if ruleset1 is matched.
How Can I arrange these 2 rulesets together ?
Can I define, for example, a temporary variable to store ruleset1
result so I can test it in ruleset2 ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Grant Taylor  
View profile  
 More options Nov 30 2008, 6:23 pm
Newsgroups: comp.mail.sendmail
From: Grant Taylor <gtay...@riverviewtech.net>
Date: Sun, 30 Nov 2008 17:23:14 -0600
Local: Sun, Nov 30 2008 6:23 pm
Subject: Re: Arrange together 2 Header rulesets
On 11/30/2008 03:11 AM, RICCARDO wrote:

> Can I define, for example, a temporary variable to store ruleset1
> result so I can test it in ruleset2 ?

I believe it is possible to define a macro that is valid for the
(processing) lifetime of the message across multiple rule sets.  But I
have no idea how to go about doing it.

Naturally your second rule would have to test the contents of the new
macro as part of its condition.

Grant. . . .


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Per Hedeland  
View profile  
 More options Dec 1 2008, 4:28 pm
Newsgroups: comp.mail.sendmail
From: p...@hedeland.org (Per Hedeland)
Date: Mon, 1 Dec 2008 21:28:38 +0000 (UTC)
Local: Mon, Dec 1 2008 4:28 pm
Subject: Re: Arrange together 2 Header rulesets
In article
<644eceb5-f0ed-43fe-93bf-f787be38f...@20g2000yqt.googlegroups.com>

RICCARDO <ric.castell...@alice.it> writes:

>The second rule result must depend of first rule result.
>I'd like ruleset2 reject email only if ruleset1 is matched.
>How Can I arrange these 2 rulesets together ?
>Can I define, for example, a temporary variable to store ruleset1
>result so I can test it in ruleset2 ?

Yes, check out the 'macro' map in doc/op/op.*. There is also an example
of usage in cf/cf/knecht.mc. Just remember that the order of headers in
an e-mail message is undefined (except for Received: headers), and that
the header rulesets are processed in the order the headers appear in the
message.

I.e. for robust operation, you probably need to handle either order of
invocation of the two rulesets. A good idea can be to just set macros in
the two header rulesets, and have the actual logic in the check_eoh
ruleset.

--Per Hedeland
p...@hedeland.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
RICCARDO  
View profile  
 More options Dec 2 2008, 10:45 am
Newsgroups: comp.mail.sendmail
From: RICCARDO <ric.castell...@alice.it>
Date: Tue, 2 Dec 2008 07:45:48 -0800 (PST)
Local: Tues, Dec 2 2008 10:45 am
Subject: Re: Arrange together 2 Header rulesets
On 1 Dic, 22:28, p...@hedeland.org (Per Hedeland) wrote:

Can you highlight "example of defining macro inside ruleset" in cf/cf/
knecht.mc file, please ?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Per Hedeland  
View profile  
 More options Dec 3 2008, 6:46 pm
Newsgroups: comp.mail.sendmail
From: p...@hedeland.org (Per Hedeland)
Date: Wed, 3 Dec 2008 23:46:40 +0000 (UTC)
Local: Wed, Dec 3 2008 6:46 pm
Subject: Re: Arrange together 2 Header rulesets
In article
<3ea668e5-acf2-426f-bf1f-fcd09a6f4...@3g2000yqs.googlegroups.com>

RICCARDO <ric.castell...@alice.it> writes:
>On 1 Dic, 22:28, p...@hedeland.org (Per Hedeland) wrote:

>> Yes, check out the 'macro' map in doc/op/op.*. There is also an example
>> of usage in cf/cf/knecht.mc. Just remember that the order of headers in
>> an e-mail message is undefined (except for Received: headers), and that
>> the header rulesets are processed in the order the headers appear in the
>> message.

>> I.e. for robust operation, you probably need to handle either order of
>> invocation of the two rulesets. A good idea can be to justsetmacros in
>> the two header rulesets, and have the actual logic in the check_eohruleset.
>Can you highlight "example of defining macro inside ruleset" in cf/cf/
>knecht.mc file, please ?

If you had read up on the basics of sendmail maps, and the specifics of
the 'macro' map, in doc/op/op.*, it would be trivial to find - and if
you haven't, you'll likely not be able to make use of the example. But
anyway, here are some relevant snippets...

LOCAL_RULESETS

HMessage-Id: $>CheckMessageId

SCheckMessageId
# Record the presence of the header
R$*                     $: $(storage {MessageIdCheck} $@ OK $) $1

LOCAL_CONFIG
Kstorage macro

LOCAL_RULESETS

Scheck_eoh
# Check if a Message-Id was found
R$*                     $: < $&{MessageIdCheck} >

--Per Hedeland
p...@hedeland.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sciu...@mail.ru  
View profile  
 More options Dec 15 2008, 6:49 am
Newsgroups: comp.mail.sendmail
From: sciu...@mail.ru
Date: Mon, 15 Dec 2008 03:49:22 -0800 (PST)
Local: Mon, Dec 15 2008 6:49 am
Subject: Re: Arrange together 2 Header rulesets
One detail.
If  header  Received is stored in the macro then it lose the data in
parenthesis.

HReceived:                      $>+CheckReceived
SCheckReceived
R$*                     $: $(storage {Received} $@ $1 $) $1
R$*                     $: $(syslog syslog:Rec0:<$&{Received}> $) $1
R$*                     $: $(syslog syslog:Rec1:<$1> $) $1

Dec 15 14:50:59 mail sendmail[8751]: mBF9oxvp008751:
syslog:Rec0:<from[138.88.3.196]
by.apache.anrb.ru.with.ESMTP.id.mBF9WrfP006924.for<parad...@anrb.ru>;Mon,
15.Dec.2008.14:33:02+0500>
Dec 15 14:50:59 mail sendmail[8751]: mBF9oxvp008751:
syslog:Rec1:<from[138.88.3.196](pool-138-88-3-196.res.east.verizon.net
[138.88.3.196])by.apache.anrb.ru(8.13.8/8.13.8)
with.ESMTP.id.mBF9WrfP006924.for<parad...@anrb.ru>;Mon,15.Dec.
2008.14:33:02+0500>

Dec 15 14:50:42 mail sendmail[8607]: mBF9ocfM008607: syslog:Rec0:<;
15.Dec.2008.09:44:16.-0000>
Dec 15 14:50:42 mail sendmail[8607]: mBF9ocfM008607:
syslog:Rec1:<(qmail.46011.invoked.by.uid.60001);15.Dec.
2008.09:44:16.-0000>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »