opendkim.sock Permission denied

  • Hello!


    The opendkim has owner and group opendkim, but I get this warning.

    Code: mail.log
    1. postfix/smtpd[5273]: warning: connect to Milter service unix:/opendkim/opendkim.sock: Permission denied

    System Debian 8.7
    i-MSCP 1.3.16
    opendkim plugin 1.1.3
    opendkim 2.9.2 (openSSL 1.0.1t)


    postfix is a member of the opendkim group


    Best regards

  • PHP: config.php
    1. <?php/** * i-MSCP OpenDKIM plugin * Copyright (C) 2013-2016 Laurent Declercq <[email protected]> * Copyright (C) 2013-2016 Rene Schuster <[email protected]> * Copyright (C) 2013-2016 Sascha Bay <[email protected]> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */return array( // OpenDKIM Socket (default: local:/var/spool/postfix/opendkim/opendkim.sock) // // Possible values: // 'local:/var/spool/postfix/opendkim/opendkim.sock' for connection through UNIX socket // 'inet:12345@localhost' for connection through TCP socket 'OpenDKIM_Socket' => 'local:/var/spool/postfix/opendkim/opendkim.sock', // Postfix smtpd milter for OpenDKIM (default: unix:/opendkim/opendkim.sock) // // Possible values: // 'unix:/opendkim/opendkim.sock' for connection through UNIX socket // 'inet:localhost:12345' for connection through TCP socket 'PostfixMilterSocket' => 'unix:/opendkim/opendkim.sock', // OpenDKIM canonicalization method (default: simple) // // Canonicalization method(s) to be used when signing messages. When verifying, the message's DKIM-Signature: header // field specifies the canonicalization method. The recognized values are relaxed and simple as defined by the DKIM // specification. The value may include two different canonicalizations separated by a slash ("/") character, in // which case the first will be applied to the header and the second to the body. // // Possible values: simple, relaxed, simple/relaxed or relaxed/simple 'opendkim_canonicalization' => 'simple', // Trusted hosts (default: 127.0.0.1, localhost) // // List of host which must be trusted by OpenDKIM 'opendkim_trusted_hosts' => array( '127.0.0.1', 'localhost' ));


    Code
    1. cat /etc/default/opendkim# Command-line options specified here will override the contents of# /etc/opendkim.conf. See opendkim(8) for a complete list of options.#DAEMON_OPTS=""## Uncomment to specify an alternate socket# Note that setting this will override any Socket value in opendkim.conf#SOCKET="local:/var/run/opendkim/opendkim.sock" # default#SOCKET="inet:54321" # listen on all interfaces on port 54321#SOCKET="inet:12345@localhost" # listen on loopback on port 12345#SOCKET="inet:[email protected]" # listen on 192.0.2.1 on port 12345#### Begin Plugin::OpenDKIMSOCKET="local:/var/spool/postfix/opendkim/opendkim.sock"# Ending Plugin::OpenDKIM
    Code: main.cf
    1. non_smtpd_milters = unix:/clamav/clamav-milter.ctl, unix:/spamass/spamass.sock, unix:/opendkim/opendkim.socksmtpd_milters = unix:/clamav/clamav-milter.ctl, unix:/spamass/spamass.sock, unix:/opendkim/opendkim.sock

    So I think anything should work

    Code
    1. service opendkim status
    2. * opendkim.service - LSB: Start the OpenDKIM service
    3. Loaded: loaded (/etc/init.d/opendkim)
    4. Active: active (running) since Tue 2017-02-14 09:32:25 CET; 2 days ago
    5. Process: 163 ExecStart=/etc/init.d/opendkim start (code=exited, status=0/SUCCESS)
    6. CGroup: /system.slice/opendkim.service
    7. `-408 /usr/sbin/opendkim -x /etc/opendkim.conf -u opendkim -P /var/run/opendkim/opendkim.pid -p local:/var/spool/postfix/opendkim/opendkim.sock

    But I always get the warning: connect to Milter service unix:/opendkim/opendkim.sock: Permission denied

  • @ciscllc


    The permissions on /var/spool/postfix/opendkim/opendkim.sock are?


    Shell-Script
    1. # ls -la /var/spool/postfix/opendkim/opendkim.sock

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Code
    1. srw-r--r-- 1 opendkim opendkim 0 Feb 16 16:03 /var/spool/postfix/opendkim/opendkim.sock

    And on an other Server (also the same error)



    Code
    1. srw-rw-rw- 1 opendkim opendkim 0 Feb 16 15:52 /var/spool/postfix/opendkim/opendkim.sock



    Thanks

  • Please


    Code
    1. # ls -la /var/spool/postfix/opendkim


    ONLY FOR THE SERVER YOU TALKED IN FIRST POST !

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • ls -la /var/spool/postfix/opendkim

    Please ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • oh, sorry ;-)

    Code
    1. # ls -la /var/spool/postfix/opendkim
    2. total 8
    3. drwxr-xr-x+ 2 opendkim opendkim 4096 Feb 16 16:03 .
    4. drwxr-xr-x+ 24 root root 4096 Feb 13 09:50 ..
    5. srw-r--r-- 1 opendkim opendkim 0 Feb 16 16:03 opendkim.sock

    thanks

  • Here mine, with working config:

    Code
    1. drwxr-xr-x 2 opendkim root 4096 Feb 14 09:31 .
    2. drwxr-xr-x 23 root root 4096 Aug 3 2016 ..
    3. srw-rw-rw- 1 opendkim opendkim 0 Feb 14 09:31 opendkim.sock