Hello,
I am using 4PSA Spam Gaurdian (with great success), one of the options in the config is to a allow SPAM to be moved to an IMAP folder junk_learn which is then learnd every night and updates the tokens.
So the requirements then became to create the junk_learn & ham_learn folders automatically as users dont actaully do much themselves except send & recieve.
after a bit of help we successfull created a script to, create these folders, set the correct UID:GID, and Perms for some 1100 mail boxes.
OK so that works great, however when i log into horde to test ...
I see the folders there but when i try and move an email to the junk_learn or ham_learn folder i get the following err.
There was an error copying messages from "Inbox" to "junk_learn". This is what the server said: [ALERT] COPY failed - no write permission or out of disk space.
If i delete these folders in horde and recreate them all works fine
these are the permissions when i run my script:
drwx------ 2 popuser popuser 114688 Nov 15 13:07 cur
drwx------ 6 popuser popuser 4096 Aug 10 13:49 .ham_learn
drwx------ 6 popuser popuser 4096 May 28 09:28 .junk_learn
these are the permissions when i create the folders via hore:
drwxr-xr-x 2 popuser popuser 4096 Nov 15 14:12 courierimaphieracl
drwx------ 2 popuser popuser 4096 Nov 15 14:12 courierimapkeywords
-rw-r--r-- 1 popuser popuser 80 Nov 15 14:12 courierimapuiddb
drwx------ 2 popuser popuser 4096 Nov 15 14:12 cur
drwx------ 5 popuser popuser 4096 Nov 15 14:13 .ham_learn
drwx------ 5 popuser popuser 4096 Nov 15 14:13 .junk_learn
the script used to create the fodlers
----------start-------
#!/bin/bash
maildir=/var/qmail/mailnames
domainlist=`ls $maildir | grep '[0-9a-zA-z]\{1,\}\.[0-9a-zA-z]\{2,\}' | grep -v auto-whitelist | grep -v .spamassassin`
for domain in $domainlist; do
for junk_mailname in `ls $maildir/$domain | \
grep -v .spamassassin | \
grep -v .qmail-default | \
grep -v sguardian_prefs | \
grep -v user_prefs | \
grep -v auto-whitelist | \
grep -v bayes* | \
grep -v "@mbox.quota" | \
grep -v *qmail*`; do
mkdir $maildir/$domain/$junk_mailname/Maildir/.junk_learn
chown popuseropuser $maildir/$domain/$junk_mailname/Maildir/.junk_learn
mkdir $maildir/$domain/$junk_mailname/Maildir/.ham_learn
chown popuseropuser $maildir/$domain/$junk_mailname/Maildir/.ham_learn
chmod 700 $maildir/$domain/$junk_mailname/Maildir/.junk_learn
chmod 700 $maildir/$domain/$junk_mailname/Maildir/.ham_learn
done
done
--------------end-----------------
nay help will be cool
I am using 4PSA Spam Gaurdian (with great success), one of the options in the config is to a allow SPAM to be moved to an IMAP folder junk_learn which is then learnd every night and updates the tokens.
So the requirements then became to create the junk_learn & ham_learn folders automatically as users dont actaully do much themselves except send & recieve.
after a bit of help we successfull created a script to, create these folders, set the correct UID:GID, and Perms for some 1100 mail boxes.
OK so that works great, however when i log into horde to test ...
I see the folders there but when i try and move an email to the junk_learn or ham_learn folder i get the following err.
There was an error copying messages from "Inbox" to "junk_learn". This is what the server said: [ALERT] COPY failed - no write permission or out of disk space.
If i delete these folders in horde and recreate them all works fine
these are the permissions when i run my script:
drwx------ 2 popuser popuser 114688 Nov 15 13:07 cur
drwx------ 6 popuser popuser 4096 Aug 10 13:49 .ham_learn
drwx------ 6 popuser popuser 4096 May 28 09:28 .junk_learn
these are the permissions when i create the folders via hore:
drwxr-xr-x 2 popuser popuser 4096 Nov 15 14:12 courierimaphieracl
drwx------ 2 popuser popuser 4096 Nov 15 14:12 courierimapkeywords
-rw-r--r-- 1 popuser popuser 80 Nov 15 14:12 courierimapuiddb
drwx------ 2 popuser popuser 4096 Nov 15 14:12 cur
drwx------ 5 popuser popuser 4096 Nov 15 14:13 .ham_learn
drwx------ 5 popuser popuser 4096 Nov 15 14:13 .junk_learn
the script used to create the fodlers
----------start-------
#!/bin/bash
maildir=/var/qmail/mailnames
domainlist=`ls $maildir | grep '[0-9a-zA-z]\{1,\}\.[0-9a-zA-z]\{2,\}' | grep -v auto-whitelist | grep -v .spamassassin`
for domain in $domainlist; do
for junk_mailname in `ls $maildir/$domain | \
grep -v .spamassassin | \
grep -v .qmail-default | \
grep -v sguardian_prefs | \
grep -v user_prefs | \
grep -v auto-whitelist | \
grep -v bayes* | \
grep -v "@mbox.quota" | \
grep -v *qmail*`; do
mkdir $maildir/$domain/$junk_mailname/Maildir/.junk_learn
chown popuseropuser $maildir/$domain/$junk_mailname/Maildir/.junk_learn
mkdir $maildir/$domain/$junk_mailname/Maildir/.ham_learn
chown popuseropuser $maildir/$domain/$junk_mailname/Maildir/.ham_learn
chmod 700 $maildir/$domain/$junk_mailname/Maildir/.junk_learn
chmod 700 $maildir/$domain/$junk_mailname/Maildir/.ham_learn
done
done
--------------end-----------------
nay help will be cool