← Back to list

How to setting up SPF and DMARC on your iRedMail SMTP Server with CentOS 7

To install and set up SPF and DMARC on your iRed Mail Server with CentOS 7, you can follow these steps:

RomanAcademy · 2023-04-07 02:10 · 154 claps · 1.0 min read
#how-to-setting-up #spf #dmarc #iredmail #smtp
Open on Medium ↗
Wiki topics: 🎵 · Music & Audio

How to setting up SPF and DMARC on your iRedMail SMTP Server with CentOS 7

To install and set up SPF and DMARC on your iRed Mail Server with CentOS 7, you can follow these steps:

  1. Install the necessary packages:

sudo yum install opendkim opendmarc

  1. Generate DKIM keys:
sudo
sudo opendkim-genkey -D /etc/opendkim/keys/example.com/ -d example.com -s default
sudo chown -R opendkim:opendkim /etc/opendkim/keys/example.com```
Replace `example.com` with your own domain name.
3. Configure DKIM in OpenDKIM:
```sudo nano /etc/opendkim.conf```
Add the following lines at the bottom of the file:

Domain example.com KeyFile /etc/opendkim/keys/example.com/default.private Selector default

4. Configure DMARC in OpenDMARC:
```sudo nano /etc/opendmarc.conf```
Add the following lines at the bottom of the file:

AuthservID example.com TrustedAuthservIDs example.com

vbnet
5. Enable the DKIM and DMARC services:
```sudo systemctl enable opendkim opendmarc```
6. Update your DNS records to include the DKIM and DMARC settings.
For DKIM, you need to publish your public key as a TXT record in your DNS zone file. The TXT record should look like this:

default._domainkey.example.com. IN TXT “v=DKIM1; k=rsa; p=<your-public-key>”

css
For DMARC, you need to publish a TXT record with the following information:

_dmarc.example.com. IN TXT “v=DMARC1; p=none; rua=mailto:postmaster@example.com; ruf=mailto:postmaster@example.com; fo=1”

typescript
Replace `example.com` with your own domain name.
7. Reload the services:
```sudo systemctl reload opendkim opendmarc```
8. Test your configuration:
Use an external service such as `DMARC Analyzer` or `mxtoolbox` to test your SPF and DMARC configuration. These services will show you any issues or misconfigurations that you need to address.
By following these steps, you should be able to install and set up SPF and DMARC on your iRedMail server.

Share Prompt


메타데이터
post_id
45d20e891781
slug
how-to-setting-up-spf-and-dmarc-on-your-iredmail-smtp-server-with-centos-7-45d20e891781
url
https://medium.com/@roman-academy/how-to-setting-up-spf-and-dmarc-on-your-iredmail-smtp-server-with-centos-7-45d20e891781
canonical_url
https://medium.com/@roman-academy/how-to-setting-up-spf-and-dmarc-on-your-iredmail-smtp-server-with-centos-7-45d20e891781
author_url
https://medium.com/@roman-academy
status
ok
fetched_at
2026-07-25 21:41:35