| Unix Content | Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| Curtis LaMasters wrote: > I'm having a pretty hard time with this one for some reason, mainly > because I don't understand regex. I have a large number of emails > that are getting past my spamassassin setup (Maia Mailguard 1.02a) as > well as my Barracuda. I would like to add a score to email from > noreply@*. I'm not asking for anyone to write the rule for me > (though that would be nice), but general guidance on how to go about > doing this *easily*. Try this: header FROM_NOREPLY ToCc =~ /\bnoreply\@/i \b - word break...this must be the start of the string or whitespace \@ - @ is special to Perl regex, so you have to escape it Since you don't care what the domain is, there is no need to continue the regex past the @. I haven't tested this rule, so watch to make sure it does what it's supposed to. -- Bowie |
|
#2
|
| Excellent, Much easier than I was expecting. Thank you very much. I'll get to testing. Curtis LaMasters http://www.curtis-lamasters.com http://www.builtnetworks.com |
|
#3
|
| What is the i for after reply/ ? Would just general research for perl expressions be helpful for me? I guessing so since Spamassassin uses perl as it's language of choice. Thanks for your input. Curtis LaMasters http://www.curtis-lamasters.com http://www.builtnetworks.com |
|
#4
|
| On Tue, 26 Aug 2008, Curtis LaMasters wrote: > What is the i for after reply/ ? Case-insensitive match. > Would just general research for perl expressions be helpful for me? I > guessing so since Spamassassin uses perl as it's language of choice. Learning how regular expressions work is a very good idea - they are _very_ widely used in information processing. http://oreilly.com/catalog/9780596528126/ -- John Hardin KA7OHZ http://www.impsec.org/~jhardin/ jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79 ----------------------------------------------------------------------- The question of whether people should be allowed to harm themselves is simple. They *must*. -- Charles Murray ----------------------------------------------------------------------- 2 days until Exercise Your Rights day |
|
#5
|
| On Tue, 2008-08-26 at 16:00 -0500, Curtis LaMasters wrote: > What is the i for after reply/ ? case Insensitive > Would just general research for perl expressions be helpful for me? Yes. perldoc perlretut is a great place to start. -- Daniel J McDonald, CCIE #2495, CISSP #78281, CNX Austin Energy http://www.austinenergy.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAki0dUsACgkQGvhCU13z7IhP5ACfQecfr85leJ 66TbmJYgaGjvgt MhEAmQEXSMBtesKr0011fJfsLmIBihaA =tiQI -----END PGP SIGNATURE----- |
|
#6
|
| Bowie Bailey wrote: > Curtis LaMasters wrote: >> I'm having a pretty hard time with this one for some reason, mainly >> because I don't understand regex. I have a large number of emails >> that are getting past my spamassassin setup (Maia Mailguard 1.02a) as >> well as my Barracuda. I would like to add a score to email from >> noreply@*. I'm not asking for anyone to write the rule for me >> (though that would be nice), but general guidance on how to go about >> doing this *easily*. > > Try this: > > header FROM_NOREPLY ToCc =~ /\bnoreply\@/i > I guess he wants From or Reply-To, not ToCc. > \b - word break...this must be the start of the string or whitespace > \@ - @ is special to Perl regex, so you have to escape it > Since you don't care what the domain is, there is no need to continue the > regex past the @. > > I haven't tested this rule, so watch to make sure it does what it's supposed > to. > |