Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Apr 10, 2024
1 parent 9b31095 commit 381559d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
5 changes: 2 additions & 3 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

# Contributors

This handcrafted artisinal software is brought to you by:

| <img height="80" src="https://avatars.githubusercontent.com/u/261635?v=4"><br><a href="https://github.com/msimerson">msimerson</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=msimerson">5</a>)| <img height="80" src="https://avatars.githubusercontent.com/u/203240?v=4"><br><a href="https://github.com/lnedry">lnedry</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=lnedry">1</a>)|
| :---: | :---: |
| <img height="80" src="https://avatars.githubusercontent.com/u/261635?v=4"><br><a href="https://github.com/msimerson">msimerson</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=msimerson">5</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/203240?v=4"><br><a href="https://github.com/lnedry">lnedry</a> (<a href="https://github.com/haraka/haraka-plugin-access/commits?author=lnedry">1</a>) |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |

<sub>this file is maintained by [.release](https://github.com/msimerson/.release)</sub>
13 changes: 8 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// dns-lists plugin

const dnsPromises = require('dns').promises;
const dns = new dnsPromises.Resolver({timeout: 25000, tries: 1});
const dnsPromises = require('dns').promises
const dns = new dnsPromises.Resolver({ timeout: 25000, tries: 1 })
const net = require('net')
const net_utils = require('haraka-net-utils')

Expand All @@ -17,7 +17,7 @@ exports.register = function () {
this.register_hook('connect', 'onConnect')

// IMPORTANT: don't run this on hook_rcpt otherwise we're an open relay...
for (const hook of [ 'ehlo', 'helo', 'mail' ]) {
for (const hook of ['ehlo', 'helo', 'mail']) {
this.register_hook(hook, 'check_dnswl')
}
}
Expand Down Expand Up @@ -67,12 +67,15 @@ exports.should_skip = function (connection) {
if (!connection) return true

if (connection.remote.is_private) {
connection.results.add(this, { skip: `private: ${connection.remote.ip}`, emit: true})
connection.results.add(this, {
skip: `private: ${connection.remote.ip}`,
emit: true,
})
return true
}

if (this.zones.length === 0) {
connection.results.add(this, { err: `no zones`})
connection.results.add(this, { err: `no zones` })
return true
}

Expand Down

0 comments on commit 381559d

Please sign in to comment.