How to upgrade from 3.0 to 3.1b

Discussion in 'Developers' Forum' started by maxxer, Jun 16, 2016.

  1. maxxer

    maxxer Member

    hi Till, thanks for the reply.
    This part was also present in my config. What was missing was the domain declaration, even after adding the DKIM keys on the web config to a domain it wasn't added.
    Can you try adding keys to a domain, and check if after that you get the
    Code:
    dkim_key('domain.it', 'pcdkim', '/var/lib/amavis/dkim/domain.it.private');
    
    part?
    can you also check permissions on /var/lib/amavis/dkim/? thanks
     
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    If ispconfig can not write the dkim-key to your config, you see an error in th system-log. And please check, that you have not other amavs-configs as /etc/amavisd/amavisd.conf (something like /etc/amavisd.conf)
     
  3. maxxer

    maxxer Member

    I added a fake domain and it was correctly added to amavisd.conf, but at the bottom of file, after
    Code:
    1;
    . Here's the snipped:

    Code:
    $enable_dkim_verification = 1;
    $enable_dkim_signing = 1; # load DKIM signing code
    $signed_header_fields{'received'} = 0;  # turn off signing of Received
    dkim_key(mydomain.it', 'pcdkim', '/var/lib/amavis/dkim/mydomain.it.private');
    @dkim_signature_options_bysender_maps = (
    { '.' => { ttl => 21*24*3600, c => 'relaxed/simple' } } );1;  # insure a defined return
    dkim_key('dasdasdsa.com', 'default', '/var/lib/amavis/dkim/dasdasdsa.com.private');
    
    haven't tested signing for the second domain, but amavis starts fine
     
  4. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    WIth only one amavis-config (like on centos) the will we be added at the bottom of the file. If your distribution uses different configs (like debian), you find the keys in 60-dkim.
     
  5. maxxer

    maxxer Member

    My concern was just because the dkim key config was added after the safe return
     
  6. tunbox

    tunbox New Member

    I can confirm this bug.
    to fix it in the CentOS 7.0 ISPConfig 3.1 i've modified server/plugins-available/mail_plugin_dkim.inc.php line 254
    Just replaced
    $key_value="dkim_key('".$key_domain."', '".$selector."', '".$mail_config['dkim_path']."/".$key_domain.".private');\n";
    to
    $key_value="\ndkim_key('".$key_domain."', '".$selector."', '".$mail_config['dkim_path']."/".$key_domain.".private');\n";
    maybe it dirty hack, but it worked :)
     
  7. quanghnn

    quanghnn New Member

    Thank you very much for this answer
     

Share This Page