Skip to content

Commit

Permalink
automated code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Dec 10, 2024
1 parent 7c549c5 commit 00b1c94
Show file tree
Hide file tree
Showing 12 changed files with 529 additions and 416 deletions.
8 changes: 4 additions & 4 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
engines:
eslint:
enabled: true
channel: "eslint-6"
channel: 'eslint-6'
config:
config: ".eslintrc.yaml"
config: '.eslintrc.yaml'

ratings:
paths:
- "**.js"
paths:
- '**.js'

checks:
return-statements:
Expand Down
3 changes: 0 additions & 3 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@ env:

extends:
- '@haraka'

rules:
indent: [2, 2, {"SwitchCase": 1}]
6 changes: 4 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Fixes #

Changes proposed in this pull request:
-
-

-
-

Checklist:

- [ ] docs updated
- [ ] tests updated
- [ ] Changes.md updated
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: CI

on: [ push, pull_request ]
on: [push, pull_request]

env:
CI: true

jobs:

lint:
uses: haraka/.github/.github/workflows/lint.yml@master

Expand All @@ -15,9 +14,9 @@ jobs:
# secrets: inherit

ubuntu:
needs: [ lint ]
needs: [lint]
uses: haraka/.github/.github/workflows/ubuntu.yml@master

windows:
needs: [ lint ]
needs: [lint]
uses: haraka/.github/.github/workflows/windows.yml@master
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]
schedule:
- cron: '18 7 * * 4'

Expand Down
2 changes: 2 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
singleQuote: true
semi: false
7 changes: 1 addition & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@

### Unreleased


### [1.0.5] - 2024-12-10

- populate [files] in package.json.
Expand All @@ -13,8 +11,7 @@
### [1.0.4] - 2023-12-12

- ci: publish updates, shared test actions
- doc(README): formatting

- doc(README): formatting

### [1.0.3] - 2022-06-05

Expand All @@ -25,14 +22,12 @@
- ci(codeclimate): relax some checks
- doc: fixes for config name


### 1.0.2 - 2020-08-22

- additional test
- updated test to newer JS standards
- don't call tests that aren't enabled in config (performance)


### 1.0.0 - 2020-07-28

- repackaged from Haraka
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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-headers/commits?author=msimerson">25</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-headers/commits?author=msimerson">25</a>) |
| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |

<sub>this file is maintained by [.release](https://github.com/msimerson/.release)</sub>
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@ $EDITOR config/headers.ini

The next two tests encompass the RFC 5322 checks:

## duplicate\_singular
## duplicate_singular

Assure that all the singular headers are present only once. The list of
headers can be adjusted in config/headers.ini:

* singular=Date,From,Sender,Reply-To,To,Cc,Bcc,Message-Id,In-Reply-To,References,Subject

## missing\_required
## missing_required

Assuring that all the required headers are present. The list of required
headers can be altered in config/headers.ini:

required=From,Date

## invalid\_return\_path
## invalid_return_path

Messages arriving via the internet should not have a Return-Path header set.
This checks for that header (unless connection.relaying is set).

## invalid\_date
## invalid_date

Checks the date header and makes sure it's somewhat sane. By default, the date
cannot be more than 2 days in the future nor 15 days in the past. These can be
Expand All @@ -59,25 +59,25 @@ date_future_days=2
date_past_days=15
```

## user\_agent
## user_agent

Attempt to determine the User-Agent that generated the email. A UA is
determinable on about 70% of hammy messages.

## direct\_to\_mx
## direct_to_mx

Counts the received headers. If there aren't at least two, then the MUA is
attempting direct delivery to us instead of via their outbound SMTP server.
This is typical of spam, our own users sending outbound email (which bypasses
this test), and machine generated messages like Facebook/Twitter
notifications.

## from\_match
## from_match

See if the header From domain matches the envelope FROM domain. There are many
legit reasons to not match, but matching domains are far more frequent in ham.

## mailing\_list
## mailing_list

Attempt to determine if this message was sent via an email list. This is very
rudimentary at present and only detects the most common email lists.
Expand All @@ -87,7 +87,7 @@ of the minority (~10%) of ham which fails SPF and DKIM tests. This MLM
detector is a building block in the ability to detect mail from forwarders
and assess their reputability.

## from\_phish
## from_phish

A common form of phishing is spamming the From display name with the domain name of the popular entity whose accounts they're phishing for. This tests the domains in the [phish_domains] configuration section. If that domains appears in the From header, it must also appear in the envelope sender address.

Expand Down Expand Up @@ -123,8 +123,8 @@ messages to be rejected:
missing_required=false
```


<!-- leave these buried at the bottom of the document -->

[ci-img]: https://github.com/haraka/haraka-plugin-headers/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/haraka/haraka-plugin-headers/actions/workflows/ci.yml
[clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-headers/badges/gpa.svg
Expand Down
Loading

0 comments on commit 00b1c94

Please sign in to comment.