Skip to content

Commit 9588411

Browse files
author
Paul Philion
committed
Adding test cases for unexpected data in processed emails. Fixed several related problems.
1 parent b56ac9d commit 9588411

File tree

4 files changed

+283
-1
lines changed

4 files changed

+283
-1
lines changed

data/message-err-4920.eml

Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
Delivered-To: [email protected]
2+
Received: by 2002:a05:7022:4429:b0:92:85c5:7253 with SMTP id ca41csp2630142dlb;
3+
Tue, 14 Jan 2025 13:35:00 -0800 (PST)
4+
X-Forwarded-Encrypted: i=4; AJvYcCXwRuIammkNV3niMRnEIRcNURqA9GPtJf/ELrddRO6X+020EKNZAu5JGE9lw1HfFEqylKom4lmL@seattlecommunitynetwork.org
5+
X-Received: by 2002:a05:6e02:3891:b0:3bc:be0f:edcd with SMTP id e9e14a558f8ab-3ce3a96da56mr178179355ab.11.1736890499992;
6+
Tue, 14 Jan 2025 13:34:59 -0800 (PST)
7+
ARC-Seal: i=3; a=rsa-sha256; t=1736890499; cv=pass;
8+
d=google.com; s=arc-20240605;
9+
b=UPtBiXRgimpsIpvW0P6Bif13YT88ph9FP+AwCcxgvbLWspTq7MBnxD2e2CDbnwjoOH
10+
lQmzOhB7SodWcNOUgRmVocwNinSiHc2ZGvklQ5+Vt/ACLAOgPuPS+8ETCpicnA9mUJnE
11+
BlMHrcSTZsWz5LrfPZVwyCZMgcIf7J7AeyuqrbnemumZhuG14jge9tWHL51nQYJ48/tt
12+
DH3ZF1J405AsBNEjb7RxEkkb9/36cqKYOFSx4PFnIpmWGw4TlkxPAjiSN7heJ2boDKNb
13+
IPltsZOgaWn1fe0K7tE3JErsodZ5i9h+HyLhmVLW5aRX0VbEEcj9K+qFVnREu+iuKwZH
14+
yEbg==
15+
ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
16+
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
17+
:dkim-signature;
18+
bh=swyKgzqdqz9HwmgVP6h6J4XQI75+ymXpMcyOMe7/YoU=;
19+
fh=zW6Qo2IutjJ5pvoObzKP2wTRNqZuHAbqzOrGul0I9Qs=;
20+
b=Ipz6+HSt3IL1XzV6nUPcqwejruO8KNxtNeen6WNpWMKkXW2iU/oUhXNkT/pcjXhaE0
21+
HtjH8i2+wyDD7QtPs/v0uLV2v0cVX0IgXBmt5UZcyRud93LuL6dQdHHuIMDg8wXXUPNl
22+
f9A42Q9dUAkl1uSQ6H6hA79pUVZ+7MX1StC3R6ULNVIHqXiDlg2ejTx9NJtRBYb3I5gx
23+
FWu4iOCWpiNWjmXrr3bA18MxLauE+V8yY43XNmgNVXAkJn35NTe2eW9xaZz+vqlX2SF3
24+
6iQ/b89YEUGjQSTbStlORTIy3QqEh8wIXDDPDSZjzPpDDBrL/T7B4CkRQLemkcJsP1No
25+
oMpQ==;
26+
dara=google.com
27+
ARC-Authentication-Results: i=3; mx.google.com;
28+
dkim=pass [email protected] header.s=Jan2024 header.b=E2E0pC0l;
29+
arc=pass (i=2 spf=pass spfdomain=uw.edu dkim=pass dkdomain=uw.edu dmarc=pass fromdomain=uw.edu);
30+
spf=pass (google.com: domain of [email protected] designates 209.85.220.69 as permitted sender) smtp.mailfrom=[email protected];
31+
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=uw.edu;
32+
33+
Return-Path: <[email protected]>
34+
Received: from mail-sor-f69.google.com (mail-sor-f69.google.com. [209.85.220.69])
35+
by mx.google.com with SMTPS id 8926c6da1cb9f-4ea1b6fda91sor4358694173.8.2025.01.14.13.34.59
36+
37+
(Google Transport Security);
38+
Tue, 14 Jan 2025 13:34:59 -0800 (PST)
39+
Received-SPF: pass (google.com: domain of [email protected] designates 209.85.220.69 as permitted sender) client-ip=209.85.220.69;
40+
Authentication-Results: mx.google.com;
41+
dkim=pass [email protected] header.s=Jan2024 header.b=E2E0pC0l;
42+
arc=pass (i=2 spf=pass spfdomain=uw.edu dkim=pass dkdomain=uw.edu dmarc=pass fromdomain=uw.edu);
43+
spf=pass (google.com: domain of [email protected] designates 209.85.220.69 as permitted sender) smtp.mailfrom=[email protected];
44+
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=uw.edu;
45+
46+
ARC-Seal: i=2; a=rsa-sha256; t=1736890499; cv=pass;
47+
d=google.com; s=arc-20240605;
48+
b=WGThuT6/7prGrbBOQWiFzeTgU4BcI0e49SxiOjeHuIcOAg9UCwJbkaYrJkim26QpzK
49+
RbucFX1bYfDgRJF7YJZSeOj1T3wAHo6jMQHb5wjXa+BCXk2OCqNcntP+4TtuTJkK7fFR
50+
zUUA0zCMJQFHgQB6a4hWwJaKuhbpyZ1Dx7XFATjsprzjyJh29B9gUU6sFfPIlXGnUL5s
51+
RbmsPXAv8rla74FuIoEIJ/1wMHpHwp96NGDp0ECOQ8s7GHz/oln4xvaCFMaIXm72LPrl
52+
z7Bql1YxClrppaGiafiSdsCVoVOPs5YSQw2vwcakGvk9BDt72K79fT5irtR5PR/BZe55
53+
ulTw==
54+
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
55+
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
56+
:dkim-signature;
57+
bh=swyKgzqdqz9HwmgVP6h6J4XQI75+ymXpMcyOMe7/YoU=;
58+
fh=zW6Qo2IutjJ5pvoObzKP2wTRNqZuHAbqzOrGul0I9Qs=;
59+
b=cYDoqDzDM+oDg286oiyklzAJClA6ZAj5mMs6IcrWuapO+BtgHljh11dE+IjNy5wNmp
60+
u+paBo+TbzIc5Tfn/GSpGyhHhWN/T7mUk8aH9Rf4ZdB0CZjwvZ0A/n5weAyer5/cTvMR
61+
vHWmsGpdxIm+w7fSMVFdLCRKCAoaX66E8hgCH52P5cZxOyIVq2GnQd5wTH/EkE0XGYGN
62+
xsB/XxHgQ9y8KXQuqG283ybKyoFNVoTmTZKBJ7DS5nfRgnbwDnsT9+KqwP51clU9lK4b
63+
qGdwGaXM+ieof5+M/1VjQQ542sa7ALkNndeihkV7vzybmowPY7ne6tQ3/v1TTLpb42MC
64+
6xLA==;
65+
dara=google.com
66+
ARC-Authentication-Results: i=2; mx.google.com;
67+
dkim=pass [email protected] header.s=Jan2024 header.b=E2E0pC0l;
68+
spf=pass (google.com: domain of [email protected] designates 205.220.165.146 as permitted sender) smtp.mailfrom=[email protected];
69+
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=uw.edu
70+
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
71+
d=1e100.net; s=20230601; t=1736890499; x=1737495299;
72+
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
73+
:dkim-signature:x-gm-message-state:from:to:cc:subject:date
74+
:message-id:reply-to;
75+
bh=swyKgzqdqz9HwmgVP6h6J4XQI75+ymXpMcyOMe7/YoU=;
76+
b=mbqQD+WyKcTPr/WxcXojx+GtIV+RI19avCoUPI4qv0mDZBKHKRFzcAYSDkRl2HXG+h
77+
D2h4NZeuodTXjsFVti325kw1cQc8r2PB1ufQzTk7PHUBi1Y7/o29Y+O4KECkZtotnajs
78+
X70Hxrxo95JGUPQIQTpX1F7JHQjy8vURK7pT91gTBkx1b5j4A9zXcc0GXG+X8MbLH3vS
79+
+C3tM0tbbIFROfo2XDd7uUBfVbNs4cq2NfifR7UQ7YLGJmE4m8XLaoLxpDqu1tgE8QKz
80+
mlY9AVCapKE5nsW1ykVu8KeNCFIfR4bf6tBHAm2U9xRFos3fAse7RKZWFp0xZ8Btfb7n
81+
SpCg==
82+
X-Forwarded-Encrypted: i=2; AJvYcCVKzwrpUexxmf4OkDFA67ci3JcaBTAJbV22UCLWNflTgVaG7RgT9xzGeheeblZc8opcIM6jrOTN@seattlecommunitynetwork.org
83+
X-Gm-Message-State: AOJu0YwZZcKGUqFITUqAlA0MZbNOChXGSOFZCrcnzbwlIowuoHawROMN
84+
Gfbv3hfF0qBVH6w+GluHc6b6PVUACbqO8Nxr1B/CwplFFPtTeUH89qYJCDst2IU72B1Lh0pGOmr
85+
tKKv8WbAAEaVbS4FNhY+/0tUkTxStQkzmaHx75apow9GD4/3hviysNsxuULW56ROWKuapU9iJrb
86+
MeQtWq3Kl4kZqhST/74tiBULgbkJ9GSPJsslbAs9Ch6UUptIZBrQaooivM+ZdakAfS28bd+QOdC
87+
al+eFD4O5A0/SB752x3k9wU+I6bI0gaU+P7ge8xIdeD0mUWVA99VhhJTMuuZzALBDrVvVxBiu/l
88+
IpTDRxi4jhM+0XZmxvvL
89+
X-Gm-Gg: ASbGncvfHnJ2YF8svEUPCzWQroWPrcUsnmpMwGmjIvXrbzHIC3SdiWyNnuls/IfoNaD
90+
mcoFkfCnY6nLKwjTfXNv0Ar+XP2YamsS5C96nG2+wuAl79p115vCjyxA2il0WkKYQHPHYnegKCZ
91+
NnqX2Xt9FkF+s0qTribZL3yELetaopknNI3Izvz9DkgGHV+0whMqb25XmdSh9H5akWlRZO3AR+W
92+
GM6JVI0VKnjbkuINzW6VU/hy3WFOJKi0kYs/V1gmlT42AAFierC/89VPnIWmvbHJg8j05w6znWr
93+
mSHY0mmusWvc9YTEyjE=
94+
X-Received: by 2002:a05:6602:6c06:b0:84f:5637:8dff with SMTP id ca18e2360f4ac-84f56378eacmr624065139f.4.1736890499230;
95+
Tue, 14 Jan 2025 13:34:59 -0800 (PST)
96+
X-Google-Smtp-Source: AGHT+IHotjHwWeR4RDDtO21Ll30hcxCBoKoU8Tqfq3i/vP3CqeCn0drqjJwQcPO4CeviBOX9v/zw
97+
X-Received: by 2002:a05:6602:6c06:b0:84f:5637:8dff with SMTP id ca18e2360f4ac-84f56378eacmr624058239f.4.1736890497696;
98+
Tue, 14 Jan 2025 13:34:57 -0800 (PST)
99+
ARC-Seal: i=1; a=rsa-sha256; t=1736890497; cv=none;
100+
d=google.com; s=arc-20240605;
101+
b=IQy+T51A4vjBlsOLBuRHkdQ6cXckHCHaKoojQM0DUYQUGmHQ44jYOFzMssmDsY+JO2
102+
kcZvoT49qPWe+ebUSBkL1IZKXXP3w9OH/jPuK1jQ7Znt9t9mMyW+gZQIgETg/sE8nbc4
103+
zctJmkSTsTAQFS7s1SFBkAu27x78lRbWfKfVp6Hg2gETBCeE4nKEtnaDo8Pj64BexhQ4
104+
HtZmSyGIoX/CITkS2gXjt3KXkIUjK2/o+V0u+9dJJbBMUBtgkIfqT9IaBLLESj4Uvv5U
105+
tFbjO1YKMEF6j6e0SX5KxbPO+eAV0sEl2rOqdf895fhkzQx5i9hJAwX9YasXtdnhaZQL
106+
uluA==
107+
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
108+
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
109+
:dkim-signature;
110+
bh=swyKgzqdqz9HwmgVP6h6J4XQI75+ymXpMcyOMe7/YoU=;
111+
fh=Q5SwwjqGjOm4fo1ypamq3b5lrDBlSs4UI+mH17nEIy4=;
112+
b=czTVYoKIr6ySUm/W+Ksy7SsNFU7M9v6Lyxo0ePOAeNqF1pHS7NdkUQqwWRLJSShkt/
113+
UKrj+jkq7K7G4ZKPQaFBHJcDyxve54lUUF1xiSpXLh0sL7Krl5592komjo7tqNZcvL3i
114+
AB+J7XAdbsLCKEgr5Qd1pKXStklCQ7twRrJnLJbKxesUTJAc9EXZJk+EyQZxbk7SdDhu
115+
ISw7BckubyN8bgZB5fpsJ2ii6hZjNwJkhpTR/PAVd5y/X6ezNsKn9FX/3oP/Pl683GRA
116+
K66GvAhv4g12aTZfVHDqauW1N1DCwXrmXzLOgRkYOC3ibhVPtPNXecLDg6q62pCAANNe
117+
8n8g==;
118+
dara=google.com
119+
ARC-Authentication-Results: i=1; mx.google.com;
120+
dkim=pass [email protected] header.s=Jan2024 header.b=E2E0pC0l;
121+
spf=pass (google.com: domain of [email protected] designates 205.220.165.146 as permitted sender) smtp.mailfrom=[email protected];
122+
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=uw.edu
123+
Return-Path: <[email protected]>
124+
Received: from mx0a-00641c01.pphosted.com (mx0a-00641c01.pphosted.com. [205.220.165.146])
125+
by mx.google.com with ESMTPS id ca18e2360f4ac-84d4fc3a393si725991339f.111.2025.01.14.13.34.57
126+
127+
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
128+
Tue, 14 Jan 2025 13:34:57 -0800 (PST)
129+
Received-SPF: pass (google.com: domain of [email protected] designates 205.220.165.146 as permitted sender) client-ip=205.220.165.146;
130+
Received: from pps.filterd (m0247470.ppops.net [127.0.0.1])
131+
by mx0a-00641c01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50ELPlsb016262
132+
for <[email protected]>; Tue, 14 Jan 2025 21:34:56 GMT
133+
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uw.edu; h=
134+
content-type:date:from:in-reply-to:message-id:mime-version
135+
:references:subject:to; s=Jan2024; bh=swyKgzqdqz9HwmgVP6h6J4XQI7
136+
5+ymXpMcyOMe7/YoU=; b=E2E0pC0l2l9DhHDtDKOxje5t2bPAl1Y7XwZAAgGTrh
137+
LVUnxyYD2/0HLONQpQHEfD9PaFzjpHqJIjTqnb/OITEAI9AhaOV1dLpy8cEaKaks
138+
FQGtqmGP7gCIPX6ud4yTWCbvSSgCk7P3OKZp8Iaxt2BGL3TPtWouS5WDdUk+SvSE
139+
J6KSpURXBpjClO8zF4OvjGh73BihZ4tLP45GOtCn9FZvC1h3Ue0wfVampyNdjEjB
140+
But0KfyJqGiByKeJ3P2IhK9Rix4l86nXMeR9IHH5iIlfsGyANAHwsdV9eYjbBtbY
141+
BGBw6oEtqNMWpe9FxBo3HhCj1ABq3ZkUrOiaKm9D5elg==
142+
Received: from mxout34.s.uw.edu (mxout34.s.uw.edu [34.106.112.35])
143+
by mx0a-00641c01.pphosted.com (PPS) with ESMTPS id 445xg8s11f-1
144+
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)
145+
for <[email protected]>; Tue, 14 Jan 2025 21:34:56 +0000 (GMT)
146+
Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72])
147+
by mxout34.s.uw.edu (8.16.1+UW24.12/8.14.4+UW24.02) with ESMTPS id 50ELYtat021011
148+
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL)
149+
for <[email protected]>; Tue, 14 Jan 2025 13:34:55 -0800
150+
Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-2f46b7851fcso16752941a91.1
151+
for <[email protected]>; Tue, 14 Jan 2025 13:34:55 -0800 (PST)
152+
X-Received: by 2002:a17:90b:538e:b0:2ee:c4f2:a76d with SMTP id 98e67ed59e1d1-2f548f59a46mr34973230a91.21.1736890494454;
153+
Tue, 14 Jan 2025 13:34:54 -0800 (PST)
154+
X-Received: by 2002:a17:90b:538e:b0:2ee:c4f2:a76d with SMTP id
155+
98e67ed59e1d1-2f548f59a46mr34973199a91.21.1736890493956; Tue, 14 Jan 2025
156+
13:34:53 -0800 (PST)
157+
MIME-Version: 1.0
158+
References: <CALQNrk4frL8rLVweE8cENK=[email protected]>
159+
<CAFcJ7OFxvt3XY_wYvVD1fLQMgdywO7MgSb18sobA3+5SW54eGw@mail.gmail.com>
160+
<CAFLhhJmpw8pq7hwFinFOnpzmqoxfNjMM-h+0Aa9mODQ6Wnc9gA@mail.gmail.com>
161+
<CAJw8T0t4XQGps1fJdE8efLdWoi0dDdm_B1ZcAbjHm8i27wiHeA@mail.gmail.com>
162+
<CADGmNtu3fo9kktHDWPnjsZ0VkNk5zPAZKpDSMhggmDK-bMLyeQ@mail.gmail.com>
163+
<CAFcJ7OEmHKcsCdqewQyrZ0r=[email protected]>
164+
<CAE4k5m_Oe=nEtUKgt-Smp=[email protected]>
165+
<CAFcJ7OGz9niO1u51Rby-x+G6edmH7HNDRrdT98kDQWk3HegXpg@mail.gmail.com>
166+
<CAJw8T0sGgsGgONuztWsjpysL+AS0LPk25BeMxpdc7SY2qOVzXQ@mail.gmail.com>
167+
<CALQNrk5nNN_rFbi038zvkTj_-HktWvvVrzRNYNX9sLo577Qasw@mail.gmail.com>
168+
<CAFLhhJ=DcfUjZ2hW6jbz6g04U9T_8W8Jpxb1J81Y2E=[email protected]> <CAFcJ7OFAGxVCaGwKXjgwMzY1oDePubgZ5FLHLZ=[email protected]>
169+
In-Reply-To: <CAFcJ7OFAGxVCaGwKXjgwMzY1oDePubgZ5FLHLZ=[email protected]>
170+
From: Vorpal George <[email protected]>
171+
Date: Tue, 14 Jan 2025 13:34:39 -0800
172+
X-Gm-Features: AbW1kvZdKJcOu3raMFn78dODub4x6305UpZ0VpO9uGQp-md7A9w6t5FcZbkLJ_c
173+
Message-ID: <CAFLhhJkNX-JGyULHGyCq12EEvN_DYW+MWdkOx=[email protected]>
174+
Subject: Re: Wi-Fi Extension for The Community Garden
175+
To: Abby Yabble <[email protected]>
176+
Content-Type: multipart/alternative; boundary="000000000000e807d2062bb154da"
177+
X-Proofpoint-ORIG-GUID: OML4g2FVCHbCIYFMf1tNaYS119tKMbYJ
178+
X-Proofpoint-GUID: OML4g2FVCHbCIYFMf1tNaYS119tKMbYJ
179+
X-Proofpoint-Virus-Version: vendor=baseguard
180+
engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34
181+
definitions=2025-01-14_07,2025-01-13_02,2024-11-22_01
182+
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501
183+
bulkscore=0 spamscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0
184+
malwarescore=0 phishscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0
185+
impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1
186+
engine=8.19.0-2411120000 definitions=main-2501140162
187+
X-Gm-Spam: 0
188+
X-Gm-Phishy: 0
189+
X-Gm-Original-To: [email protected]
190+
191+
--000000000000e807d2062bb154da
192+
Content-Type: text/plain; charset="UTF-8"
193+
Content-Transfer-Encoding: quoted-printable
194+
195+
Heya, just to confirm, do you think the 4 pack is sufficient for covering
196+
their whole space? I see that it's 1 router and 3 access point "satellites.=
197+
"
198+
199+
On Fri, Jan 10, 2025 at 3:35=E2=80=AFPM Abner Yabble <
200+
201+
202+
> Hi McKane,
203+
> The one that Vikram had originally linked in his email looks good to me.
204+
>
205+
> https://www.bestbuy.com/site/netgear-orbi-750-series-ax5200-tri-band-mesh=
206+
-wi-fi-6-system-4-pack-white/6577799.p?skuId=3D6577799
207+
> <https://urldefense.com/v3/__https://www.bestbuy.com/site/netgear-orbi-75=
208+
0-series-ax5200-tri-band-mesh-wi-fi-6-system-4-pack-white/6577799.p?skuId=
209+
=3D6577799__;!!K-Hz7m0Vt54!h5C4zvSgGLAELceKVIirMRAqlmBevEp9thQaBD_PgKN1zCQO=
210+
D23uF_NOFD8-sx_WQR-X_F8tC1wXyD2tcv6RrwA-IytfKoM$>
211+
> is no longer needed out front, maybe we can move it to chain it from one =
212+
of
213+
> the mesh routers in the back, to give the outside better service.
214+
> Thanks so much,
215+
> <https://urldefense.com/v3/__https://keybase.io/ayabble__;!!K-Hz7m0Vt54!=
216+
h5C4zvSgGLAELceKVIirMRAqlmBevEp9thQaBD_PgKN1zCQOD23uF_NOFD8-sx_WQR-X_F8tC1w=
217+
XyD2tcv6RrwA-mhVbC40$>
218+
> Seattle Community Network
219+
> <https://urldefense.com/v3/__https://seattlecommunitynetwork.org/__;!!K-H=
220+
z7m0Vt54!h5C4zvSgGLAELceKVIirMRAqlmBevEp9thQaBD_PgKN1zCQOD23uF_NOFD8-sx_WQR=
221+
-X_F8tC1wXyD2tcv6RrwA-Br7FP2Q$>
222+
> Join SCN on Discord
223+
> <https://urldefense.com/v3/__https://discord.gg/DYckq6hTy4__;!!K-Hz7m0Vt5=
224+
4!h5C4zvSgGLAELceKVIirMRAqlmBevEp9thQaBD_PgKN1zCQOD23uF_NOFD8-sx_WQR-X_F8tC=
225+
1wXyD2tcv6RrwA-2C7B-Cw$>
226+
> Note: I have flexible working hours, so my emails may come at unusual
227+
> times. Please do not feel obligated to respond outside of your usual hour=
228+
s.
229+
> Thank you!!
230+
>
231+
>
232+
> On Fri, Jan 10, 2025 at 11:28=E2=80=AFAM Vorpal George <[email protected]> =
233+
wrote:
234+
>
235+
>> Awesome, so on our side it seems like we can indeed fund the Orbi mesh A=
236+
P
237+
>> set through the NSF grant. It would probably be best to pay for it with
238+
>> grant funds directly, so Esther, could you share a link to the set you
239+
>> think would be best for TSTF? Once I have that I can put the order in wi=
240+
th
241+
>> our department's finance team, and then once we know the delivery date w=
242+
e
243+
>> can figure out an installation date.
244+
>>
245+
>> Best,
246+
>> McKane

docs/devlog.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Netbot Development Log
22

3+
## 2025-01-30
4+
5+
When deploying the lastest, found a problem with certain emails. The regex used to strip Fordarded emails contains the "match everything" wildcard. Except `.*` does not match new-lines.
6+
7+
If an email address is too long in some email systems, it will wrap in the email address: `Name <` **\n** `[email protected]>`. This breaks the regex used to parse replies.
8+
9+
Added test cases and data to reproduce. Fixed the problem by adding `re.DOTALL` and `re.IGNORECASE` flags to the regex in `imap.strip_forwards()`:
10+
11+
p = re.compile(r"^On .* <.*>\s+wrote:", flags=re.MULTILINE|re.DOTALL|re.IGNORECASE)
12+
13+
The ignore-case flag is perhaps overkill, but catching that "On ... wrote" is the most robust way to capture the forwards.
14+
315
## 2025-01-23
416

517
Ticket #1506: Stakeholder has identified need to add `tracker` field to incomming emails, so that tickets

tests/test_imap.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class TestMessages(test_utils.RedmineTestCase):
2323
def setUp(self):
2424
self.imap: imap.Client = imap.Client()
2525

26+
2627
def test_messages_stripping(self):
2728
# open
2829
for filename in glob.glob('data/*.eml'):
@@ -32,6 +33,7 @@ def test_messages_stripping(self):
3233
self.assertNotIn("wrote:", message.note, f"Found 'wrote:' after processing {filename}")
3334
self.assertNotIn("https://voice.google.com", message.note)
3435

36+
3537
def test_google_stripping(self):
3638
with open("data/New text message from 5551212.eml", 'rb') as file:
3739
message = self.imap.parse_message(file.read())
@@ -265,3 +267,25 @@ def test_known_user(self):
265267

266268
# remove the ticket
267269
self.redmine.ticket_mgr.remove(tickets[0].id)
270+
271+
272+
def test_strip_forwards(self):
273+
with open("data/message-err-4920.eml", 'rb') as file:
274+
message = self.imap.parse_message(file.read())
275+
for line in message.note.splitlines():
276+
self.assertFalse(line.strip().startswith(">"), "found a line that starts with '>'")
277+
278+
279+
def test_err_4920(self):
280+
with open("data/message-err-4920.eml", 'rb') as file:
281+
message = self.imap.parse_message(file.read())
282+
283+
self.assertEqual(message.from_address, "Vorpal George <[email protected]>")
284+
285+
# handle the message
286+
self.imap.handle_message(unittest.TestCase.id(self), message)
287+
288+
tickets = self.redmine.ticket_mgr.match_subject(message.subject)
289+
self.assertEqual(1, len(tickets))
290+
self.assertEqual(message.subject, tickets[0].subject)
291+
#self.assertEqual(user.id, tickets[0].author.id)

threader/imap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def strip_forwards(self, text:str) -> str:
150150
text = text[0:idx]
151151

152152
# search for "On ... wrote:"
153-
p = re.compile(r"^On .* <.*>\s+wrote:", flags=re.MULTILINE)
153+
p = re.compile(r"^On .* <.*>\s+wrote:", flags=re.MULTILINE|re.DOTALL|re.IGNORECASE)
154154
match = p.search(text)
155155
if match:
156156
text = text[0:match.start()]

0 commit comments

Comments
 (0)