Skip to content

Commit 34d5889

Browse files
committed
fix(search): Prefer WITHIN extension and YOUNGER/OLDER for SINCE/BEFORE searches
1 parent b2d7063 commit 34d5889

File tree

8 files changed

+108
-117
lines changed

8 files changed

+108
-117
lines changed

data/google-crawlers.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"creationTime": "2025-07-04T14:46:02.000000",
2+
"creationTime": "2025-07-09T14:45:58.000000",
33
"prefixes": [
44
{
55
"ipv6Prefix": "2001:4860:4801:2008::/64"

lib/autodetect-imap-settings.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ async function processAutoconfigFile(email, domain, text, source) {
136136
let smtp = false;
137137

138138
if (incomingServer) {
139+
const firstHostname = incomingServer.hostname.filter(entry => entry).shift();
140+
const processedHostname = firstHostname ? firstHostname.replace(/^%EMAILDOMAIN%$/, domain) : undefined;
141+
139142
imap = {
140-
host: incomingServer.hostname
141-
.filter(entry => entry)
142-
.shift()
143-
?.replace(/^%EMAILDOMAIN%$/, domain),
143+
host: processedHostname,
144144
port: Number(incomingServer.port.filter(entry => entry).shift()),
145145
secure: incomingServer.sockettype.filter(entry => entry).shift() === 'SSL'
146146
};
@@ -156,11 +156,11 @@ async function processAutoconfigFile(email, domain, text, source) {
156156
}
157157

158158
if (outgoingServer) {
159+
const firstHostname = outgoingServer.hostname.filter(entry => entry).shift();
160+
const processedHostname = firstHostname ? firstHostname.replace(/^%EMAILDOMAIN%$/, domain) : undefined;
161+
159162
smtp = {
160-
host: outgoingServer.hostname
161-
.filter(entry => entry)
162-
.shift()
163-
?.replace(/^%EMAILDOMAIN%$/, domain),
163+
host: processedHostname,
164164
port: Number(outgoingServer.port.filter(entry => entry).shift()),
165165
secure: outgoingServer.sockettype.filter(entry => entry).shift() === 'SSL'
166166
};
@@ -339,11 +339,12 @@ async function resolveUsingMX(email, domain, gt) {
339339
throw new Error('No MX record found for domain');
340340
}
341341

342-
let exchange = srvList
343-
.sort((a, b) => a.priority - b.priority)
344-
.shift()
345-
?.exchange?.trim()
346-
.toLowerCase();
342+
let exchange;
343+
const firstItem = srvList.sort((a, b) => a.priority - b.priority).shift();
344+
345+
if (firstItem && firstItem.exchange) {
346+
exchange = firstItem.exchange.trim().toLowerCase();
347+
}
347348

348349
let resolveConfig = async () => {
349350
// look for some well known MX servers

package-lock.json

Lines changed: 27 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@
6161
"@postalsys/templates": "2.0.0",
6262
"ace-builds": "1.43.1",
6363
"base32.js": "0.1.0",
64-
"bullmq": "5.56.1",
64+
"bullmq": "5.56.3",
6565
"compare-versions": "6.1.1",
66-
"dotenv": "17.0.1",
66+
"dotenv": "17.2.0",
6767
"encoding-japanese": "2.2.0",
6868
"exponential-backoff": "3.1.2",
6969
"gettext-parser": "7.0.1",
@@ -75,7 +75,7 @@
7575
"html-to-text": "9.0.5",
7676
"ical.js": "1.5.0",
7777
"iconv-lite": "0.6.3",
78-
"imapflow": "1.0.189",
78+
"imapflow": "1.0.190",
7979
"ioredfour": "1.3.0-ioredis-07",
8080
"ioredis": "5.6.1",
8181
"ipaddr.js": "2.2.0",
@@ -124,7 +124,7 @@
124124
"pino-pretty": "13.0.0",
125125
"resedit": "2.0.3",
126126
"spdx-satisfies": "6.0.0",
127-
"supertest": "7.1.1",
127+
"supertest": "7.1.3",
128128
"xgettext-template": "5.0.0"
129129
},
130130
"engines": {

sbom.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

static/licenses.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!doctype html><html><head><meta charset="utf-8"><title>EmailEngine Licenses</title><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous"></head><body>
22
<div class="container-fluid">
3-
<h1>EmailEngine v2.53.1</h1><p>EmailEngine includes code from the following software packages:</p>
3+
<h1>EmailEngine v2.53.2</h1><p>EmailEngine includes code from the following software packages:</p>
44
<table class="table table-sm">
55
<tr><thead class="thead-dark"><th>Package</th><th>Version</th><th>License</th><th>Publisher</th><th>Publisher's Email</th><th>Package URL</th></tr>
66
<tbody>
@@ -1116,7 +1116,7 @@ <h1>EmailEngine v2.53.1</h1><p>EmailEngine includes code from the following soft
11161116
</tr>
11171117
<tr>
11181118
<td><a href="https://npmjs.com/package/agent-base">agent-base</a></td>
1119-
<td>7.1.3</td>
1119+
<td>7.1.4</td>
11201120
<td>MIT</td>
11211121
<td>Nathan Rajlich</td>
11221122
<td>nathan@tootallnate.net</td>
@@ -1416,7 +1416,7 @@ <h1>EmailEngine v2.53.1</h1><p>EmailEngine includes code from the following soft
14161416
</tr>
14171417
<tr>
14181418
<td><a href="https://npmjs.com/package/bullmq">bullmq</a></td>
1419-
<td>5.56.1</td>
1419+
<td>5.56.3</td>
14201420
<td>MIT</td>
14211421
<td>Taskforce.sh Inc.</td>
14221422
<td></td>
@@ -2086,7 +2086,7 @@ <h1>EmailEngine v2.53.1</h1><p>EmailEngine includes code from the following soft
20862086
</tr>
20872087
<tr>
20882088
<td><a href="https://npmjs.com/package/dotenv">dotenv</a></td>
2089-
<td>17.0.1</td>
2089+
<td>17.2.0</td>
20902090
<td>BSD-2-Clause</td>
20912091
<td></td>
20922092
<td></td>
@@ -3365,7 +3365,7 @@ <h1>EmailEngine v2.53.1</h1><p>EmailEngine includes code from the following soft
33653365
</tr>
33663366
<tr>
33673367
<td><a href="https://npmjs.com/package/imapflow">imapflow</a></td>
3368-
<td>1.0.189</td>
3368+
<td>1.0.190</td>
33693369
<td>MIT</td>
33703370
<td>Postal Systems O&#xDC;</td>
33713371
<td></td>
@@ -4045,7 +4045,7 @@ <h1>EmailEngine v2.53.1</h1><p>EmailEngine includes code from the following soft
40454045
</tr>
40464046
<tr>
40474047
<td><a href="https://npmjs.com/package/luxon">luxon</a></td>
4048-
<td>3.6.1</td>
4048+
<td>3.7.1</td>
40494049
<td>MIT</td>
40504050
<td>Isaac Cambron</td>
40514051
<td></td>
@@ -5835,7 +5835,7 @@ <h1>EmailEngine v2.53.1</h1><p>EmailEngine includes code from the following soft
58355835
</tr>
58365836
<tr>
58375837
<td><a href="https://npmjs.com/package/superagent">superagent</a></td>
5838-
<td>10.2.1</td>
5838+
<td>10.2.2</td>
58395839
<td>MIT</td>
58405840
<td>TJ Holowaychuk</td>
58415841
<td>tj@vision-media.ca</td>
@@ -5845,7 +5845,7 @@ <h1>EmailEngine v2.53.1</h1><p>EmailEngine includes code from the following soft
58455845
</tr>
58465846
<tr>
58475847
<td><a href="https://npmjs.com/package/supertest">supertest</a></td>
5848-
<td>7.1.1</td>
5848+
<td>7.1.3</td>
58495849
<td>MIT</td>
58505850
<td>TJ Holowaychuk</td>
58515851
<td></td>

0 commit comments

Comments
 (0)