dspam.sock permissions

Discussion in 'Server Operation' started by aws910, Nov 2, 2007.

  1. aws910

    aws910 New Member

    I've been hacking my way through a UntuntuServer7.10+postfix+dspam+webui installation as a relay, and I've almost got everything working together. Here's the last problem(I hope) and I can't figure it out:

    When I try to send an inbound test message via telnet to port 25, it doesn't come through. when I run "mailq" from the console, I get this:
    Code:
    13D0311AF51      397 Thu Nov  1 02:59:17  xxx@outsidedomain.com
    (connect to newserver.newdomain.com[/var/spool/postfix/tmp/dspam.sock]: No such file or directory)
    I've figured out how to edit the dspam.conf to put dspam.sock where I want it(and I verified that it actually is there), but postfix "can't find it" no matter where I put it. How should I set the permissions/ownership for this file? I don't want to give it too many permissions and screw up the chroot-jailing of postfix.
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Are you sure that DSPam is really running? You can check that with
    Code:
    ps aux
     
  3. aws910

    aws910 New Member

    It's possible, I just assumed it was running because it would create the dspam.sock file. here's the output of ps aux:

    Code:
    USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
    root         1  0.0  0.3   2064   688 ?        Ss   Nov03   0:01 init [2]  
    root         2  0.0  0.0      0     0 ?        SN   Nov03   0:00 [ksoftirqd/0]
    root         3  0.0  0.0      0     0 ?        S<   Nov03   0:00 [events/0]
    root         4  0.0  0.0      0     0 ?        S<   Nov03   0:00 [khelper]
    root         5  0.0  0.0      0     0 ?        S<   Nov03   0:00 [kthread]
    root         8  0.0  0.0      0     0 ?        S<   Nov03   0:00 [kblockd/0]
    root         9  0.0  0.0      0     0 ?        S<   Nov03   0:00 [kacpid]
    root        65  0.0  0.0      0     0 ?        S<   Nov03   0:00 [kseriod]
    root       105  0.0  0.0      0     0 ?        S    Nov03   0:00 [pdflush]
    root       106  0.0  0.0      0     0 ?        S    Nov03   0:00 [pdflush]
    root       107  0.0  0.0      0     0 ?        S<   Nov03   0:00 [kswapd0]
    root       108  0.0  0.0      0     0 ?        S<   Nov03   0:00 [aio/0]
    root       544  0.0  0.0      0     0 ?        S<   Nov03   0:00 [khubd]
    root       857  0.0  0.0      0     0 ?        S<   Nov03   0:00 [kjournald]
    root      1033  0.0  0.3   2304   612 ?        S<s  Nov03   0:00 udevd --daemon
    root      1306  0.0  0.0      0     0 ?        S<   Nov03   0:00 [kpsmoused]
    root      1332  0.0  0.0      0     0 ?        S<   Nov03   0:00 [kgameportd]
    root      1573  0.0  0.0      0     0 ?        S<   Nov03   0:00 [kmirrord]
    daemon    1674  0.0  0.2   1808   440 ?        Ss   Nov03   0:00 /sbin/portmap
    root      1893  0.0  0.3   1748   640 ?        Ss   Nov03   0:00 /sbin/syslogd
    root      1899  0.0  0.2   1700   416 ?        Ss   Nov03   0:00 /sbin/klogd -x
    root      1954  0.0  0.7   2796  1356 ?        S    Nov03   0:00 /bin/sh /usr/bi
    mysql     1991  0.0  8.6 126992 16608 ?        Sl   Nov03   0:00 /usr/sbin/mysql
    root      1992  0.0  0.2   1684   552 ?        S    Nov03   0:00 logger -p daemo
    root      2096  0.0  0.3   1696   612 ?        Ss   Nov03   0:00 /usr/sbin/acpid
    root      2105  0.0  0.3   1872   588 ?        Ss   Nov03   0:00 /usr/sbin/inetd
    root      2170  0.0  0.8   4936  1652 ?        Ss   Nov03   0:00 /usr/lib/postfi
    postfix   2172  0.0  0.9   4984  1760 ?        S    Nov03   0:00 qmgr -l -t fifo
    root      2202  0.0  0.5   5052  1104 ?        Ss   Nov03   0:00 /usr/sbin/sshd
    root      2231  0.0  0.8   5944  1720 ?        S    Nov03   0:00 /usr/bin/dspam
    statd     2237  0.0  0.3   1884   752 ?        Ss   Nov03   0:00 /sbin/rpc.statd
    daemon    2250  0.0  0.2   1956   428 ?        Ss   Nov03   0:00 /usr/sbin/atd
    root      2257  0.0  0.4   2320   780 ?        Ss   Nov03   0:00 /usr/sbin/cron
    root      2272  0.0  1.4  11724  2768 ?        Ss   Nov03   0:00 /usr/sbin/apach
    www-data  2273  0.0  1.0  11496  2088 ?        S    Nov03   0:00 /usr/sbin/apach
    www-data  2282  0.0  1.3 233060  2648 ?        Sl   Nov03   0:00 /usr/sbin/apach
    www-data  2284  0.0  1.3 233060  2652 ?        Sl   Nov03   0:00 /usr/sbin/apach
    root      2351  0.0  0.2   1696   520 tty1     Ss+  Nov03   0:00 /sbin/getty 384
    root      2352  0.0  0.2   1692   516 tty2     Ss+  Nov03   0:00 /sbin/getty 384
    root      2353  0.0  0.2   1692   516 tty3     Ss+  Nov03   0:00 /sbin/getty 384
    root      2354  0.0  0.2   1696   520 tty4     Ss+  Nov03   0:00 /sbin/getty 384
    root      2355  0.0  0.2   1692   516 tty5     Ss+  Nov03   0:00 /sbin/getty 384
    root      2356  0.0  0.2   1696   520 tty6     Ss+  Nov03   0:00 /sbin/getty 384
    postfix   2389  0.0  0.8   4944  1592 ?        S    Nov03   0:00 pickup -l -t fi
    root      2392  0.0  1.2   7820  2348 ?        Ss   Nov03   0:00 sshd: mr [priv]
    mr        2394  0.0  0.8   7820  1604 ?        R    Nov03   0:00 sshd: mr@pts/0
    mr        2395  0.0  1.5   5604  2968 pts/0    Ss   Nov03   0:00 -bash
    root      2414  0.0  0.5   3908  1144 pts/0    S    Nov03   0:00 su
    root      2415  0.0  0.9   4196  1732 pts/0    S    Nov03   0:00 bash
    root      2438  0.0  0.5   3620  1040 pts/0    R+   00:11   0:00 ps aux
    also, when I run a "locate dspam.sock", I get this:
    Code:
    /var/spool/postfix/dspam.sock
    /var/spool/postfix/tmp/dspam.sock
    btw Falko, I really appreciate all the HOWTOs and your help in all this. You've got a wonderful site, I'd still be a windoze-slave if it weren't for you. :D
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Looks ok. My best guess now is that your Postfix is running chrooted (what's in your /etc/postfix/master.cf?) and therefore looks for the socket within /var/spool/postfix (so /var/spool/postfix/dspam.sock would translate to /var/spool/postfix/var/spool/postfix/dspam.sock).
     
  5. aws910

    aws910 New Member

    Sweet, it works now. I guess I didn't fully understand the meaning of chrooting before.

    On my fix... here's the line from my /etc/postfix/master.cf:
    Code:
    smtp inet       n       -       y       -       -       smtpd
         -o content_filter=lmtp:unix:/tmp/dspam.sock
    ...the corresponding line from my /etc/dspam/dspam.conf:
    Code:
    ServerDomainSocketPath  "/var/spool/postfix/tmp/dspam.sock"
    Thanks again, Falko. Next time you're in Los Angeles, there's a cold one waiting for you here!
     

Share This Page