procmail
[Top] [All Lists]

RE: Why is this not getting the userid

2007-12-07 12:35:38
Michelle Konzack schreib am Thursday, December 06, 2007 8:01 AM:

Am 2007-12-01 19:40:47, schrieb Robert Moskowitz:
And what if the sender did something like "fax to ext 222" 
<222(_at_)fax(_dot_)debug(_dot_)domain(_dot_)com>

How do I get just the part between < and @? Perhaps the
recipes you mention further down.

:0
{
  FROM=`formail -rt |formail -czx To: |cut -d '@' -f1`
  :0
  |/usr/bin/faxmail -d "fax(_at_)${FROM}"
}

Well, that's really not at all necessary to do all that.
We don't need formail at all, but if we did decide to use
it, we surely don't need formail piped to formail.
Also, I'm not sure what the point is of an empty outer
recipe with a nested brace-set.

Using formail:

  FROM = `formail -rtczx To:`

  :0
  * FROM ?? ^^\/[^(_at_)]+
  | faxmail -d "fax(_at_)${MATCH}"



If he just wants to use the address from the From: line, then:

  SPACE = ' '
  TAB = '       '
  WS = $SPACE$TAB

  :0
  * $ ^From:(.*\<)?\/[^$WS]+@
  * MATCH ?? ^^\/[^(_at_)]+
  | faxmail -d "fax(_at_)${MATCH}"

-- 
dman

  
  
  

____________________________________________________________
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>