🔔 🔔 🔔 Duyuru: 24. Yılımıza özel indirimler sizleri bekliyor ! Kampanya Kodu : TDATA2024 | Detaylı bilgi için tıklayınız.

Install DKIM and SPF in cPanel


Install DKIM and SPF in cPanel


The following scripts are used to enable DKIM and SPF records

   /usr/local/cpanel/bin/dkim_keys_install <username>

  /usr/local/cpanel/bin/spf_installer      <username>

If you wish to add DomainKeys and SPF for all Cpanel users on your server, execute following command.

       for user in `ls -A /var/cpanel/users` ; do

       /usr/local/cpanel/bin/dkim_keys_install $user  &&

         /usr/local/cpanel/bin/spf_installer $user ; done

For new users:
cPanel already though of that, and has options to create hooks for when after an account is created. To set up the server to automatically create an SPF record and DomainKey for new accounts, edit/create /scripts/postwwwacct and paste in the following code:

#!/usr/bin/perl

my %OPTS = @ARGV;

$ENV{USER} = “$OPTS{‘user’}”;
system q(/usr/local/cpanel/bin/dkim_keys_installer $USER);
system q(/usr/local/cpanel/bin/spf_installer $USER);

Configure Exim

Open /etc/exim.conf and near the top, add the following lines:

DKIM_DOMAIN = ${lc:${domain:$h_from:}}
DKIM_FILE = /var/cpanel/domain_keys/private/${lc:${domain:$h_from:}}
DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}

Then scroll down until you see these lines(line nuber 1518):

    remote_smtp:
    driver = smtp

Replace this with:

remote_smtp:
    driver = smtp
    dkim_domain = DKIM_DOMAIN
    dkim_selector = default
    dkim_private_key = DKIM_PRIVATE_KEY
    dkim_canon = relaxed
    dkim_strict = 0

Run chattr +ia /etc/exim.conf and restart the exim.

Bu cevap yeterince yardımcı oldu mu?

Diğer Dökümanlar


  • Email server troubleshooting

    Email / Exim server troubleshooting techniques. You can use the following email server troubleshooting options in your cpanel. Mostly used this command to find spam emails and bulk email senders....

  • IMAP and POP3 authentication DOS attack

    If you have IMAP and POP3 authentication constantly fails and having problems with your mail clients. Large  IMAP and POP3 authentication request, It may be DOS attack. Check your cPHulk...

  • Enable SMTP Authentication on cpanel

    POP before SMTP authentication allows you to send messages via a POP mail server for 30 minutes before you will need to re-authenticate a session through SMTP. POP before SMTP authentication is...

  • cPanel Log file locations

    cPanel log file locations and Basic troubleshooting, most activity that happens on a server to log files, so that you can go back and review log entries for problems, instead of having to be on the...

  • How to change Exim mail server IP address

    By default Exim will be using the main server shared IP address to send mails. If the main server IP is listed in any spam database, then we will not be able to send mails. In order to fix this, we...