spamscanner 7.0.14 → 7.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,7 +44,8 @@ export function extensionOf(name: any): any;
44
44
  * - rtl_override: a right-to-left override hides the real extension (a file named "invoice", U+202E, "fdp.exe" shows as "invoiceexe.pdf")
45
45
  * - risky_attachment: a type that is risky by name but not a program
46
46
  * (a certificate, an Internet shortcut, a theme; see RISKY_EXTENSIONS)
47
- * - executable_in_archive: a ZIP holds a program, read without unpacking
47
+ * - executable_in_archive: a ZIP holds a program, read without unpacking, or
48
+ * a file compressed on its own is named after one ("invoice.exe.gz")
48
49
  * (extension: the first program's, extensions: every program's)
49
50
  * - script_in_archive: a ZIP holds scripts (JavaScript, Python, shell, Perl)
50
51
  * but no other programs
@@ -30,6 +30,20 @@ export function isAttachedMessage(attachment: {
30
30
  contentType?: string;
31
31
  filename?: string;
32
32
  }): boolean;
33
+ /**
34
+ * A parsed message's plain text and HTML parts named as files (by a file name
35
+ * or a name), and the files uuencoded or yEncoded into its text, which mail
36
+ * programs list as attachments while mailparser reads them as the body, as attachments without content: {filename, contentType,
37
+ * content: null}. Only those inspecting by name finds a kind of finding in
38
+ * that none before them did (see addFinding).
39
+ * @param {object} mail - as simpleParse parsed it
40
+ * @returns {Array<{filename: string, contentType: string, content: null}>}
41
+ */
42
+ export function namedTextParts(mail: object): Array<{
43
+ filename: string;
44
+ contentType: string;
45
+ content: null;
46
+ }>;
33
47
  /**
34
48
  * The simpleParser of mailparser on a message it can finish (see finishable),
35
49
  * settled within `timeout`: a parse that has not settled by then is stopped
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "spamscanner",
3
3
  "description": "Spam, phishing and malware filter for email in any language: a trainable classifier, link and attachment checks, SPF/DKIM/DMARC, and an optional AI second opinion from any LLM, including local Ollama models. Works as a library, CLI, Postfix milter or HTTP API.",
4
- "version": "7.0.14",
4
+ "version": "7.0.15",
5
5
  "author": "Forward Email (https://forwardemail.net)",
6
6
  "bin": {
7
7
  "spamscanner": "./dist/esm/cli.js"