On 7/15/23 23:40, Loren Wilton wrote:
> I assume this just needs to go in /etc/mail/spamassassin/local.cf,
right? Or do I need to do separate stanzas for each domain?
If you want this to work for all users, yes. If you have per-user
rules enabled, then it could go in user_prefs for that user.
The rules I posted assumed one sender u...@org.xxx, whth a known first
and last name.
If you have multiple personalities, then you have multiple "me's":
us...@org.xxx, us...@org.xxx, and so on, then you needs to probably
duplicate the rule set for each user. Probably all of the users have
different first and last names. I'd probably change the meta rule name
from NOT_FROM_ME to NOT_FROM_USER1, NOT_FROM_USER2, etc.
If you have one "me" but multiple accounts for that person, then
probably all of the accounts have the same first and last name. In
that case things could be simplified a bit.
Does that help or just add to the confusion?
Thanks, Loren. It helps, I think - but I'm pretty new to using custom
rules, so my understanding may be wrong. Since I use only one email
address, I should probably set this up in local.cf like this:
#
# Ok, catch 'from me' when it isn't
header __FROM_THOMAS_1 From =~ /<thomas\.cameron\@camerontech\.(?:com)>/i
header __FROM_THOMAS_2 From =~ /\"Thomas Cameron\"
<thomas\.cameron\@camerontech\.com>/
header __FROM_THOMAS_3 From =~ /Thomas Cameron
<thomas\.cameron\@camerontech\.com>/
meta NOT_FROM_THOMAS __FROM_THOMAS_1 && !(__FROM_THOMAS_2 ||
__FROM_THOMAS_3)
score NOT_FROM_THOMAS 10
describe NOT_FROM_THOMAS Spammer faking the mail from me!
# End of custom rule for Thomas
Then, for my wife and kids, the same thing but with their email
addresses and domains.
Am I correct? Sorry if I'm being dense. I'm just a sysadmin, not a
developer, so I'm not super clear on how macros and expansions work in perl.
--
Thomas