Skip to content

Commit

Permalink
Merge branch 'ZMS-87' of github.com:nodemailer/wildduck into ZMS-87
Browse files Browse the repository at this point in the history
  • Loading branch information
NickOvt committed Oct 17, 2023
2 parents 9ba060c + 35f19d5 commit 77bbe9e
Show file tree
Hide file tree
Showing 26 changed files with 1,467 additions and 1,302 deletions.
57 changes: 0 additions & 57 deletions .github/workflows/docker.yml

This file was deleted.

51 changes: 50 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ permissions:

name: release
jobs:
release-please:
release_please:
runs-on: ubuntu-latest
outputs:
major: ${{ steps.release.outputs.major }}
minor: ${{ steps.release.outputs.minor }}
patch: ${{ steps.release.outputs.patch }}
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v3
id: release
Expand All @@ -35,3 +40,47 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}

publish_docker:
runs-on: ubuntu-latest
needs: release_please
if: ${{needs.release_please.outputs.release_created}}
steps:
- run: echo version v${{needs.release_please.outputs.major}}.${{needs.release_please.outputs.minor}}.${{needs.release_please.outputs.patch}}

- uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: 'arm64,arm'

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/arm64,linux/amd64,linux/arm/v7

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: ${{ steps.buildx.outputs.platforms }}
push: true
tags: |
${{ github.repository }}:${{needs.release_please.outputs.major}}.${{needs.release_please.outputs.minor}}.${{needs.release_please.outputs.patch}}
${{ github.repository }}:${{needs.release_please.outputs.major}}.${{needs.release_please.outputs.minor}}
${{ github.repository }}:${{needs.release_please.outputs.major}}
78 changes: 78 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,83 @@
# Changelog

## [1.40.9](https://github.com/nodemailer/wildduck/compare/v1.40.8...v1.40.9) (2023-10-09)


### Bug Fixes

* **deps:** Bumped nodemailer to force embedded images to content-disposition:inline ([1fee80e](https://github.com/nodemailer/wildduck/commit/1fee80eb30411e9dff73ee762f3528c1c61f9b96))

## [1.40.8](https://github.com/nodemailer/wildduck/compare/v1.40.7...v1.40.8) (2023-10-05)


### Bug Fixes

* **docker:** moved docker release workflow under release workflow ([2641c7e](https://github.com/nodemailer/wildduck/commit/2641c7e7be07fc174d2275a641c05c2da6caa48b))

## [1.40.7](https://github.com/nodemailer/wildduck/compare/v1.40.6...v1.40.7) (2023-10-05)


### Bug Fixes

* **docker:** moved docker release workflow under release workflow ([64be636](https://github.com/nodemailer/wildduck/commit/64be63686fa5a7fe291589b15121c2967801acd6))

## [1.40.6](https://github.com/nodemailer/wildduck/compare/v1.40.5...v1.40.6) (2023-10-05)


### Bug Fixes

* **docker:** moved docker release workflow under release workflow ([8db8d21](https://github.com/nodemailer/wildduck/commit/8db8d212850fdf42a4ae394eff99175e03c535b4))

## [1.40.5](https://github.com/nodemailer/wildduck/compare/v1.40.4...v1.40.5) (2023-10-05)


### Bug Fixes

* **docker:** moved docker release workflow under release workflow ([efbe0dd](https://github.com/nodemailer/wildduck/commit/efbe0dd67306d2c91d2f2737177526b6abaf730d))

## [1.40.4](https://github.com/nodemailer/wildduck/compare/v1.40.3...v1.40.4) (2023-10-05)


### Bug Fixes

* **package:** fixed breaking package lock file ([c008191](https://github.com/nodemailer/wildduck/commit/c0081919fe09dc88617bd80be85c6fe5dcfa05b7))

## [1.40.3](https://github.com/nodemailer/wildduck/compare/v1.40.2...v1.40.3) (2023-10-05)


### Bug Fixes

* **docker:** trying to get release building working ([761f5fa](https://github.com/nodemailer/wildduck/commit/761f5fa18d1260f8dcf5dbb2dcaab078c4d90aab))

## [1.40.2](https://github.com/nodemailer/wildduck/compare/v1.40.1...v1.40.2) (2023-10-05)


### Bug Fixes

* fixed typo validateSequnce > validateSequence (closes [#518](https://github.com/nodemailer/wildduck/issues/518)) ([#520](https://github.com/nodemailer/wildduck/issues/520)) ([8766ab9](https://github.com/nodemailer/wildduck/commit/8766ab9cf50c624d7f1f94ed7136d71387762449))
* **pop3:** run socket.destroy() if pop3 socket is not closed in 1.5s ([2de6c0b](https://github.com/nodemailer/wildduck/commit/2de6c0bc128424e97b53d98239738c9c1c362e0c))

## [1.40.1](https://github.com/nodemailer/wildduck/compare/v1.40.0...v1.40.1) (2023-10-04)


### Bug Fixes

* **debug:** replaced SIGPIPE with SIGHUP to generate snapshots ([7a30ed7](https://github.com/nodemailer/wildduck/commit/7a30ed7861166e92f63e9157f3b1719957cd8520))
* **sending:** Do not count sending limits twice ([#505](https://github.com/nodemailer/wildduck/issues/505)) ([b9349f6](https://github.com/nodemailer/wildduck/commit/b9349f6e8315873668d605e6567ced2d7b1c0c80))

## [1.40.0](https://github.com/nodemailer/wildduck/compare/v1.39.15...v1.40.0) (2023-09-28)


### Features

* **storage:** Added cid property to storage files ([#502](https://github.com/nodemailer/wildduck/issues/502)) ([80797ee](https://github.com/nodemailer/wildduck/commit/80797eebec9f11df3b63b52575609610aa8bfd0c))


### Bug Fixes

* **index:** removed unneeded related_attachments index ([81ec8ca](https://github.com/nodemailer/wildduck/commit/81ec8ca2f59f083c1ded6814ca98076e2e1ee44c))
* **test:** Added POST storage test ([#492](https://github.com/nodemailer/wildduck/issues/492)) ([1c17f5f](https://github.com/nodemailer/wildduck/commit/1c17f5fefc456e95a1f226ca826a273ca07336c4))

## [1.39.15](https://github.com/nodemailer/wildduck/compare/v1.39.14...v1.39.15) (2023-09-05)


Expand Down
8 changes: 8 additions & 0 deletions docs/api/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3452,6 +3452,14 @@ components:
contentType:
type: string
description: MIME type for the attachment file
contentDisposition:
type: string
description: Which Content-Disposition value to use
enum:
- inline
- attachment
example: attachment
default: null
cid:
type: string
description: Content-ID value if you want to reference to this attachment from HTML formatted message
Expand Down
2 changes: 1 addition & 1 deletion imap-core/lib/commands/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = {
return callback(new Error('Invalid mailbox argument for ' + cmd));
}

if (!imapTools.validateSequnce(range)) {
if (!imapTools.validateSequence(range)) {
return callback(new Error('Invalid sequence set for ' + cmd));
}

Expand Down
2 changes: 1 addition & 1 deletion imap-core/lib/commands/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ module.exports = {
// do not return actual error to user
return callback(null, {
response: 'NO',
code: 'TEMPFAIL'
code: err.code || 'TEMPFAIL'
});
}

Expand Down
2 changes: 1 addition & 1 deletion imap-core/lib/commands/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = {

let isUid = (command.command || '').toString().toUpperCase() === 'UID FETCH' ? true : false;
let range = (command.attributes[0] && command.attributes[0].value) || '';
if (!imapTools.validateSequnce(range)) {
if (!imapTools.validateSequence(range)) {
return callback(new Error('Invalid sequence set for ' + command.command));
}
let messages = imapTools.getMessageRange(this.selected.uidList, range, isUid);
Expand Down
2 changes: 1 addition & 1 deletion imap-core/lib/commands/move.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = {
return callback(new Error('Invalid mailbox argument for ' + cmd));
}

if (!imapTools.validateSequnce(range)) {
if (!imapTools.validateSequence(range)) {
return callback(new Error('Invalid sequence set for ' + cmd));
}

Expand Down
4 changes: 2 additions & 2 deletions imap-core/lib/commands/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function parseQueryTerms(terms, uidList) {

if (!termType) {
// try if it is a sequence set
if (imapTools.validateSequnce(term)) {
if (imapTools.validateSequence(term)) {
// resolve sequence list to an array of UID values
curTerm = ['uid', imapTools.getMessageRange(uidList, term, false)];
} else {
Expand All @@ -179,7 +179,7 @@ function parseQueryTerms(terms, uidList) {
if (termType[i] === 'expression') {
curTerm.push(getTerm(level + 1));
} else if (termType[i] === 'sequence') {
if (!imapTools.validateSequnce(terms[pos])) {
if (!imapTools.validateSequence(terms[pos])) {
throw new Error('Invalid sequence set for ' + term.toUpperCase());
}
// resolve sequence list to an array of UID values
Expand Down
2 changes: 1 addition & 1 deletion imap-core/lib/commands/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module.exports = {
silent = true;
}

if (!imapTools.validateSequnce(range)) {
if (!imapTools.validateSequence(range)) {
return callback(new Error('Invalid sequence set for STORE'));
}

Expand Down
2 changes: 1 addition & 1 deletion imap-core/lib/commands/uid-expunge.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
}

let range = (command.attributes[0] && command.attributes[0].value) || '';
if (!imapTools.validateSequnce(range)) {
if (!imapTools.validateSequence(range)) {
return callback(new Error('Invalid sequence set for UID EXPUNGE'));
}
let messages = imapTools.getMessageRange(this.selected.uidList, range, true);
Expand Down
2 changes: 1 addition & 1 deletion imap-core/lib/commands/uid-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ module.exports = {
silent = true;
}

if (!imapTools.validateSequnce(range)) {
if (!imapTools.validateSequence(range)) {
return callback(new Error('Invalid sequence set for UID STORE'));
}

Expand Down
3 changes: 3 additions & 0 deletions imap-core/lib/imap-connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ class IMAPConnection extends EventEmitter {
this._closing = false;
this._closed = false;

this._closingTimeout = null;

this.logger = {};
['info', 'debug', 'error'].forEach(level => {
this.logger[level] = (...args) => {
Expand Down Expand Up @@ -286,6 +288,7 @@ class IMAPConnection extends EventEmitter {

setImmediate(() => this._onClose());
}, 1500);
this._closingTimeout.unref();
}

this._closing = true;
Expand Down
2 changes: 1 addition & 1 deletion imap-core/lib/imap-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ module.exports.searchMapping = {
* @param {range} range Sequence range, eg "1,2,3:7"
* @returns {Boolean} True if the string looks like a sequence range
*/
module.exports.validateSequnce = function (range) {
module.exports.validateSequence = function (range) {
return !!(range.length && /^(\d+|\*)(:\d+|:\*)?(,(\d+|\*)(:\d+|:\*)?)*$/.test(range));
};

Expand Down
Loading

0 comments on commit 77bbe9e

Please sign in to comment.