Skip to content

Commit

Permalink
feat: implemented ARC
Browse files Browse the repository at this point in the history
  • Loading branch information
niftylettuce committed Aug 6, 2020
1 parent 6b9c849 commit 4c2092c
Show file tree
Hide file tree
Showing 8 changed files with 588 additions and 2,585 deletions.
2 changes: 1 addition & 1 deletion .env.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ CERTBOT_WELL_KNOWN_NAME=
CERTBOT_WELL_KNOWN_CONTENTS=
SMTP_RATELIMIT_DURATION=3600000
SMTP_RATELIMIT_MAX=300
VANITY_DOMAINS=secret.fyi,hash.fyi,mailsire.com,hideaddress.net
API_ENDPOINT=https://api.forwardemail.net
API_SECRETS=secret,
SRS_SECRET=
Expand All @@ -34,3 +33,4 @@ SHOW_STACK=true
SHOW_META=true
MESSAGE_ID_DOMAIN=forwardemail.net
SLACK_API_TOKEN=
ARC_DOMAIN=forwardemail.net
1 change: 0 additions & 1 deletion .env.schema
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ CERTBOT_WELL_KNOWN_NAME=
CERTBOT_WELL_KNOWN_CONTENTS=
SMTP_RATELIMIT_DURATION=
SMTP_RATELIMIT_MAX=
VANITY_DOMAINS=
API_ENDPOINT=
API_SECRETS=
SRS_SECRET=
Expand Down
17 changes: 11 additions & 6 deletions SELF-HOSTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,18 @@ You'll also need the following dependencies installed:
"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCojharU7eJW+eaLulQygsc/AHx2A0gyLnSU2fPGs8mI3Fhs3EVIIRP01euHg+IljMmXz9YtU+XMfZuYdSCa9NY16XjoIgub2+lkeiHHNpURIpwQJSeHxviMOfMAZ5/xSTDDoaYY2vcKytheZeLAVK2V1SuTdTp+C6B9E6AUSu1TwIDAQAB"
```

* [python-spfcheck2][] - for validation of SPF records, see [its requirements][python-spfcheck2] for more information
* Python v3.6+ with the following additional pip3 dependencies installed:

* [python-dkim-verify][] - for validation of DKIM signatures, see [its requirements][python-dkim-verify] for more information
```sh
sudo apt-get update
sudo apt purge python2.7-minimal
sudo apt-get install python3 python3-pip python3-setuptools
pip3 install --upgrade pip setuptools wheel
pip3 install dkimpy authres
pip3 install git+https://github.com/forwardemail/authentication-headers.git
pip3 install pyspf
pip3 install dnspython==1.16.0
```

* DNS records - you need to setup and modify your DNS records with your own self-hosted version. See our [FAQ](https://forwardemail.net/faq) for more information (be sure to replace `forwardemail.net` in the FAQ instructions with your own domain - and make sure you do DNS lookups for all related subdomains such as `mx1.forwardemail.net`, `mx2.forwardemail.net`, and `spf.forwardemail.net` – and clone them with your own). We recommend using Cloudflare or Amazon Route 53 for DNS hosting.

Expand Down Expand Up @@ -182,10 +191,6 @@ See the [app.js](app.js) and [ecosystem.json](ecosystem.json) files for more ins

[openssl]: https://www.openssl.org/

[python-spfcheck2]: https://github.com/niftylettuce/python-spfcheck2#requirements

[python-dkim-verify]: https://github.com/niftylettuce/python-dkim-verify#requirements

[do-guide]: https://www.digitalocean.com/community/questions/how-do-i-switch-my-dns-resolvers-away-from-google

[tr-guide]: https://www.techrepublic.com/article/how-to-set-dns-nameservers-in-ubuntu-server-18-04/
4 changes: 2 additions & 2 deletions helpers/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ if (env.SLACK_API_TOKEN) {

axe.setCallback(async (level, message, meta) => {
try {
// if meta did not have `slack: true` or not fatal
if (!meta.slack && !['fatal'].includes(level)) return;
// if meta did not have `slack: true` or not a specific level
if (!meta.slack && !['fatal', 'error'].includes(level)) return;

// otherwise post a message to the slack channel
const fields = [
Expand Down

0 comments on commit 4c2092c

Please sign in to comment.