procmail
[Top] [All Lists]

Getting customer number from the email comment

2007-05-28 07:38:21
I have a little problem. I am receiving email where To: fields is something 
like that:

“Company Name Cust 1234567” <myname(_at_)mydomain>

I can extract the comment part; however, I am not quite sure how to identify 
the customer number (Like, I just need 1234567 part). The following is my 
script right now

 

RC_EMAIL = $PMSRC/pm-jaaddr.rc   #part of the procmail lib
:0HB
* ^To:\/(_dot_)*(_at_)(_dot_)*
{
  INPUT=$MATCH
  INCLUDERC=$RC_EMAIL
  COMMENT=$COMMENT

  :0:mail.lock
  * COMMENT ?? [a-zA-Z0-9}
  !somename(_at_)somedomain(_dot_)com
}

 

Thanks

         


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>