FasdUAS 1.101.10 k l E? Damien Bonvillain 2004/05 Create a new rule based on the List-Post header of an email received from a mailing-list. In theory, should work, but in practice fails miserabily. From my experiments, it seems that making a new rule condition with "header key" is buggy, as the rule condition ends up being for the sender of the mail. So, after the folder and the rule are created, one must edit the rule condition, change the "sender is" to "List-Post" header (by creating it if needed). Created from Create New Mailing List Mailbox Copyright 2003 Apple Computer, Inc.  l  w k i I .emalcpmanull@mssg o 0msgs O k r J o 0listidslistIds r  J  o 0 senderheaders senderHeaders l ! !X"# "k$$%& %r!'( 'm) ) List-Post (o 0 headerkey headerKey&*+ *r"+,- ,l"). .n")/0 /I#)1 0get_header_from_message123 2o#$ 0 headerkey headerKey34 4o$% 0msg 0f"# -o 0listidlistId+5 5Z,678 6>,/9: 9o,- 0listidlistId :m-.; ; 7k2{<<=> =r2:?@ ?n28AB A168  ctnt Bn26CD C436E  cobj Em45 Do23 0listidlistId @o 0listnamelistName>FG Fr;DHI Hn;BJK JI<BL 0index_ofLMN Mo<= 0listnamelistNameNO Om=>P P: Kf;< Io 0iGQR QrEYST SnEWUV U7FWWX  ctxt W4JOY  cha YlKNZ Z[KN[\ [oKL 0i \mLM X4PV]  cha ]lQU^ ^nQU_` _1RT  leng `oQR 0listnamelistName VoEF 0listnamelistName To 0listnamelistNameRab arZccd cnZaef eI[ag 0index_ofghi ho[\ 0listnamelistNameij jm\]k k@ ffZ[ do 0iblm lrduno nndspq p7esrs  ctxt r4ilt  cha tmjk s4mru  cha ulnqv v\nqwx wono 0i xmop qode 0listnamelistName oo 0listnamelistNamemyz ylvvz{| {Qv}~ }ky ry~ by| myz Mailing Lists/ oz{ 0listnamelistName o 0mboxnamemboxName l Q k r I .sysodlogaskrTEXT m Enter the mailbox name:  dtxt l c o 0mboxnamemboxName m  TEXT o 0res r n 1  ttxt o 0res o 0mboxnamemboxName R .ascrerr ******** L r 5  mbxp o 0mboxnamemboxName  kfrmname o 0mbox e n 1  pnam o 0mbox ~R .ascrerr ******** Z > o 0mboxnamemboxName m  k I .corecrel****null  kocl m  mbxp  prdt K  pnam o 0mboxnamemboxName r 5  mbxp o 0mboxnamemboxName  kfrmname o 0mbox| l l *$ Now set up the rule for the mailbox r n 1  ctnt n 4  cobj m o 0listidlistId o 0 listidheader listIdHeader r I .corecrel****null  kocl m  rule  insh n ; 2  rule  prdt K  pnam b m Mailing List -  o  0listnamelistName o 0newrulenewRule r! m~ ~ savoyes n 1 } } rstm o| |0newrulenewRule r") o"#{ {0mbox n 1$(z z rtme o#$y y0newrulenewRule I*3xw x.coredelonullobj n*/ 2+/v v rucr o*+u u0newrulenewRulew l44tsts r4e I4crq r.corecrel****nullqp p kocl m69o o rucrn n insh n<B :AB l<Am n<A 2=Al l rucr o<=k k0newrulenewRulemji j prdt KE]h h rtyp mHKg g erutthdkf f mhdr oNOe e0 headerkey headerKeyd d rexp oRSc c0 listidheader listIdHeaderba b rqua mVY` ` enrqrqieai o_ _"0myruleconditionmyRuleCondition lff^]^] rfm mfg\ \ boovtrue  n   1hl[ [ isac  oghZ Z0newrulenewRule   InsYX Y.ascrcmnt******** onoW W0 headerkey headerKeyX V It{UT U.sysodlogaskrTEXT mtw 82A new rule for this mailing list has been created.TV 8I~SR S.sysodlogaskrTEXT m~ jdThe selected email address does not appear to be from a mailing list. There is no List-Post header.R 0msg #oQ Q0msgs m  null߀^Mail.app0utxti<` < Demalalis8Gros durH+^Mail.appFa Applicationsa^Gros dur:Applications:Mail.appMail.appGros durApplications/Mail.app/ lPOPO i INM N0get_header_from_message oL L0 desiredheader desiredHeaderK oJ J0 themessage theMessageKM O4 k3  !" !r #$ #l%I %n&' &2H H mhdr 'oG G0 themessage theMessageI $oF F0hdrs"() (X 0*E+ *Z+,-DC ,=./ .n01 01B B pnam 1oA A0hdr /o@ @0 desiredheader desiredHeader -L"'2 2n"&34 31#%? ? pcnt 4o"#> >0hdrDC E0hdr +o = =0hdrs)5< 5L136 6m127 7< m 8; 8l:9: 9 on run tell application "Mail" set selMsgs to selection end tell tell me to perform mail action with messages selMsgs tell application "Mail" properties of item 1 of rule conditions of the last item of rules end tell end run ; :; :l9898;<7 <i => =I6?5 6 0index_of?@A @o4 4 0haystackAB3 Bo2 2 0needle35 >k'CCDE DY$F1GH0 FZIJ/. I=KL KnMN M4-O - cha Oo, ,0i No+ + 0haystack Lo* * 0needle JLP Po) )0i/. 10i Gm(( HI 'Q& '.corecnte******** QnRS R2% % cha So$ $ 0haystack&0ET# TL%'U Um%&""#7!VWXY!V  .emalcpmanull@mssg 0get_header_from_message  0index_ofWZ[ .emalcpmanull@mssg 0msgsZ 0msgs 0listidslistIds 0 senderheaders senderHeaders 0msg 0 headerkey headerKey 0listidlistId 0listnamelistName 0i 0mboxnamemboxName 0res 0mbox 0 listidheader listIdHeader 0newrulenewRule "0myruleconditionmyRuleCondition[1 );Pk  kocl  cobj .corecnte******** 0get_header_from_message  ctnt  0index_of  ctxt  cha  leng  dtxt  TEXT .sysodlogaskrTEXT  ttxt  mbxp  kfrmname  pnam  prdt .corecrel****null  rule  insh  savoyes  rstm  rtme  rucr .coredelonullobj  rtyp  erutthdk  mhdr  rexp  rqua  enrqrqie  isac .ascrcmnt********jvEOjvEO{[l khEO)l+EONk/,EO)l+ EO[\[k/\,E/2EO)l+ EO[\[k/\k/2EOB%EOaa&l EOa,EW XhO*aa0EOa,EW3Xa%*aaala O*aa0EYhOk/,EO*aa*a-6aaa%la EOa!a",FOa#,FOa$-j %O*a$aa$-5aa&a'a(a)a*a+a,a EOea-,FOj .Oa/j Y a0j [OYUX\] 0get_header_from_message^^ 0 desiredheader desiredHeader 0 themessage theMessage\ 0 desiredheader desiredHeader 0 themessage theMessage 0hdrs 0hdr] 7  mhdr  kocl  cobj .corecnte********  pnam  pcnt51-EO%[l kh, ,EYh[OYOUY>_` 0index_ofaa 0haystack 0needle_ 0haystack 0needle 0i`  cha .corecnte********(#k-j kh/Yh[OYOjascr ޭ