From 33c5d284ef0962f3b4f00b453db4ba70fd4fedc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sun, 28 Jul 2024 19:17:18 +0200 Subject: [PATCH] Fix: typos (#415) --- CHANGELOG.md | 8 ++++---- README.md | 2 +- config/bounces.txt | 2 +- config/default.js | 2 +- lib/address-tools.js | 8 ++++---- lib/dkim-relaxed-body.js | 2 +- lib/mail-queue.js | 18 +++++++++--------- lib/queue-server.js | 2 +- lib/receiver/smtp-proxy.js | 2 +- lib/sender.js | 10 +++++----- lib/sending-zone.js | 2 +- lib/smtp-interface.js | 2 +- test/address-tools-test.js | 12 ++++++------ 13 files changed, 36 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef38b4fe..b1cdcded 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,7 +44,7 @@ * **api:** added endpoint to list locked domains ([25102ca](https://github.com/zone-eu/zone-mta/commit/25102ca71010951fb592c6d8bdb4852976a49c1e)) * **loop:** reject messages with too many Received headers ([cbffa6d](https://github.com/zone-eu/zone-mta/commit/cbffa6d3dcadb937b9303a42fbe2603fd1668fb8)) -* **mime-head:** Increased allowd MIME node header size to 2MB ([26e4896](https://github.com/zone-eu/zone-mta/commit/26e48967bd96e8aa08b1986513fe4733961bd672)) +* **mime-head:** Increased allowed MIME node header size to 2MB ([26e4896](https://github.com/zone-eu/zone-mta/commit/26e48967bd96e8aa08b1986513fe4733961bd672)) * **tls-options:** Retrieve ignoreTLS value from Sending Zone, or default to false ([#365](https://github.com/zone-eu/zone-mta/issues/365)) ([336e835](https://github.com/zone-eu/zone-mta/commit/336e8358be5992bd15392fc07064540fda4aa23d)) ## [3.9.0](https://github.com/zone-eu/zone-mta/compare/v3.8.0...v3.9.0) (2024-01-19) @@ -122,7 +122,7 @@ ### Bug Fixes * **deploy:** Set up auto publishing to NPM ([#338](https://github.com/zone-eu/zone-mta/issues/338)) ([b1d6fef](https://github.com/zone-eu/zone-mta/commit/b1d6fef8931a4e40042694414318d1dd5fda2914)) -* **tests:** Added Github action to run tests ([#341](https://github.com/zone-eu/zone-mta/issues/341)) ([908edf9](https://github.com/zone-eu/zone-mta/commit/908edf9321be5342426127d081997bde116ff23b)) +* **tests:** Added GitHub action to run tests ([#341](https://github.com/zone-eu/zone-mta/issues/341)) ([908edf9](https://github.com/zone-eu/zone-mta/commit/908edf9321be5342426127d081997bde116ff23b)) ## CHANGELOG @@ -193,7 +193,7 @@ - v2.3.2 2020-10-05 - - Do not categorize response codes like 550 automaticaly as "recipient" + - Do not categorize response codes like 550 automatically as "recipient" - v2.3.1 2020-09-24 @@ -280,7 +280,7 @@ - v1.10.4 2018-08-22 - - Fixed an issue with MX connection timeouts where a working MX exisits but never was tried + - Fixed an issue with MX connection timeouts where a working MX exists but never was tried - v1.10.2 2018-08-16 diff --git a/README.md b/README.md index 2720775e..75a18253 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,7 @@ If the message hard bounces (or after too many retries for soft bounces) a bounc ### Blacklist back-off -If the bounce occured because your sending IP is blacklisted then this IP gets disabled for that MX for the next 6 hours and message is retried from a different IP. You can also disable local IP addresses permanently for specific domains with `disabledAddresses` option. +If the bounce occurred because your sending IP is blacklisted then this IP gets disabled for that MX for the next 6 hours and message is retried from a different IP. You can also disable local IP addresses permanently for specific domains with `disabledAddresses` option. ### Error Recovery diff --git a/config/bounces.txt b/config/bounces.txt index adfb9913..e01f4a0d 100644 --- a/config/bounces.txt +++ b/config/bounces.txt @@ -42,7 +42,7 @@ ^550[ \-]+5\.7\.1\s+[\d\.]+ has been blocked,defer,blacklist,Sender IP blacklisted # 554 5.7.1 Service unavailable; Client host [1.2.3.4] blocked using ee.countries.nerd.dk; Your IP is in ee, rejected based on geographical location -# Should it reject immediatelly, as in most cases we have addresses from the same region? +# Should it reject immediately, as in most cases we have addresses from the same region? ^554[ \-]+5\.7\.1\s+.*rejected based on geographical location,defer,blacklist,Sender IP blacklisted by region # 421 4.7.1 Service unavailable; Client host [1.2.3.4] blocked using grey.rbl - Rechazo temporal, intentelo mas tarde por favor...Greylisting in action, please try again later diff --git a/config/default.js b/config/default.js index dae97faa..a2ea2afb 100644 --- a/config/default.js +++ b/config/default.js @@ -178,7 +178,7 @@ module.exports = { // is added to the envelope object, so you can also screen messages against some specific attachments. // This adds some CPU load as attachments need to be decoded and md5 hashes, // so increase smtpInterfaces.*.processes count to handle the increased load - // Example: 15872511b0d000c239 ATTACHMENT name="foto-02.jpg" type="image/jpeg" size=1922193 md5=6e0a1c5a2276f7afca68ec7ee4c3200c + // Example: 15872511b0d000c239 ATTACHMENT name="photo-02.jpg" type="image/jpeg" size=1922193 md5=6e0a1c5a2276f7afca68ec7ee4c3200c 'core/image-hashes': false, // 'receiver', // Sign outbound messages with DKIM diff --git a/lib/address-tools.js b/lib/address-tools.js index cb61c876..8017499d 100644 --- a/lib/address-tools.js +++ b/lib/address-tools.js @@ -7,7 +7,7 @@ let libmime = require('libmime'); module.exports = { convertAddresses, parseAddressList, - parseAddressses, + parseAddresses, normalizeDomain, normalizeAddress, flatten, @@ -29,7 +29,7 @@ function validateAddress(headers, key) { set() { let address = [].concat([...arguments]); let values = []; - parseAddressses([].concat(address || []), true).forEach(parsed => { + parseAddresses([].concat(address || []), true).forEach(parsed => { if (!parsed || !parsed.address) { return; } @@ -74,13 +74,13 @@ function convertAddresses(addresses, withNames, addressList) { } function parseAddressList(headers, key, withNames) { - return parseAddressses( + return parseAddresses( headers.getDecoded(key).map(header => header.value), withNames ); } -function parseAddressses(headerList, withNames) { +function parseAddresses(headerList, withNames) { let map = convertAddresses( headerList.map(address => { if (typeof address === 'string') { diff --git a/lib/dkim-relaxed-body.js b/lib/dkim-relaxed-body.js index 92bf7e42..62b9958c 100644 --- a/lib/dkim-relaxed-body.js +++ b/lib/dkim-relaxed-body.js @@ -32,7 +32,7 @@ class DkimRelaxedBody extends Transform { let c = chunk[i]; if (state === 'file' && (c === 0x0a || c === 0x0d)) { - // do nothing, found \n or \r at the end of chunk, stil end of file + // do nothing, found \n or \r at the end of chunk, still end of file } else if (state === 'file' && (c === 0x09 || c === 0x20)) { // switch to line ending mode, this is the last non-empty line state = 'line'; diff --git a/lib/mail-queue.js b/lib/mail-queue.js index 76ac6806..751ab514 100644 --- a/lib/mail-queue.js +++ b/lib/mail-queue.js @@ -589,7 +589,7 @@ class MailQueue { query.seq = seq; } - // every delete opration gets an unique ID, so if we fail, we can release locked deliveries + // every delete operation gets an unique ID, so if we fail, we can release locked deliveries let deleteId = 'delete:' + crypto.randomBytes(10).toString('base64'); let collection = this.mongodb.collection(this.options.collection); @@ -996,7 +996,7 @@ class MailQueue { _id: { $lte: releaseObjectId }, - // skip messages that are currenlty being processed + // skip messages that are currently being processed locked: false }, { @@ -1082,12 +1082,12 @@ class MailQueue { }); } - queuCounterUpdate() { - clearTimeout(this.queuCounterTimer); + queueCounterUpdate() { + clearTimeout(this.queueCounterTimer); let next = () => { - this.queuCounterTimer = setTimeout(() => this.queuCounterUpdate(), 10 * 1000); - this.queuCounterTimer.unref(); + this.queueCounterTimer = setTimeout(() => this.queueCounterUpdate(), 10 * 1000); + this.queueCounterTimer.unref(); }; // probably should find a better way than enumerating all cache keys @@ -1154,8 +1154,8 @@ class MailQueue { this.garbageTimer = setTimeout(() => this.checkGarbage(), 60 * 1000); this.garbageTimer.unref(); - this.queuCounterTimer = setTimeout(() => this.queuCounterUpdate(), 10 * 1000); - this.queuCounterTimer.unref(); + this.queueCounterTimer = setTimeout(() => this.queueCounterUpdate(), 10 * 1000); + this.queueCounterTimer.unref(); } /** @@ -1274,7 +1274,7 @@ class MailQueue { } /** - * Start periodic tasks (garbage colletion and retrieveing deferred elements) + * Start periodic tasks (garbage collection and retrieveing deferred elements) * * @param {Function} callback Run once everything is started */ diff --git a/lib/queue-server.js b/lib/queue-server.js index c4ca6fb1..016d9246 100644 --- a/lib/queue-server.js +++ b/lib/queue-server.js @@ -76,7 +76,7 @@ class QueueServer { }); client.onData = (data, next) => { - setImmediate(next); // release immediatelly + setImmediate(next); // release immediately if (!client) { // client already errored or closed diff --git a/lib/receiver/smtp-proxy.js b/lib/receiver/smtp-proxy.js index 66023efc..b51e9ba5 100644 --- a/lib/receiver/smtp-proxy.js +++ b/lib/receiver/smtp-proxy.js @@ -54,7 +54,7 @@ class SMTPProxy { child.on('close', (code, signal) => { this.children.delete(child); if (!this.closing) { - log.error('SMTP/' + this.name + '/' + pid, 'Reciver process %s for %s exited with %s', childId, this.name, code || signal); + log.error('SMTP/' + this.name + '/' + pid, 'Receiver process %s for %s exited with %s', childId, this.name, code || signal); // Respawn after 5 seconds setTimeout(() => this.spawnReceiver(), 5 * 1000).unref(); diff --git a/lib/sender.js b/lib/sender.js index ff5cb6a8..ab196f3d 100644 --- a/lib/sender.js +++ b/lib/sender.js @@ -254,10 +254,10 @@ class Sender extends EventEmitter { // prepare received header, we need this when sending out the message or when sending a bounce with // message headers contained. we do not modify the stored delivery object, only the current instance in memory - let recivedHeader = Buffer.from( + let receivedHeader = Buffer.from( this.zone.generateReceivedHeader(delivery, delivery.localHostname || (connection && connection.options.name) || os.hostname()) ); - delivery.headers.addFormatted('Received', recivedHeader, 0); + delivery.headers.addFormatted('Received', receivedHeader, 0); if (err) { return handleError(delivery, connection, err); @@ -344,12 +344,12 @@ class Sender extends EventEmitter { } if (config.dkim.enabled) { - // tro to sign the message, this would prepend a DKIM-Signature header to the message + // to to sign the message, this would prepend a DKIM-Signature header to the message this.signMessage(delivery); } let messageHeaders = delivery.headers.build(); - let messageSize = recivedHeader.length + messageHeaders.length + delivery.bodySize; // required for SIZE argument + let messageSize = receivedHeader.length + messageHeaders.length + delivery.bodySize; // required for SIZE argument let messageFetch = this.queue.retrieve(delivery.id); let messageHash = new StreamHash({ algo: 'md5' @@ -1216,7 +1216,7 @@ class Sender extends EventEmitter { } } - err.response = err.response || `Nework error: Error connecting to ${mx.host}. ${err.message}`; + err.response = err.response || `Network error: Error connecting to ${mx.host}. ${err.message}`; err.category = err.category || 'network'; err.logtrail = logtrail; if (typeof err.temporary !== 'boolean') { diff --git a/lib/sending-zone.js b/lib/sending-zone.js index 8638f087..21f6af99 100644 --- a/lib/sending-zone.js +++ b/lib/sending-zone.js @@ -457,7 +457,7 @@ class DomainConfig { // return clone return JSON.parse(JSON.stringify(this.defaults[key])); } - // return defualt value + // return default value return this.defaults[key]; } return this.domains.get(domain).get(key); diff --git a/lib/smtp-interface.js b/lib/smtp-interface.js index 5ea3e8e1..488a8505 100644 --- a/lib/smtp-interface.js +++ b/lib/smtp-interface.js @@ -142,7 +142,7 @@ class SMTPInterface { ca, cert, - // Socket timeout is set to 10 minutes. This is needed to give enought time + // Socket timeout is set to 10 minutes. This is needed to give enough time // for the server to process large recipients lists socketTimeout: this.options.socketTimeout || 10 * 60 * 1000, diff --git a/test/address-tools-test.js b/test/address-tools-test.js index c10040a2..41016e28 100644 --- a/test/address-tools-test.js +++ b/test/address-tools-test.js @@ -3,16 +3,16 @@ let addressTools = require('../lib/address-tools'); let Headers = require('mailsplit').Headers; -module.exports['#parseAddressses, no names'] = test => { - let parsed = addressTools.parseAddressses(['andris1@kreata.ee, , Andris3 ', 'Andris4 ']); +module.exports['#parseAddresses, no names'] = test => { + let parsed = addressTools.parseAddresses(['andris1@kreata.ee, , Andris3 ', 'Andris4 ']); test.deepEqual(['andris1@kreata.ee', 'andris2@kreata.ee', 'andris3@kreata.ee'], parsed); test.done(); }; -module.exports['#parseAddressses, with names'] = test => { - let parsed = addressTools.parseAddressses(['andris1@kreata.ee, , Andris3 ', 'Andris4 '], true); +module.exports['#parseAddresses, with names'] = test => { + let parsed = addressTools.parseAddresses(['andris1@kreata.ee, , Andris3 ', 'Andris4 '], true); test.deepEqual( [ @@ -35,8 +35,8 @@ module.exports['#parseAddressses, with names'] = test => { test.done(); }; -module.exports['#parseAddressses, group with names'] = test => { - let parsed = addressTools.parseAddressses( +module.exports['#parseAddresses, group with names'] = test => { + let parsed = addressTools.parseAddresses( ['andris1@kreata.ee, Disclosed:, Andris3 ;', 'Andris4 '], true );