FriendlyGreeting is Expanding
Remco Barendse
mailscanner at BARENDSE.TO
Fri Nov 15 21:23:02 GMT 2002
I works perfectly now, all those buggers get rejected :)
What doesn't work however are the * expressions. I added fu*k like in the
example but if i send a message with fuck in the header it doesn't get
rejected?
Furthermore I want to kill off any message with quote :
Delivery Status Notification (Success)
unquote as a subject. I don't want to block the failed ones, just the success
version. I tried several versions for a line but it never gets blocked.
How do I make sendmail recognize the () ??
i tried
delivery.status.notification.*success
delivery.status.notification.(success)
delivery.status.notification.\(success\)
Even better, could I make another ruleset but copying the first one to
create a second rule so I can reject some messages and discard others?
Would this be the correct addition to sendmail.mc correct in that case
(sendmail has never been a friend of mine)??
LOCAL_RULESETS
F{JunkSubs} /etc/mail/junksubs.txt
F{SSJunk} /etc/mail/ssjunk.txt
F{DiscardSubs} /etc/mail/discardsubs.txt
HSubject: $>Check_Subject
SCheck_Subject
R$={JunkSubs}$* $: NMJUNKSUB
R$* $={SSJunk} $* $#error $: NMJUNKSUB
R$* NMJUNKSUB $* $#error $: "553 Rejected"
R$* $={DiscardSubs} $* $#discard
Thanks!!
On Fri, 15 Nov 2002, Ken Rice wrote:
> On Thu, 14 Nov 2002 10:25:28 +0100
> Remco Barendse <mailscanner at BARENDSE.TO> wrote:
>
> > Just wondering though, you have included what is in your ssjunk.txt
> > file but what do you have in the junksubs.txt file?
>
> ssjunk.txt is for a word or phrase appearing anywhere in the Subject:
> junksubs.txt is for word or phrase or characters that begins (MUST begin) the Subject:
>
> My junksubs.txt only includes this:
> ADV
>
> > Also are the dots between the words really necessary, and will
> > sendmail treat the subjects and texts in the e-mails case insensitive?
>
> case-insensitive
> dots = spaces in the phrase
>
> a portion of ssjunk.txt:
> add.inches
> chance.of.a.lifetime
> don't.just.dream
> fu*k
> *enis
> p*rn
>
> The stars are literal, I didn't edit the above. I have 351 entries in that file,
> can't catch all, but many. I only have 200 users but about 100 mailing lists, and it helps.
> (Just couldn't block "cash" when the CFO tries to email the CEO "Cash Statements"...)
>
> The tail of our sendmail.mc:
>
> MAILER(smtp)dnl
> MAILER(procmail)dnl
> LOCAL_RULESETS
> F{JunkSubs} /etc/mail/junksubs.txt
> F{SSJunk} /etc/mail/ssjunk.txt
>
> HSubject: $>Check_Subject
>
> SCheck_Subject
> R$={JunkSubs}$* $: NMJUNKSUB
> R$* $={SSJunk} $* $#error $: NMJUNKSUB
> R$* NMJUNKSUB $* $#error $: "5.7.1 Rejected"
>
> Rather than bounce all these back, I'll probably let our people see the ssjunk.txt list, although
> some will be offended, and then change the above to DISCARD. But we're then taking a chance
> of throwing away and not notifying a sender that we won't accept their email based on what they
> type into the Subject:. And that would not be polite nor proper (or maybe too bright on our part)
> to someone who isn't that familar with English phrasing/grammar,
> including the native West Virginians, Marylanders and Pennsylvanians here,
> and myself somedays of course.
>
> Apologies to the list if this is off-topic.
>
> Ken Rice
> SysAdmin
> The Library Corporation
>
>
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the MailScanner
mailing list