Wrong amavis config location and service cmd

Discussion in 'Installation/Configuration' started by Nicram, Sep 17, 2018.

  1. Nicram

    Nicram Member

    Before next steps i have upgraded ISPConfig to 3.1.13 to be sure that everything is quiet updated. I also made reconfigure services - yes, and it was bad idea (but there are backups, so i restored my files). Well, after upgrading my PHP version to 5.6.38 (from 5.3.3) on Apache/2.2.15 (CentOS 6.9) to fix control panel i noticed another problem.
    I generated DKIM key, saved settings, and configured domain name. Then i sent email to check this, and there was no dkim validation, and no key inside email. The files with keys were properly generated and saved in /var/lib/amavis/dkim.
    But ISPConfig didn't put correct lines inside amavis.conf file in /etc/amavisd/ even (i enabled debug logging) he said he did:
    pon, 17 wrz 2018, 17:00:01 CEST 17.09.2018-15:00 - DEBUG - Adding DKIM Private-key to amavis-config.
    So i was wondering, why there is no information in what file exactly. but didn't know how to make it show it to me, so i use searching for this, and found that ISPConfig generated completely new amavisd.conf file, in wrong location (inside /etc/, while in centos 6 it is /etc/amavisd/). Then it created another file /etc/60-dkim and put generated domain/key informations there. Which is strange for me, because previous versions did recognize correct location of the amavisd.conf file, and put domains with keys directly into /etc/amavisd/amavisd.conf). I just tweaked the old, correct file by adding
    include_config_files('/etc/60-dkim');
    and restart it, so now it works, but i'm wondering what would happen if i would try to delete or generate new keys for some domains, that are already inside amavisd.conf file. What i done is i moved all lines with domain and it's keys info into 60-dkim file.
    I also noticed, that ISPConfig try to restart amavis service, but it fails, because it use wrong command for that (it try service amavis restart, while it should be amavisd).
    pon, 17 wrz 2018, 17:00:01 CEST 17.09.2018-15:00 - DEBUG - Restarting amavis: service amavis restart.
    pon, 17 wrz 2018, 17:00:01 CEST amavis: nierozpoznana usługa

    I've got question, where ISPConfig 3.1 got information about location of config files (like for amavis?). So i would fix it.

    There is amavisd-new-2.9.1 (20140627) installed. Thank for reply.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    There is a folder install/dist/conf/ on the tar.gz which contains the config presets. CentOS 6 uses the centos53.conf.php settings as far as I can see in the installer code.
     
    Nicram likes this.
  3. Nicram

    Nicram Member

    Thank You. How about after install? I can't find it in server config. I do not know why he created 60-dkim file, strange for me.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The new amavisd.conf file contains an include line for the 60-dkim file. By restoring your old amavisd.conf, you removed the newly added include line which made dkim to fail.
     
  5. Nicram

    Nicram Member

    Well, for amavis i didn't have to restore old file, because old file was untouched, it left in correct location (/etc/amavisd/), while the new generated files for amavis (amavis.conf and 60-dkim) were in wrong location (/etc/). So amavis just didn't read booth, /etc/amavisd.conf and /etc/60-dkim. And that is why it didn't use keys for sending email.
     

Share This Page