ISPCONFIG 3.1 problem with DKIM

Discussion in 'ISPConfig 3 Priority Support' started by Filip, Dec 1, 2016.

  1. Filip

    Filip New Member

    Hello,

    I installed ISPConfing according to instructions.
    https://www.howtoforge.com/tutorial...l-php-pureftpd-postfix-dovecot-and-ispconfig/

    Everything works perfectly but I have a problem with DKIM.

    I generated the key. With help button "Generate DKIM Private-key" in ISPConfig / MAIL / DOMAIN
    I have a key. DNS records and SPF records for the domain got correctly.

    DKIM key to me does not add to the body of the email.


    This is the code test email (there is no more DKIM)
    Delivered-To: filipsplavec@gmail.com
    Received: by 10.12.174.58 with SMTP id y55csp232997qvc;
    Wed, 30 Nov 2016 01:37:01 -0800 (PST)
    X-Received: by 10.28.29.86 with SMTP id d83mr26485090wmd.75.1480498621797;
    Wed, 30 Nov 2016 01:37:01 -0800 (PST)
    Return-Path: <filip@splavec.cz>
    Received: from webserver.fsnet.cz (webserver.fsnet.cz. [94.142.233.154])
    by mx.google.com with ESMTPS id qf11si62948249wjb.173.2016.11.30.01.37.01
    for <filipsplavec@gmail.com>
    (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
    Wed, 30 Nov 2016 01:37:01 -0800 (PST)
    Received-SPF: pass (google.com: domain of filip@splavec.cz designates 94.142.233.154 as permitted sender) client-ip=94.142.233.154;
    Authentication-Results: mx.google.com;
    spf=pass (google.com: domain of filip@splavec.cz designates 94.142.233.154 as permitted sender) smtp.mailfrom=filip@splavec.cz;
    dmarc=pass (p=NONE dis=NONE) header.from=splavec.cz
    Received: from localhost (localhost [127.0.0.1])
    by webserver.fsnet.cz (Postfix) with ESMTP id 2BAF4240D36
    for <filipsplavec@gmail.com>; Wed, 30 Nov 2016 10:37:01 +0100 (CET)
    X-Virus-Scanned: amavisd-new at webserver.fsnet.cz
    Received: from webserver.fsnet.cz ([127.0.0.1])
    by localhost (webserver.fsnet.cz [127.0.0.1]) (amavisd-new, port 10026)
    with ESMTP id 6twKcnriiV6Y for <filipsplavec@gmail.com>;
    Wed, 30 Nov 2016 10:37:00 +0100 (CET)
    Received: from [192.168.78.156] (wlanpc.ba.psg.sk [195.80.173.70])
    (Authenticated sender: filip@splavec.cz)
    by webserver.fsnet.cz (Postfix) with ESMTPSA id C34C8240D28
    for <filipsplavec@gmail.com>; Wed, 30 Nov 2016 10:37:00 +0100 (CET)
    To: filipsplavec@gmail.com
    From: splavec <filip@splavec.cz>
    Subject: Ahoj
    Message-ID: <0b3f25fd-3735-2b93-9312-83e37f515994@splavec.cz>
    Date: Wed, 30 Nov 2016 10:37:00 +0100
    User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101
    Thunderbird/45.5.0
    MIME-Version: 1.0
    Content-Type: text/plain; charset=iso-8859-2; format=flowed
    Content-Transfer-Encoding: 7bit

    Ahoj


    Thank you for your help

    Filip
     
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

  3. Filip

    Filip New Member

    Hello,
    commands do not work. Neither amavisd-new showkeys or amavisd-new showkeys.

    "
    [root@webserver ~]# amavisd showkeys
    Config file "/etc/amavisd.conf" does not exist, at /usr/sbin/amavisd line 2150.
    "
    I tried to download your vmware iso and it's the same problem.
    "
    [root@webserver ~]# amavisd showkeys
    Config file "/etc/amavisd.conf" does not exist, at /usr/sbin/amavisd line 2150.
    "


    Your vmware iso but the key to e-mail can.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    ls -la /etc/amavisd.conf
    ls -la /etc/amavis/amavisd.conf
    ls -la /etc/amavisd/amavisd.conf
     
  5. Filip

    Filip New Member

    Hi,


    [root@webserver ~]# ls -la /etc/amavisd.conf
    ls: cannot access /etc/amavisd.conf: No such file or directory
    [root@webserver ~]# ls -la /etc/amavis/amavisd.conf
    ls: cannot access /etc/amavis/amavisd.conf: No such file or directory
    [root@webserver ~]# ls -la /etc/amavisd/amavisd.conf
    -rw-r--r-- 1 root root 34457 Dec 1 08:26 /etc/amavisd/amavisd.conf
    [root@webserver ~]#
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    CentOS is not always consistent when it comes to config file locations, that's why I prefer Ubuntu or Debian. Try this:

    ln -s /etc/amavisd/amavisd.conf /etc/amavisd.conf

    and then run the commands from Florian again.
     
  7. Filip

    Filip New Member

    Hi,

    Florian command now work but:

    [root@webserver etc]# amavisd showkeys
    No DKIM private keys declared in a config file.
    [root@webserver etc]# amavisd showkeys splavec.cz
    No DKIM private keys declared in a config file.
    [root@webserver etc]# amavisd testkeys
    No DKIM private keys declared in a config file.
    [root@webserver etc]#


    /etc/amavisd.conf
    $enable_dkim_verification = 1;
    $enable_dkim_signing = 1; # load DKIM signing code
    $signed_header_fields{'received'} = 0; # turn off signing of Received
    @dkim_signature_options_bysender_maps = (
    { '.' => { ttl => 21*24*3600, c => 'relaxed/simple' } } );
    1; # insure a defined returndkim_key('splavec.cz', 'default', '/var/lib/amavis/dkim/splavec.cz.private');
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to remove and then add dkim again in ispconfig for that domain.
     
  9. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    and change
    Code:
    1; # insure a defined returndkim_key('splavec.cz', 'default', '/var/lib/amavis/dkim/splavec.cz.private');
    
    to
    Code:
    1; # insure a defined return
    dkim_key('splavec.cz', 'default', '/var/lib/amavis/dkim/splavec.cz.private');
    
     
  10. Filip

    Filip New Member

    Hi,
    florian and till.

    Everything is already in place. Thank you for your help. :)
    I know that Debian is a better choice for ISPConfig but CentOS is better for me :)
     

Share This Page