Skip to content

Commit

Permalink
Release v1.2.0 (#15)
Browse files Browse the repository at this point in the history
- fix: previously, would set next_hop=lmtp w/o setting q.wants=lmtp
- feat: also route via LMTP for local recipients when relaying
- cfg: rename check_outbound -> check_mail_from
- cfg: declare check_mail_from as boolean
- doc: added queue.wants & next_hop
- chore: much refactoring to simplify do_qmd_response
- chore: replace url.parse with new url.URL()
- chore: added many tests
  • Loading branch information
msimerson authored Jun 13, 2023
1 parent 1370e24 commit e5a5dd9
Show file tree
Hide file tree
Showing 6 changed files with 371 additions and 224 deletions.
13 changes: 13 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
### Unreleased


### [1.2.0] - 2023-06-12

- previously, would set next_hop=lmtp w/o setting q.wants=lmtp
- feat: also route via LMTP for local recipients when relaying
- cfg: rename check_outbound -> check_mail_from
- cfg: declare check_mail_from as boolean
- doc: added queue.wants & next_hop
- chore: much refactoring to simplify do_qmd_response
- chore: replace url.parse with new url.URL()
- chore: added many tests


### [1.1.1] - 2022-11-29

- ci: only publish when package.json has changes
Expand Down Expand Up @@ -52,3 +64,4 @@

[1.1.0]: https://github.com/haraka/haraka-plugin-qmail-deliverable/releases/tag/1.1.0
[1.1.1]: https://github.com/haraka/haraka-plugin-qmail-deliverable/releases/tag/1.1.1
[1.2.0]: https://github.com/haraka/haraka-plugin-qmail-deliverable/releases/tag/1.2.0
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,36 @@

A client for checking the deliverability of an email address against the [qmail-deliverabled](http://search.cpan.org/dist/Qmail-Deliverable/) daemon.

On incoming messages (relaying=false), the RCPT TO address is validated.

On outgoing messages (relaying=true) the MAIL FROM address is validated when
the `check\_outbound` option is enabled.
On incoming messages (relaying=false), validate the RCPT TO address.

## Configuration

The host and port that qmail-deliverabled is listening on can be set by
altering the contents of `config/rcpt_to.qmail_deliverable.ini`
altering the contents of `config/qmail-deliverable.ini`

* `host` (Default: localhost)

* `port` (Default: 8998)

* `check_outbound`=true
* `check_mail_from`= (Default: true)

When `check_mail_from` is enabled, the MAIL FROM address is checked for deliverability. The deliverable status can be inspected by checking `transaction.notes.local_sender`.

MX routing for individual domains can be set by defining `queue` and `next_hop`.

* `queue`: a queue plugin (smtp_forward, qmail-queue), or lmtp. When `queue=lmtp`, if qmail-deliverable reports that the destination address is a mailbox (ie, not email list, forward, alias, etc.), then this plugin will configure the next_hop to be `lmtp://$host/` and will set up that route (via get_mx) so that outbound delivers the message to the mailbox via LMTP.

* `next_hop`: a URL. Examples: `smtp://mx.example.com` and `lmtp://int.mx.example.com:24`

When `check_outbound` is enabled, and a connection has relay privileges, the
MAIL FROM address is validated as deliverable.

## Per-domain Configuration

Additionally, domains can each have their own configuration for connecting
to qmail-deliverabled. The defaults are the same, so only the differences
Domains can have their own configuration. The defaults are the same, so only the differences
needs to be declared. Example:

[example.com]
host=192.168.0.1

[example2.com]
host=192.168.0.2

Expand All @@ -45,4 +47,3 @@ needs to be declared. Example:
[clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-qmail-deliverable
[npm-img]: https://nodei.co/npm/haraka-plugin-qmail-deliverable.png
[npm-url]: https://www.npmjs.com/package/haraka-plugin-qmail-deliverable
rcpt\_to.qmail\_deliverable
9 changes: 4 additions & 5 deletions config/qmail-deliverable.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

; When set to true, and a connection has relay privileges, verify that the
; MAIL FROM address is deliverable.
check_outbound=true
; Check that the MAIL FROM address is deliverable.
check_mail_from=true

; the IP address of the host running qmail_deliverable
; default: host=127.0.0.1
Expand All @@ -11,15 +10,15 @@ host=127.0.0.1
port=8998

; if mail is delivered to a host other than the qmd host (above)
; set it here in URI format
; set it here as a URI
; next_hop=smtp://user:pass@[::127.0.0.35]:2500
; next_hop=lmtp://user:[email protected]:24
; next_hop=lmtp://10.0.5.6

; By default, relaying messages are delivered to outbound. Inbound are queued
; by the first queue plugin enabled. With this option, a specific queue
; can be specified for inbound recipients validated by qmd.
; queue=[ outbound, smtp_forward, qmail-queue ]
; queue=[ lmtp, outbound, smtp_forward, qmail-queue ]

;[example.com]
;host=127.0.0.10
Expand Down
Loading

0 comments on commit e5a5dd9

Please sign in to comment.