Recording Dmarc feedback
- Install the required libraries
root@server:~# aptitude install python3 python3-pip libpq-dev root@server:~# pip3 install psycopg2
- Create the
dmarc
database user.
root@server:~# sudo -u postgres psql postgres=# create user dmarc with login encrypted password 'xxx';
- Create the config file,
/etc/dmarc_to_database.ini
, and give it600
permissions.
[DEFAULT] [imap] server = imap.domain.tld username = dmarc@domain.tld port = 143 password = xxx [database] server = server.domain.tld database = dmarc username = dmarc password = xxx
Create a dmarc
email virtual user, according to the Dovecot instructions.
- Create the database to store the Dmarc reports.
root@ogedei:/var/lib/mediawiki# sudo -u postgres createdb --owner=dmarc dmarc "Dmarc reports received from other sites"
- Run the
make_database.py
script to create the tables in the database. You can run this on any machine that can see the Postgres server; you may need another copy of thedmarc.ini
file.
- Copy the
dmarc_to_database
script to/etc/cron.daily/
and make it executable.