oneuptime/Haraka
Simon Larsen c470abf36c
feat: Add host_list.ini configuration file and update email_parser.js plugin
The code changes include adding a new configuration file `host_list.ini` to the Haraka config directory. This file will be used to store a list of allowed hosts for incoming emails. Additionally, the `email_parser.js` plugin file has been moved to the correct directory in the Haraka config. This update ensures that the email parsing functionality is properly configured and the list of allowed hosts is maintained.
2024-05-30 20:12:07 +01:00
..
config feat: Add host_list.ini configuration file and update email_parser.js plugin 2024-05-30 20:12:07 +01:00
dkim
plugins chore: Update Haraka config plugins 2024-05-30 20:04:12 +01:00
.dockerignore fix docker file 2022-12-16 13:35:59 +05:30
.gitignore
Dockerfile.tpl feat: Add host_list.ini configuration file and update email_parser.js plugin 2024-05-30 20:12:07 +01:00
init.sh feat: Add host_list.ini configuration file and update email_parser.js plugin 2024-05-30 20:12:07 +01:00
README.md

Build haraka container.

sudo docker build . -t haraka:latest

To update a stack

cd haraka
sudo docker stack deploy haraka -c docker-compose.yml

To restart a service

sudo docker service update haraka_haraka --force

Send Test Outbound Email

swaks --to hello@nawazdhandala.com --from hello@genosyn.com --server 192.168.1.100 --port 2525 --auth-user homelab --auth-password password

Set a domain to send email

Generate a DKIM key:

cd dkim

bash generate.sh

cd ..

public and private files should have been generated inside of dkim folder. Please also add DNS and env vars to docker-compose files. Values of that should be shown on the console.

Add an A record:

mailer.company.com <IP address or haraka server>

Set SPF record:

# Any MX or A servers can send emails. 
v=spf1 mx a -all

Example:

v=spf1 mx a ip4:37.26.74.9 include:_spf.google.com include:mail.genosyn.com ~all

Set DMARC record:

Type: TXT
Key: _dmarc   
Value: "v=DMARC1; p=reject; adkim=s; aspf=r; rua=mailto:dmarc-feedback@<DOMAIN>; ruf=mailto:dmarc-feedback@<DOMAIN>; pct=100"

Example:

_dmarc  TXT "v=DMARC1; p=reject; adkim=s; aspf=r; rua=mailto:dmarc-feedback@genosyn.com; ruf=mailto:dmarc-feedback@genosyn.com; pct=100"

Test, Test, Test.

Use https://www.mail-tester.com/ to test emails.