Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#4405 issue with spamtrap/hamtrap

1.630
open
Jamie Cameron
5
2014-05-16
2014-05-11
Steven Page
No

i'm not entirely sure if it is a misconfiguration of my server specifically;

when sending mail to (for example) spamtrap@domain.tld, it gets bounced back with this error:

550 5.0.0 /var/virtualmin-traps/spam/138213474513720... Can't create output

i have tried disabling the feature, and subsequently re-enabling it, to ensure that file permissions were not an issue. regardless, here is the permissions output, which is seemingly correct:

:~$ sudo ls -la /var/virtualmin-traps/spam/138213474513720
-rw-rw-rw- 1 root root 0 May 11 16:51 /var/virtualmin-traps/spam/138213474513720

furthermore, i have checked sendmail's alias to see if it is pointing the right file (which AFAIK it is, considering the attempt to pipe to the specific file path)

any suggestions on what i could do to try and debug this issue? thanks!

Discussion

  • Jamie Cameron
    Jamie Cameron
    2014-05-12

    What are the permissions on the parent directories, like /var , /var/virtualmin-traps and /var/virtualmin-traps/spam ? They need to be at least executable by all users for sendmail to be able to find the /var/virtualmin-traps/spam/13821347451372 file.

     
  • Steven Page
    Steven Page
    2014-05-16

    the permissions:

    drwxr-xr-x 16 root root 4096 Apr 26 17:56 var
    drwxr-xr-x 4 root root 4096 Nov 15 22:01 virtualmin-traps
    drwxrwxrwt 2 root root 4096 May 12 18:02 ham
    drwxrwxrwt 2 root root 4096 Apr 30 22:03 spam

    and all files underneath ham/spam have the permissions of -rw-rw-rw-

    see anything that looks wrong? does sendmail pipe to this file? or procmail?

    the other non-standard thing i'm using which i can think of is that i'm using a Procmail wrapper (by jailkit) in order to do a chroot() first;

    note: I have bind --mount'ed this (./virtualmin-traps) into the chroot just in-case this was the issue, double checked permissions, yet it did not seem to solve anything..

    any more ideas?

     
  • Jamie Cameron
    Jamie Cameron
    2014-05-16

    The chroot could be a problem, as presumably /var/virtualmin-traps/spam doesn't exist in the chroot. You would need to disable that..

     
  • Steven Page
    Steven Page
    2014-05-16

    mail delivers fine? i have properly mounted the directory and its structure for /var/virtualmin-traps/spam inside the chroot, and have ensured proper permissions?

    When I get some time I will temporarily disable to chroot operation or use STrace to see if the issue is chroot()ing before writing mail;

    Then I will report if I have any success

     
    Last edit: Steven Page 2014-05-16
  • Jamie Cameron
    Jamie Cameron
    2014-05-16

    Ok, let me know.