Linda Walsh wrote: > I get many emails addressed to internal sendmail <id>'s. > 123...@mydomain > 1abd56.ef7...@mydomain > > > (seem to fit a basic pattern but don't know how to specify the > pattern (or I don't have it right): > <(start of an email-address)>[0-9][0-9a-fa-f\....@mydomain > > by start of an email, addr, I mean inside or outside literal '<>'. > I try matching to '<' as a start char to look for anything starting > with a number, but that fails if they don't use the "name <x...@yy>" > format, but just use "x...@yy". Don't know how to root at beginning > of any email address looking thing.
I think this is what you are looking for (untested): header MY_NUMBER_EMAIL To:addr =~ /^\d[0-9a-f\....@mydomain/i Look in the "Rule Definition" section of the man page for Mail::SpamAssassin::Conf for more info on the ':addr' option. > I know the pattern matcher in the userprefs file is primitive though > -- like DOS level file matching, so I don't know how to write > it in userprefs... user_prefs uses the exact same pattern matching as the rest of SA (Perl regexps). It is anything but primitive. The caveat being that rule definitions are not allowed in user_prefs files unless you allow it by putting this in your local.cf: allow_user_rules 1 > any hints would be appreciated... > running slightly older SA 3.1.7 on perl 5.8.8.... > > intending to update ... eventually but don't know that this would > solve any pattern help.... Shouldn't make any difference for this. -- Bowie