[exim] How to analyze the to header for my name

Etusivu
Poista viesti
Vastaa
Lähettäjä: Nathan Huesken
Päiväys:  
Vastaanottaja: exim-users
Aihe: [exim] How to analyze the to header for my name
Hi,

I notice the following:
The to-header is in this form.
To: {Name} <{local}@{domain}>

When {domain} is my eMail-domain (which is not the case for mailinglist mails e.E.)
- When Real mail has a {name} it contains my first or last name
- Spam mail mail has a {name} it does not conatein my first nor my last name
- Real as well as spam mail can not have any {name}

So I would like to do something like this (Pseudocode):
if {domain}==my_domain
  if {Name} contains Nathan or Huesken
    accept
  if {Name} is not empty
    increase_spam_score


But I have no Idea how to do that.
Maybe someone can get me startet.
- How can I check if the To: header contains something specific?
- How can I do nested tests?

Thanks!
Nathan