diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 6 | ||||
-rw-r--r-- | spec/controllers/user_controller_spec.rb | 10 | ||||
-rw-r--r-- | spec/fixtures/files/quoted-subject-iso8859-1.email | 462 | ||||
-rw-r--r-- | spec/fixtures/files/track-response-abcmail-oof.email | 80 | ||||
-rw-r--r-- | spec/fixtures/files/track-response-outlook-oof.email | 587 | ||||
-rw-r--r-- | spec/models/incoming_message_spec.rb | 56 | ||||
-rw-r--r-- | spec/script/handle-mail-replies_spec.rb | 10 | ||||
-rw-r--r-- | spec/spec_helper.rb | 5 |
8 files changed, 1197 insertions, 19 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 4994c2a8f..f25ebe339 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -287,7 +287,7 @@ describe RequestController, "when showing one request" do old_path = assigns[:url_path] response.location.should have_text(/#{assigns[:url_path]}$/) zipfile = Zip::ZipFile.open(File.join(File.dirname(__FILE__), "../../cache/zips", old_path)) { |zipfile| - zipfile.count.should == 2 + zipfile.count.should == 1 # just the message } receive_incoming_mail('incoming-request-two-same-name.email', ir.incoming_email) get :download_entire_request, :url_title => title @@ -295,14 +295,14 @@ describe RequestController, "when showing one request" do old_path = assigns[:url_path] response.location.should have_text(/#{assigns[:url_path]}$/) zipfile = Zip::ZipFile.open(File.join(File.dirname(__FILE__), "../../cache/zips", old_path)) { |zipfile| - zipfile.count.should == 2 + zipfile.count.should == 3 # the message plus two "hello.txt" files } receive_incoming_mail('incoming-request-attachment-unknown-extension.email', ir.incoming_email) get :download_entire_request, :url_title => title assigns[:url_path].should have_text(/#{title}.zip$/) response.location.should have_text(/#{assigns[:url_path]}/) zipfile = Zip::ZipFile.open(File.join(File.dirname(__FILE__), "../../cache/zips", assigns[:url_path])) { |zipfile| - zipfile.count.should == 4 + zipfile.count.should == 5 # the message, two hello.txt, the unknown attachment, and its empty message } assigns[:url_path].should_not == old_path end diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb index 399b275a7..c13d7c9fc 100644 --- a/spec/controllers/user_controller_spec.rb +++ b/spec/controllers/user_controller_spec.rb @@ -28,6 +28,16 @@ describe UserController, "when showing a user" do response.should render_template('show') end + it "should distinguish between 'my profile' and 'my requests' for logged in users" do + session[:user_id] = users(:bob_smith_user).id + get :show, :url_name => "bob_smith", :view => 'requests' + response.body.should_not include("Change your password") + response.body.should match(/Your [0-9]+ Freedom of Information requests/) + get :show, :url_name => "bob_smith", :view => 'profile' + response.body.should include("Change your password") + response.body.should_not match(/Your [0-9]+ Freedom of Information requests/) + end + it "should assign the user" do get :show, :url_name => "bob_smith" assigns[:display_user].should == users(:bob_smith_user) diff --git a/spec/fixtures/files/quoted-subject-iso8859-1.email b/spec/fixtures/files/quoted-subject-iso8859-1.email new file mode 100644 index 000000000..6ada69905 --- /dev/null +++ b/spec/fixtures/files/quoted-subject-iso8859-1.email @@ -0,0 +1,462 @@ +From: =?iso-8859-1?Q?Coordena=E7=E3o_de_Relacionamento=2C_Pesquisa_e_Informa=E7?= + =?iso-8859-1?Q?=E3o/CEDI?= <geraldinequango@localhost> +To: FOI Person <EMAIL_TO> +MIME-Version: 1.0 +Content-Type: multipart/related; + type="multipart/alternative"; + boundary="----_=_NextPart_001_01CCB66F.F38B15FC" +Subject: =?iso-8859-1?Q?C=E2mara_Responde=3A__Banco_de_ideias?= +Date: Fri, 9 Dec 2011 10:42:02 -0200 + +This is a multi-part message in MIME format. + +------_=_NextPart_001_01CCB66F.F38B15FC +Content-Type: multipart/alternative; + boundary="----_=_NextPart_002_01CCB66F.F38B15FC" + + +------_=_NextPart_002_01CCB66F.F38B15FC +Content-Type: text/plain; + charset="iso-8859-1" +Content-Transfer-Encoding: quoted-printable + +=20 + +Senhor Benedito, + +=20 + +O Centro de Documenta=E7=E3o e Informa=E7=E3o (Cedi) da C=E2mara dos = +Deputados agradece o seu contato. + +=20 + +Em aten=E7=E3o ao solicitado, informamos que a C=E2mara dos Deputados, = +por iniciativa da Comiss=E3o de Legisla=E7=E3o Participativa - CLP, = +criou um "Banco de Id=E9ias" com o objetivo de registrar e reunir = +id=E9ias de interesse da popula=E7=E3o. As sugest=F5es s=E3o organizadas = +por temas e ficam =E0s disposi=E7=E3o para consulta de entidades da = +sociedade civil e parlamentares, que poder=E3o adot=E1-las, = +aprimorando-as ou n=E3o, para serem transformadas em sugest=E3o de = +iniciativa legislativa, no caso das entidades da sociedade civil, ou em = +proposi=E7=E3o legislativa, no caso dos parlamentares. Cabe ressaltar = +que a Comiss=E3o reserva-se o direito de editar ou resumir os textos = +recebidos. + +A seguir, o endere=E7o eletr=F4nico do Banco de Id=E9ias:=20 + +=20 + +http://www2.camara.gov.br/atividade-legislativa/comissoes/comissoes-perma= +nentes/clp/banideias.htm/banco-de-ideias + +=20 + +Atenciosamente, +***************************************************** +Coordena=E7=E3o de Relacionamento, Pesquisa e Informa=E7=E3o - Corpi +Centro de Documenta=E7=E3o e Informa=E7=E3o - Cedi +C=E2mara dos Deputados - Anexo II +Pra=E7a dos Tr=EAs Poderes - Bras=EDlia - DF=20 +70160-900=20 +Tel.: 0-XX-61- 3216-5777; fax: 0-XX-61- 3216-5757=20 +informa.cedi@camara.gov.br <mailto:informa.cedi@camara.gov.br>=20 +***************************************************** + +mbb + +=20 + +Solicita=E7=E3o:=20 + +=20 + + Prezado(a) C=E2mara dos Deputados, + + =20 + + Gostaria de sugerir que o sal=E1rio de quem trabalha com pol=EDtica + + seja vinculado ao sal=E1rio m=EDnimo. + + =20 + + Atenciosamente, + + Benedito P.B.Neto + + =20 + + ------------------------------------------------------------------- + + =20 + + Por favor use esse endere=E7o de email em todas as repostas para = +este + + pedido: + + leideacesso+request-120-9702221c@queremossaber.org.br + + =20 + + Caso este email - informa.cedi@camara.gov.br - seja o endere=E7o + + errado para fazer acesso a informa=E7=E3o por favor nos contate e + + aponte o endere=E7o correto atrav=E9s desse formul=E1rio: + + http://queremossaber.org.br/pt/help/contact + + =20 + + Aviso: Esta mensagem e todas as respostas ser=E3o publicadas na + + internet. Leia sobre nossa pol=EDtica de privacidade: + + http://queremossaber.org.br/pt/help/officers + + =20 + + Caso voc=EA ache esse servi=E7o =FAtil, por favor entre em contato. + + =20 + + =20 + + ------------------------------------------------------------------- + + +------_=_NextPart_002_01CCB66F.F38B15FC +Content-Type: text/html; + charset="iso-8859-1" +Content-Transfer-Encoding: quoted-printable + +<html xmlns:v=3D"urn:schemas-microsoft-com:vml" = +xmlns:o=3D"urn:schemas-microsoft-com:office:office" = +xmlns:w=3D"urn:schemas-microsoft-com:office:word" = +xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" = +xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta = +http-equiv=3DContent-Type content=3D"text/html; = +charset=3Diso-8859-1"><meta name=3DGenerator content=3D"Microsoft Word = +14 (filtered medium)"><!--[if !mso]><style>v\:* = +{behavior:url(#default#VML);} +o\:* {behavior:url(#default#VML);} +w\:* {behavior:url(#default#VML);} +.shape {behavior:url(#default#VML);} +</style><![endif]--><style><!-- +/* Font Definitions */ +@font-face + {font-family:Calibri; + panose-1:2 15 5 2 2 2 4 3 2 4;} +@font-face + {font-family:Tahoma; + panose-1:2 11 6 4 3 5 4 4 2 4;} +/* Style Definitions */ +p.MsoNormal, li.MsoNormal, div.MsoNormal + {margin:0cm; + margin-bottom:.0001pt; + font-size:11.0pt; + font-family:"Calibri","sans-serif"; + mso-fareast-language:EN-US;} +a:link, span.MsoHyperlink + {mso-style-priority:99; + color:blue; + text-decoration:underline;} +a:visited, span.MsoHyperlinkFollowed + {mso-style-priority:99; + color:purple; + text-decoration:underline;} +p.MsoPlainText, li.MsoPlainText, div.MsoPlainText + {mso-style-priority:99; + mso-style-link:"Texto sem Formata=E7=E3o Char"; + margin:0cm; + margin-bottom:.0001pt; + font-size:11.0pt; + font-family:"Calibri","sans-serif"; + mso-fareast-language:EN-US;} +p.MsoAcetate, li.MsoAcetate, div.MsoAcetate + {mso-style-priority:99; + mso-style-link:"Texto de bal=E3o Char"; + margin:0cm; + margin-bottom:.0001pt; + font-size:8.0pt; + font-family:"Tahoma","sans-serif"; + mso-fareast-language:EN-US;} +span.TextosemFormataoChar + {mso-style-name:"Texto sem Formata=E7=E3o Char"; + mso-style-priority:99; + mso-style-link:"Texto sem Formata=E7=E3o"; + font-family:"Calibri","sans-serif";} +span.TextodebaloChar + {mso-style-name:"Texto de bal=E3o Char"; + mso-style-priority:99; + mso-style-link:"Texto de bal=E3o"; + font-family:"Tahoma","sans-serif";} +.MsoChpDefault + {mso-style-type:export-only; + font-family:"Calibri","sans-serif"; + mso-fareast-language:EN-US;} +@page WordSection1 + {size:612.0pt 792.0pt; + margin:70.85pt 3.0cm 70.85pt 3.0cm;} +div.WordSection1 + {page:WordSection1;} +--></style><!--[if gte mso 9]><xml> +<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> +</xml><![endif]--><!--[if gte mso 9]><xml> +<o:shapelayout v:ext=3D"edit"> +<o:idmap v:ext=3D"edit" data=3D"1" /> +</o:shapelayout></xml><![endif]--></head><body lang=3DPT-BR link=3Dblue = +vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span = +style=3D'mso-fareast-language:PT-BR'><img width=3D566 height=3D58 = +id=3D"Imagem_x0020_1" src=3D"cid:image001.png@01CCB65F.2FD5C970" = +alt=3D"Descri=E7=E3o: Logo Corpi_html_1cd70d8a"><o:p></o:p></span></p><p = +class=3DMsoPlainText> <o:p></o:p></p><p class=3DMsoPlainText>Senhor = +Benedito,<o:p></o:p></p><p class=3DMsoPlainText><o:p> </o:p></p><p = +class=3DMsoPlainText>O Centro de Documenta=E7=E3o e Informa=E7=E3o = +(Cedi) da C=E2mara dos Deputados agradece o seu = +contato.<o:p></o:p></p><p class=3DMsoPlainText><o:p> </o:p></p><p = +class=3DMsoPlainText>Em aten=E7=E3o ao solicitado, informamos que a = +C=E2mara dos Deputados, por iniciativa da Comiss=E3o de Legisla=E7=E3o = +Participativa – CLP, criou um “Banco de Id=E9ias” com = +o objetivo de registrar e reunir id=E9ias de interesse da popula=E7=E3o. = +As sugest=F5es s=E3o organizadas por temas e ficam =E0s disposi=E7=E3o = +para consulta de entidades da sociedade civil e parlamentares, que = +poder=E3o adot=E1-las, aprimorando-as ou n=E3o, para serem transformadas = +em sugest=E3o de iniciativa legislativa, no caso das entidades da = +sociedade civil, ou em proposi=E7=E3o legislativa, no caso dos = +parlamentares. Cabe ressaltar que a Comiss=E3o reserva-se o direito de = +editar ou resumir os textos recebidos.<o:p></o:p></p><p = +class=3DMsoPlainText>A seguir, o endere=E7o eletr=F4nico do Banco de = +Id=E9ias: <o:p></o:p></p><p class=3DMsoPlainText><o:p> </o:p></p><p = +class=3DMsoPlainText>http://www2.camara.gov.br/atividade-legislativa/comi= +ssoes/comissoes-permanentes/clp/banideias.htm/banco-de-ideias<o:p></o:p><= +/p><p class=3DMsoPlainText><o:p> </o:p></p><p = +class=3DMsoNormal><span = +style=3D'font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-la= +nguage:PT-BR'>Atenciosamente,<br>****************************************= +*************<br>Coordena=E7=E3o de Relacionamento, Pesquisa e = +Informa=E7=E3o – Corpi<br>Centro de Documenta=E7=E3o e = +Informa=E7=E3o – Cedi<br>C=E2mara dos Deputados – Anexo = +II<br>Pra=E7a dos Tr=EAs Poderes – Bras=EDlia – DF = +<br>70160-900 <br>Tel.: 0-XX-61- 3216-5777; fax: 0-XX-61- 3216-5757 = +<br><a href=3D"mailto:informa.cedi@camara.gov.br"><span = +style=3D'color:windowtext'>informa.cedi@camara.gov.br</span></a><br>*****= +************************************************<o:p></o:p></span></p><p = +class=3DMsoNormal><span = +style=3D'font-size:8.0pt;font-family:"Arial","sans-serif";mso-fareast-lan= +guage:PT-BR'>mbb<o:p></o:p></span></p><p = +class=3DMsoPlainText><o:p> </o:p></p><p = +class=3DMsoPlainText>Solicita=E7=E3o: <o:p></o:p></p><p = +class=3DMsoPlainText><o:p> </o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0 Prezado(a) C=E2mara dos = +Deputados,<o:p></o:p></p><p class=3DMsoPlainText>=A0=A0=A0=A0 = +<o:p></o:p></p><p class=3DMsoPlainText>=A0=A0=A0=A0=A0Gostaria de = +sugerir que o sal=E1rio de quem trabalha com pol=EDtica<o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0 seja vinculado ao sal=E1rio = +m=EDnimo.<o:p></o:p></p><p class=3DMsoPlainText>=A0=A0=A0=A0 = +<o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0=A0Atenciosamente,<o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0 Benedito P.B.Neto<o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0 <o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0=A0-------------------------------------= +------------------------------<o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0 <o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0=A0Por favor use esse endere=E7o de = +email em todas as repostas para este<o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0 pedido:<o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0 = +leideacesso+request-120-9702221c@queremossaber.org.br<o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0 <o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0=A0Caso este email - = +informa.cedi@camara.gov.br - seja o endere=E7o<o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0 errado para fazer acesso a = +informa=E7=E3o por favor nos contate e<o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0 aponte o endere=E7o correto atrav=E9s = +desse formul=E1rio:<o:p></o:p></p><p class=3DMsoPlainText>=A0=A0=A0=A0 = +http://queremossaber.org.br/pt/help/contact<o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0 <o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0=A0Aviso: Esta mensagem e todas as = +respostas ser=E3o publicadas na<o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0 internet. Leia sobre nossa pol=EDtica = +de privacidade:<o:p></o:p></p><p class=3DMsoPlainText>=A0=A0=A0=A0 = +http://queremossaber.org.br/pt/help/officers<o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0 <o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0=A0Caso voc=EA ache esse servi=E7o = +=FAtil, por favor entre em contato.<o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0 <o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0=A0<o:p></o:p></p><p = +class=3DMsoPlainText>=A0=A0=A0=A0=A0-------------------------------------= +------------------------------<o:p></o:p></p></div></body></html> +------_=_NextPart_002_01CCB66F.F38B15FC-- + +------_=_NextPart_001_01CCB66F.F38B15FC +Content-Type: image/png; + name="image001.png" +Content-Transfer-Encoding: base64 +Content-ID: <image001.png@01CCB65F.2FD5C970> +Content-Description: image001.png +Content-Location: image001.png + +iVBORw0KGgoAAAANSUhEUgAAAjYAAAA6CAIAAAAsiYQwAAAjEUlEQVR4nO2dB3gc1bn336nbm7pV +rWZZkiU3ucmWcQMMGBsbguFiMARM5wMSQhIuaf4INyEkfOAvBG4IJU8uJU5CQlxkXHDFvajYlixZ +stUsraTVStt3p9wzK1vI2tVom4rx/J71ejRzznvec2b2/OedOXOG5Hkerjd48LjdLp7v6eg4eKil +utr21NMzdDpVxMt58slDb789O+JmJSQkJK4TyNF2YETgwNhqbbf0dHa7a+vOXjjTve1Ia6PLxtT2 +YOCeV5wql5dEvEye544f/xOAJFESEhISIUKyLEsQxGi7EXm6Ozvr66znu7u6WhpPNeDlZ6qbWxos +1tgeM9B0N01NpDEdF63p5OpWr1spkw1HC2A0rRgGsxISEh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vQoY +hkNK5PwrIiVG1u0Aw51wjIeQfcRkbCQ9iVRj9i0MdrIfQmg7pM2gPAwt+2gREbfFzzAi1e1E/BZU +H5dnOh+fHf+Dl+77ntveYTLZLXoMs+DAd4DTKcybRyGJikYSpVGpxkUrruTUGmJef2GN3G0ieNaD +I4mieYyQsRYradB5jCjI6SEJOcc6iRiVx9hDy5Plqgl3x9+6bCbKayNjUEqU3oPJlazJSsYomG6O +UquRNArPSxlkV7+ySqGmPvrj3RZcr2NcBGNVaAxoZVRU1IIFJVarrXcs+NSpU0EYho6//PLLfaMr +CgoKMjIyULyF9KykpIQgiLi4OLQVqRTaevfdd6M1SN6yszMnTy4sLS1duXJlb8Y1a9agTWazWavV +4qKDDwcFibzLGUTy4Gc6F9nk1/KAH3mA2QdLH5TbgZc4mLfhONz/1rdIdr8+h5AxtJYMhOFugTA9 +GfJgGOwIFJGfQAoKPGOYDF8DihcR8pEZrBuBdDsidkLzQZyr3rdE0Mr4BKXwfKxwiQ9SRXNi4IlX +8qCMunq1QSt8C+8n7Kcycd6VQBMKmhY0TgNXvgRivEu9s7gONpcrFq2Jib7s8DeGVSo1+lx2nrg8 +OwWGQf/5ilQqVf8E/V8x1X8Zadjtt9/e92dvYr1eP4g/Q8NjkHTr8uCyDK4xQWUZ7PKL76YhsweY +3u/RGaBvImlEKiKecbA1ISQIJ2MILRnUcggFie9BEbMBbg32GPa7ryN+IA25NfwGDMG4+Dll4In9 +rg+coCwH3hdFSqvCeCUgJus3h9+3gci+IBHHsI9/tiyCBscyImfBEmOf4btKIxEa0g+qj3Ak6luk +TsMDdT21kNTHXbuM5L6TjpMAuVYaarj9/Ja8WF1CQkJC4tuHJFESEhISEmMUSaIkJCQkJMYokkRJ +SEhISIxR/heHXcIrMvkS1gAAAABJRU5ErkJggg== + +------_=_NextPart_001_01CCB66F.F38B15FC--
\ No newline at end of file diff --git a/spec/fixtures/files/track-response-abcmail-oof.email b/spec/fixtures/files/track-response-abcmail-oof.email new file mode 100644 index 000000000..5d1733143 --- /dev/null +++ b/spec/fixtures/files/track-response-abcmail-oof.email @@ -0,0 +1,80 @@ +Delivered-To: mysociety.robin@gmail.com +Received: by 10.216.154.212 with SMTP id h62cs265517wek; + Fri, 30 Dec 2011 02:03:17 -0800 (PST) +Received: by 10.227.208.129 with SMTP id gc1mr47630338wbb.4.1325239396543; + Fri, 30 Dec 2011 02:03:16 -0800 (PST) +Return-Path: <Name.Removed@example.gov.uk> +Received: from wildfire.ukcod.org.uk (wildfire.ukcod.org.uk. [89.238.145.74]) + by mx.google.com with ESMTPS id ei10si9596065wbb.20.2011.12.30.02.03.16 + (version=TLSv1/SSLv3 cipher=OTHER); + Fri, 30 Dec 2011 02:03:16 -0800 (PST) +Received-SPF: neutral (google.com: 89.238.145.74 is neither permitted nor denied by best guess record for domain of Name.Removed@example.gov.uk) client-ip=89.238.145.74; +Authentication-Results: mx.google.com; spf=neutral (google.com: 89.238.145.74 is neither permitted nor denied by best guess record for domain of Name.Removed@example.gov.uk) smtp.mail=Name.Removed@example.gov.uk +Received: from foi by wildfire.ukcod.org.uk with local (Exim 4.72) + (envelope-from <Name.Removed@example.gov.uk>) + id 1RgZIs-0000ME-1T + for team_delivery@whatdotheyknow.com; Fri, 30 Dec 2011 10:03:10 +0000 +Received: from truro.icritical.com ([93.95.13.13]:51540) + by wildfire.ukcod.org.uk with smtp (Exim 4.72) + (envelope-from <Name.Removed@example.gov.uk>) + id 1RgZIq-0000M6-St + for track@whatdotheyknow.com; Fri, 30 Dec 2011 10:03:09 +0000 +Received: (qmail 19136 invoked from network); 30 Dec 2011 10:03:08 -0000 +Received: from localhost (127.0.0.1) + by truro.icritical.com with SMTP; 30 Dec 2011 10:03:08 -0000 +Received: from truro.icritical.com ([127.0.0.1]) + by localhost (truro.icritical.com [127.0.0.1]) (amavisd-new, port 10024) + with SMTP id 19122-01 for <track@whatdotheyknow.com>; + Fri, 30 Dec 2011 10:03:07 +0000 (GMT) +Received: (qmail 19112 invoked by uid 599); 30 Dec 2011 10:03:06 -0000 +Received: from unknown (HELO abcmail.example.gov.uk) (213.185.212.82) + by truro.icritical.com (qpsmtpd/0.28) with ESMTP; Fri, 30 Dec 2011 10:03:06 +0000 +Subject: AUTO: Name Removed is out of the office (returning 03/01/2012) +Auto-Submitted: auto-generated +From: Name.Removed@example.gov.uk +To: track@whatdotheyknow.com +Message-ID: <OFF4E36F18.ED02EFA3-ON80257976.00373794-80257976.00373794@example.gov.uk> +Date: Fri, 30 Dec 2011 10:03:07 +0000 +X-MIMETrack: Serialize by Router on ABCMail/SVR/ABC(Release 8.5.2FP1|November 29, 2010) at + 30/12/2011 10:03:07 +MIME-Version: 1.0 +Content-type: text/plain; charset=US-ASCII +X-Virus-Scanned: by iCritical at truro.icritical.com + + +I am out of the office until 03/01/2012. + +I will be out of the office until 3rd January December 2012. I will deal +with all emails upon my return. If your query is urgent please contact +Colleague Name on colleague.name@example.gov.uk or 01234 567890. + +If you are requesting information under the Freedom of Information Act, the +Environmental Information Regulations or the Data Protection Act, please +forward your enquiry to colleague.name@example.gov.uk The Council +will begin processing your request once it is received by that address. + + +Thanks + +Name + + + + + +Note: This is an automated response to your message "Your WhatDoTheyKnow +email alert" sent on 30/12/2011 06:54:19. + +This is the only notification you will receive while this person is away. + + +This e-mail and any files transmitted with it are confidential and +intended solely for the use of the individual or entity to whom +they are addressed. +If you have received this e-mail in error please notify the +originator of the message. This footer also confirms that this +e-mail message has been scanned for the presence of computer viruses. + +Any views expressed in this message are those of the individual +sender, except where the sender specifies and with authority, +states them to be the views of Organisation Name. diff --git a/spec/fixtures/files/track-response-outlook-oof.email b/spec/fixtures/files/track-response-outlook-oof.email new file mode 100644 index 000000000..ee5a28b15 --- /dev/null +++ b/spec/fixtures/files/track-response-outlook-oof.email @@ -0,0 +1,587 @@ +Delivered-To: mysociety.robin@gmail.com +Received: by 10.152.24.138 with SMTP id u10cs341636laf; + Thu, 8 Dec 2011 02:39:53 -0800 (PST) +Received: by 10.180.103.131 with SMTP id fw3mr4246912wib.57.1323340792168; + Thu, 08 Dec 2011 02:39:52 -0800 (PST) +Return-Path: <peter@kentadvice.co.uk> +Received: from wildfire.ukcod.org.uk (wildfire.ukcod.org.uk. [89.238.145.74]) + by mx.google.com with ESMTPS id ft12si3357577wbb.14.2011.12.08.02.39.51 + (version=TLSv1/SSLv3 cipher=OTHER); + Thu, 08 Dec 2011 02:39:52 -0800 (PST) +Received-SPF: neutral (google.com: 89.238.145.74 is neither permitted nor denied by best guess record for domain of peter@kentadvice.co.uk) client-ip=89.238.145.74; +Authentication-Results: mx.google.com; spf=neutral (google.com: 89.238.145.74 is neither permitted nor denied by best guess record for domain of peter@kentadvice.co.uk) smtp.mail=peter@kentadvice.co.uk +Received: from foi by wildfire.ukcod.org.uk with local (Exim 4.72) + (envelope-from <peter@kentadvice.co.uk>) + id 1RYbOC-00034X-Vm + for team_delivery@whatdotheyknow.com; Thu, 08 Dec 2011 10:39:45 +0000 +Received: from mail-ey0-f173.google.com ([209.85.215.173]:38997) + by wildfire.ukcod.org.uk with esmtp (Exim 4.72) + (envelope-from <peter@kentadvice.co.uk>) + id 1RYbOC-00034L-GF + for track@whatdotheyknow.com; Thu, 08 Dec 2011 10:39:44 +0000 +Received: by eaai10 with SMTP id i10so1168752eaa.32 + for <track@whatdotheyknow.com>; Thu, 08 Dec 2011 02:39:33 -0800 (PST) +Received: by 10.213.21.148 with SMTP id j20mr131258ebb.87.1323340773446; + Thu, 08 Dec 2011 02:39:33 -0800 (PST) +Received: from PRWin7 (cpc2-tilb7-2-0-cust982.basl.cable.virginmedia.com. [94.168.103.215]) + by mx.google.com with ESMTPS id 49sm16411187eec.1.2011.12.08.02.39.31 + (version=TLSv1/SSLv3 cipher=OTHER); + Thu, 08 Dec 2011 02:39:32 -0800 (PST) +From: "Name Removed" <name-removed@example.co.uk> +To: <track@whatdotheyknow.com> +Subject: Out of Office reply +Date: Thu, 8 Dec 2011 10:39:24 -0000 +Message-ID: <00ab01ccb595$aada0070$008e0150$@co.uk> +MIME-Version: 1.0 +Content-Type: multipart/alternative; + boundary="----=_NextPart_000_00AC_01CCB595.AADA0070" +X-Mailer: Microsoft Office Outlook 12.0 +Thread-Index: Acy1laTpNPAp9QuHRu2X59T70yzpQw== +Content-Language: en-gb + +This is a multi-part message in MIME format. + +------=_NextPart_000_00AC_01CCB595.AADA0070 +Content-Type: text/plain; + charset="US-ASCII" +Content-Transfer-Encoding: 7bit + +Thank you for your message. I am currently out of the office, with [limited] +[no] access to e-mail. + +I will be returning on [day, date]. + +If you need assistance before then, you may reach me at [phone number]. +For urgent issues, please contact [name] at [e-mail address] or [telephone +number]. + +[Signature] + +[Optional: Type your favorite quotation or saying here along with the author +or source] + +------=_NextPart_000_00AC_01CCB595.AADA0070 +Content-Type: text/html; + charset="US-ASCII" +Content-Transfer-Encoding: quoted-printable + +<html xmlns:v=3D"urn:schemas-microsoft-com:vml" = +xmlns:o=3D"urn:schemas-microsoft-com:office:office" = +xmlns:w=3D"urn:schemas-microsoft-com:office:word" = +xmlns:x=3D"urn:schemas-microsoft-com:office:excel" = +xmlns:p=3D"urn:schemas-microsoft-com:office:powerpoint" = +xmlns:a=3D"urn:schemas-microsoft-com:office:access" = +xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" = +xmlns:s=3D"uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" = +xmlns:rs=3D"urn:schemas-microsoft-com:rowset" xmlns:z=3D"#RowsetSchema" = +xmlns:b=3D"urn:schemas-microsoft-com:office:publisher" = +xmlns:ss=3D"urn:schemas-microsoft-com:office:spreadsheet" = +xmlns:c=3D"urn:schemas-microsoft-com:office:component:spreadsheet" = +xmlns:oa=3D"urn:schemas-microsoft-com:office:activation" = +xmlns:html=3D"http://www.w3.org/TR/REC-html40" = +xmlns:q=3D"http://schemas.xmlsoap.org/soap/envelope/" xmlns:D=3D"DAV:" = +xmlns:x2=3D"http://schemas.microsoft.com/office/excel/2003/xml" = +xmlns:ois=3D"http://schemas.microsoft.com/sharepoint/soap/ois/" = +xmlns:dir=3D"http://schemas.microsoft.com/sharepoint/soap/directory/" = +xmlns:ds=3D"http://www.w3.org/2000/09/xmldsig#" = +xmlns:dsp=3D"http://schemas.microsoft.com/sharepoint/dsp" = +xmlns:udc=3D"http://schemas.microsoft.com/data/udc" = +xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" = +xmlns:sub=3D"http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/"= + xmlns:ec=3D"http://www.w3.org/2001/04/xmlenc#" = +xmlns:sp=3D"http://schemas.microsoft.com/sharepoint/" = +xmlns:sps=3D"http://schemas.microsoft.com/sharepoint/soap/" = +xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" = +xmlns:udcxf=3D"http://schemas.microsoft.com/data/udc/xmlfile" = +xmlns:wf=3D"http://schemas.microsoft.com/sharepoint/soap/workflow/" = +xmlns:mver=3D"http://schemas.openxmlformats.org/markup-compatibility/2006= +" xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" = +xmlns:mrels=3D"http://schemas.openxmlformats.org/package/2006/relationshi= +ps" = +xmlns:ex12t=3D"http://schemas.microsoft.com/exchange/services/2006/types"= + = +xmlns:ex12m=3D"http://schemas.microsoft.com/exchange/services/2006/messag= +es" xmlns=3D"http://www.w3.org/TR/REC-html40"> + +<head> +<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = +charset=3Dus-ascii"> + + +<meta name=3DProgId content=3DWord.Document> +<meta name=3DGenerator content=3D"Microsoft Word 12"> +<meta name=3DOriginator content=3D"Microsoft Word 12"> +<link rel=3DFile-List href=3D"cid:filelist.xml@01C895B2.35BC4F70"> +<!--[if gte mso 9]><xml> + <o:OfficeDocumentSettings> + <o:AllowPNG/> + <o:TargetScreenSize>1024x768</o:TargetScreenSize> + </o:OfficeDocumentSettings> +</xml><![endif]--> +<link rel=3DthemeData href=3D"~~themedata~~"> +<link rel=3DcolorSchemeMapping href=3D"~~colorschememapping~~"> +<!--[if gte mso 9]><xml> + <w:WordDocument> + <w:SpellingState>Clean</w:SpellingState> + <w:TrackMoves/> + <w:TrackFormatting/> + <w:EnvelopeVis/> + <w:ValidateAgainstSchemas/> + <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> + <w:IgnoreMixedContent>false</w:IgnoreMixedContent> + <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> + <w:DoNotPromoteQF/> + <w:LidThemeOther>EN-US</w:LidThemeOther> + <w:LidThemeAsian>X-NONE</w:LidThemeAsian> + <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> + <w:Compatibility> + <w:DoNotExpandShiftReturn/> + <w:BreakWrappedTables/> + <w:SnapToGridInCell/> + <w:WrapTextWithPunct/> + <w:UseAsianBreakRules/> + <w:DontGrowAutofit/> + <w:SplitPgBreakAndParaMark/> + <w:DontVertAlignCellWithSp/> + <w:DontBreakConstrainedForcedTables/> + <w:DontVertAlignInTxbx/> + <w:Word11KerningPairs/> + <w:CachedColBalance/> + </w:Compatibility> + <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> + <m:mathPr> + <m:mathFont m:val=3D"Cambria Math"/> + <m:brkBin m:val=3D"before"/> + <m:brkBinSub m:val=3D"--"/> + <m:smallFrac m:val=3D"off"/> + <m:dispDef/> + <m:lMargin m:val=3D"0"/> + <m:rMargin m:val=3D"0"/> + <m:defJc m:val=3D"centerGroup"/> + <m:wrapIndent m:val=3D"1440"/> + <m:intLim m:val=3D"subSup"/> + <m:naryLim m:val=3D"undOvr"/> + </m:mathPr></w:WordDocument> +</xml><![endif]--><!--[if gte mso 9]><xml> + <w:LatentStyles DefLockedState=3D"false" DefUnhideWhenUsed=3D"true"=20 + DefSemiHidden=3D"true" DefQFormat=3D"false" DefPriority=3D"99"=20 + LatentStyleCount=3D"267"> + <w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Normal"/> + <w:LsdException Locked=3D"false" Priority=3D"9" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"heading 1"/> + <w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" = +Name=3D"heading 2"/> + <w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" = +Name=3D"heading 3"/> + <w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" = +Name=3D"heading 4"/> + <w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" = +Name=3D"heading 5"/> + <w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" = +Name=3D"heading 6"/> + <w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" = +Name=3D"heading 7"/> + <w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" = +Name=3D"heading 8"/> + <w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" = +Name=3D"heading 9"/> + <w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 1"/> + <w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 2"/> + <w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 3"/> + <w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 4"/> + <w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 5"/> + <w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 6"/> + <w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 7"/> + <w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 8"/> + <w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 9"/> + <w:LsdException Locked=3D"false" Priority=3D"35" QFormat=3D"true" = +Name=3D"caption"/> + <w:LsdException Locked=3D"false" Priority=3D"10" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Title"/> + <w:LsdException Locked=3D"false" Priority=3D"1" Name=3D"Default = +Paragraph Font"/> + <w:LsdException Locked=3D"false" Priority=3D"11" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Subtitle"/> + <w:LsdException Locked=3D"false" Priority=3D"22" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Strong"/> + <w:LsdException Locked=3D"false" Priority=3D"20" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Emphasis"/> + <w:LsdException Locked=3D"false" Priority=3D"59" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Table Grid"/> + <w:LsdException Locked=3D"false" UnhideWhenUsed=3D"false" = +Name=3D"Placeholder Text"/> + <w:LsdException Locked=3D"false" Priority=3D"1" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"No Spacing"/> + <w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light Shading"/> + <w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light List"/> + <w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light Grid"/> + <w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1"/> + <w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2"/> + <w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium List 1"/> + <w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium List 2"/> + <w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1"/> + <w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2"/> + <w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3"/> + <w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Dark List"/> + <w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful Shading"/> + <w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful List"/> + <w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful Grid"/> + <w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 1"/> + <w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light List Accent 1"/> + <w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 1"/> + <w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 1"/> + <w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 1"/> + <w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 1"/> + <w:LsdException Locked=3D"false" UnhideWhenUsed=3D"false" = +Name=3D"Revision"/> + <w:LsdException Locked=3D"false" Priority=3D"34" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"List Paragraph"/> + <w:LsdException Locked=3D"false" Priority=3D"29" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Quote"/> + <w:LsdException Locked=3D"false" Priority=3D"30" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Intense Quote"/> + <w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 1"/> + <w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 1"/> + <w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 1"/> + <w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 1"/> + <w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 1"/> + <w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 1"/> + <w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 1"/> + <w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 1"/> + <w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 2"/> + <w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light List Accent 2"/> + <w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 2"/> + <w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 2"/> + <w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 2"/> + <w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 2"/> + <w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 2"/> + <w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 2"/> + <w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 2"/> + <w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 2"/> + <w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 2"/> + <w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 2"/> + <w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 2"/> + <w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 2"/> + <w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 3"/> + <w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light List Accent 3"/> + <w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 3"/> + <w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 3"/> + <w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 3"/> + <w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 3"/> + <w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 3"/> + <w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 3"/> + <w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 3"/> + <w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 3"/> + <w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 3"/> + <w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 3"/> + <w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 3"/> + <w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 3"/> + <w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 4"/> + <w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light List Accent 4"/> + <w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 4"/> + <w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 4"/> + <w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 4"/> + <w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 4"/> + <w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 4"/> + <w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 4"/> + <w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 4"/> + <w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 4"/> + <w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 4"/> + <w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 4"/> + <w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 4"/> + <w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 4"/> + <w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 5"/> + <w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light List Accent 5"/> + <w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 5"/> + <w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 5"/> + <w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 5"/> + <w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 5"/> + <w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 5"/> + <w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 5"/> + <w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 5"/> + <w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 5"/> + <w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 5"/> + <w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 5"/> + <w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 5"/> + <w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 5"/> + <w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 6"/> + <w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light List Accent 6"/> + <w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 6"/> + <w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 6"/> + <w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 6"/> + <w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 6"/> + <w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 6"/> + <w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 6"/> + <w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 6"/> + <w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 6"/> + <w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 6"/> + <w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 6"/> + <w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 6"/> + <w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 6"/> + <w:LsdException Locked=3D"false" Priority=3D"19" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Subtle Emphasis"/> + <w:LsdException Locked=3D"false" Priority=3D"21" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Intense Emphasis"/> + <w:LsdException Locked=3D"false" Priority=3D"31" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Subtle Reference"/> + <w:LsdException Locked=3D"false" Priority=3D"32" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Intense = +Reference"/> + <w:LsdException Locked=3D"false" Priority=3D"33" SemiHidden=3D"false"=20 + UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Book Title"/> + <w:LsdException Locked=3D"false" Priority=3D"37" = +Name=3D"Bibliography"/> + <w:LsdException Locked=3D"false" Priority=3D"39" QFormat=3D"true" = +Name=3D"TOC Heading"/> + </w:LatentStyles> +</xml><![endif]--> +<style> +<!-- + /* Font Definitions */ + @font-face + {font-family:"Cambria Math"; + panose-1:2 4 5 3 5 4 6 3 2 4; + mso-font-charset:1; + mso-generic-font-family:roman; + mso-font-format:other; + mso-font-pitch:variable; + mso-font-signature:0 0 0 0 0 0;} +@font-face + {font-family:Calibri; + panose-1:2 15 5 2 2 2 4 3 2 4; + mso-font-charset:0; + mso-generic-font-family:swiss; + mso-font-pitch:variable; + mso-font-signature:-1610611985 1073750139 0 0 159 0;} + /* Style Definitions */ + p.MsoNormal, li.MsoNormal, div.MsoNormal + {mso-style-unhide:no; + mso-style-qformat:yes; + mso-style-parent:""; + margin:0in; + margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:11.0pt; + font-family:"Calibri","sans-serif"; + mso-fareast-font-family:Calibri; + mso-fareast-theme-font:minor-latin; + mso-bidi-font-family:"Times New Roman";} +a:link, span.MsoHyperlink + {mso-style-noshow:yes; + mso-style-priority:99; + color:blue; + text-decoration:underline; + text-underline:single;} +a:visited, span.MsoHyperlinkFollowed + {mso-style-noshow:yes; + mso-style-priority:99; + color:purple; + text-decoration:underline; + text-underline:single;} +span.EmailStyle17 + {mso-style-type:personal; + mso-style-noshow:yes; + mso-style-unhide:no; + font-family:"Calibri","sans-serif"; + mso-ascii-font-family:Calibri; + mso-hansi-font-family:Calibri; + color:windowtext;} +span.EmailStyle18 + {mso-style-type:personal-reply; + mso-style-noshow:yes; + mso-style-unhide:no; + mso-ansi-font-size:11.0pt; + mso-bidi-font-size:11.0pt; + font-family:"Calibri","sans-serif"; + mso-ascii-font-family:Calibri; + mso-ascii-theme-font:minor-latin; + mso-hansi-font-family:Calibri; + mso-hansi-theme-font:minor-latin; + mso-bidi-font-family:"Times New Roman"; + mso-bidi-theme-font:minor-bidi; + color:#5F497A; + mso-themecolor:accent4; + mso-themeshade:191;} +.MsoChpDefault + {mso-style-type:export-only; + mso-default-props:yes; + font-size:10.0pt; + mso-ansi-font-size:10.0pt; + mso-bidi-font-size:10.0pt;} +@page Section1 + {size:8.5in 11.0in; + margin:1.0in 1.0in 1.0in 1.0in; + mso-header-margin:.5in; + mso-footer-margin:.5in; + mso-paper-source:0;} +div.Section1 + {page:Section1;} +--> +</style> +<!--[if gte mso 10]> +<style> + /* Style Definitions */=20 + table.MsoNormalTable + {mso-style-name:"Table Normal"; + mso-tstyle-rowband-size:0; + mso-tstyle-colband-size:0; + mso-style-noshow:yes; + mso-style-priority:99; + mso-style-qformat:yes; + mso-style-parent:""; + mso-padding-alt:0in 5.4pt 0in 5.4pt; + mso-para-margin:0in; + mso-para-margin-bottom:.0001pt; + mso-pagination:widow-orphan; + font-size:10.0pt; + font-family:"Times New Roman","serif";} +</style> +<![endif]--><!--[if gte mso 9]><xml> + <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> +</xml><![endif]--><!--[if gte mso 9]><xml> + <o:shapelayout v:ext=3D"edit"> + <o:idmap v:ext=3D"edit" data=3D"1" /> + </o:shapelayout></xml><![endif]--> +</head> + +<body lang=3DEN-US link=3Dblue vlink=3Dpurple = +style=3D'tab-interval:.5in'> + +<div class=3DSection1> + +<p class=3DMsoNormal>Thank you for your message. I am currently out of = +the +office, with [limited] [no] access to e-mail.<o:p></o:p></p> + +<p class=3DMsoNormal><o:p> </o:p></p> + +<p class=3DMsoNormal>I will be returning on [day, date].<o:p></o:p></p> + +<p class=3DMsoNormal><o:p> </o:p></p> + +<p class=3DMsoNormal>If you need assistance before then, you may reach = +me at +[phone number].<o:p></o:p></p> + +<p class=3DMsoNormal>For urgent issues, please contact [name] at [e-mail = +address] +or [telephone number].<o:p></o:p></p> + +<p class=3DMsoNormal><o:p> </o:p></p> + +<p class=3DMsoNormal>[Signature]<o:p></o:p></p> + +<p class=3DMsoNormal><o:p> </o:p></p> + +<p class=3DMsoNormal><i style=3D'mso-bidi-font-style:normal'>[Optional: = +Type your +favorite quotation or saying here along with the author or = +source]<o:p></o:p></i></p> + +</div> + +</body> + +</html> + +------=_NextPart_000_00AC_01CCB595.AADA0070-- + diff --git a/spec/models/incoming_message_spec.rb b/spec/models/incoming_message_spec.rb index ed31b7c5c..f514d6546 100644 --- a/spec/models/incoming_message_spec.rb +++ b/spec/models/incoming_message_spec.rb @@ -9,6 +9,10 @@ describe IncomingMessage, " when dealing with incoming mail" do load_raw_emails_data(raw_emails) end + after(:all) do + ActionMailer::Base.deliveries.clear + end + it "should return the mail Date header date for sent at" do @im.sent_at.should == @im.mail.date end @@ -27,6 +31,31 @@ describe IncomingMessage, " when dealing with incoming mail" do end end + it "should ensure cached body text has been parsed correctly" do + ir = info_requests(:fancy_dog_request) + receive_incoming_mail('quoted-subject-iso8859-1.email', ir.incoming_email) + message = ir.incoming_messages[1] + message.get_main_body_text_unfolded.should_not include("Email has no body") + end + + it "should correctly convert HTML even when there's a meta tag asserting that it is iso-8859-1 which would normally confuse elinks" do + ir = info_requests(:fancy_dog_request) + receive_incoming_mail('quoted-subject-iso8859-1.email', ir.incoming_email) + message = ir.incoming_messages[1] + message.parse_raw_email! + message.get_main_body_text_part.charset.should == "iso-8859-1" + message.get_main_body_text_internal.should include("política") + end + + it "should unquote RFC 2047 headers" do + ir = info_requests(:fancy_dog_request) + receive_incoming_mail('quoted-subject-iso8859-1.email', ir.incoming_email) + message = ir.incoming_messages[1] + message.mail_from.should == "Coordenação de Relacionamento, Pesquisa e Informação/CEDI" + message.subject.should == "Câmara Responde: Banco de ideias" + end + + it "should fold multiline sections" do { "foo\n--------\nconfidential" => "foo\nFOLDED_QUOTED_SECTION\n", # basic test @@ -102,16 +131,15 @@ describe IncomingMessage, " folding quoted parts of emails" do end describe IncomingMessage, " checking validity to reply to" do - def test_email(result, email, return_path, autosubmitted) + def test_email(result, email, return_path, autosubmitted = nil) @address = mock(TMail::Address) @address.stub!(:spec).and_return(email) @return_path = mock(TMail::ReturnPathHeader) @return_path.stub!(:addr).and_return(return_path) - - @autosubmitted = mock(TMail::KeywordsHeader) - @autosubmitted.stub!(:keys).and_return(autosubmitted) - + if !autosubmitted.nil? + @autosubmitted = TMail::UnstructuredHeader.new("auto-submitted", autosubmitted) + end @mail = mock(TMail::Mail) @mail.stub!(:from_addrs).and_return( [ @address ] ) @mail.stub!(:[]).with("return-path").and_return(@return_path) @@ -123,39 +151,39 @@ describe IncomingMessage, " checking validity to reply to" do end it "says a valid email is fine" do - test_email(true, "team@mysociety.org", nil, []) + test_email(true, "team@mysociety.org", nil) end it "says postmaster email is bad" do - test_email(false, "postmaster@mysociety.org", nil, []) + test_email(false, "postmaster@mysociety.org", nil) end it "says Mailer-Daemon email is bad" do - test_email(false, "Mailer-Daemon@mysociety.org", nil, []) + test_email(false, "Mailer-Daemon@mysociety.org", nil) end it "says case mangled MaIler-DaemOn email is bad" do - test_email(false, "MaIler-DaemOn@mysociety.org", nil, []) + test_email(false, "MaIler-DaemOn@mysociety.org", nil) end it "says Auto_Reply email is bad" do - test_email(false, "Auto_Reply@mysociety.org", nil, []) + test_email(false, "Auto_Reply@mysociety.org", nil) end it "says DoNotReply email is bad" do - test_email(false, "DoNotReply@tube.tfl.gov.uk", nil, []) + test_email(false, "DoNotReply@tube.tfl.gov.uk", nil) end it "says a filled-out return-path is fine" do - test_email(true, "team@mysociety.org", "Return-path: <foo@baz.com>", []) + test_email(true, "team@mysociety.org", "Return-path: <foo@baz.com>") end it "says an empty return-path is bad" do - test_email(false, "team@mysociety.org", "<>", []) + test_email(false, "team@mysociety.org", "<>") end it "says an auto-submitted keyword is bad" do - test_email(false, "team@mysociety.org", nil, ["auto-replied"]) + test_email(false, "team@mysociety.org", nil, "auto-replied") end end diff --git a/spec/script/handle-mail-replies_spec.rb b/spec/script/handle-mail-replies_spec.rb index eae0b516b..8ed83b31f 100644 --- a/spec/script/handle-mail-replies_spec.rb +++ b/spec/script/handle-mail-replies_spec.rb @@ -54,5 +54,15 @@ describe "When filtering" do r = mail_reply_test("track-response-messageclass-oof.email") r.status.should == 2 end + + it "should detect an Outlook(?)-style out-of-office" do + r = mail_reply_test("track-response-outlook-oof.email") + r.status.should == 2 + end + + it "should detect an ABCMail-style out-of-office" do + r = mail_reply_test("track-response-abcmail-oof.email") + r.status.should == 2 + end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 5c5cd9a7f..29ce6bca5 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -78,7 +78,6 @@ def load_file_fixture(file_name) end def rebuild_xapian_index(terms = true, values = true, texts = true, dropfirst = true) - parse_all_incoming_messages if dropfirst begin ActsAsXapian.readable_init @@ -86,7 +85,9 @@ def rebuild_xapian_index(terms = true, values = true, texts = true, dropfirst = rescue RuntimeError end ActsAsXapian.writable_init + ActsAsXapian.writable_db.close end + parse_all_incoming_messages verbose = false # safe_rebuild=true, which involves forking to avoid memory leaks, doesn't work well with rspec. # unsafe is significantly faster, and we can afford possible memory leaks while testing. @@ -96,7 +97,7 @@ end def update_xapian_index verbose = false - ActsAsXapian.update_index(flush_to_disk=true, verbose) + ActsAsXapian.update_index(flush_to_disk=false, verbose) end # Validate an entire HTML page |