Questions about Spamassassin sending spam to a folder?

motobrandt

Verified User
Joined
Jan 8, 2004
Messages
217
OK so I like the idea of the spamassassin controls inside DA but when I choose to send spam to a specific folder it filters te test mail I send but then I don't know where they go.

What folder is it trying to send mail to? This is not obvious. It seems like it should create a spam folder but it isn't.

Help please.

On another note why has there been so much effort on spamassassin but there is no da spamassassin 3.0 pkg yet?
 

cprompt

Verified User
Joined
Sep 27, 2004
Messages
57
Location
Bristol, UK
I have been puzzled by this too...
If you look at the file "filter" under
/etc/virtual/{domain} the settings are shown there.
Mine looks like this

if error_message then finish endif

if
$h_X-Spam-Status: contains "Yes"
then
save /home/admin/.spamassassin/spam
finish
endif
That seems a strange place to put the spam folder? Anyway it doesn't seem to work on my box, spam is not going there at all.
 

motobrandt

Verified User
Joined
Jan 8, 2004
Messages
217
hmmm... good find! Have you tried to edit that file with a path that you know would work? Again this seems a bit strange though it seems as though the filter would send ALL spam addresses to a domain into ONE spam folder rather then a folder for the user that the spam is actually addressed to. If that was the case it would totally render the function useless.

The point of sending spam to a folder is so that the user can look in that folder for false positives.

Oh well. I'll mess with that file but clearly this needs a LOT more work as well as an upgrade to 3.0.
 

motobrandt

Verified User
Joined
Jan 8, 2004
Messages
217
Nobody else has this problem?

Nobody can answer the question about whether it is set up to send the spam from a whole domain into one folder?

I guess I'll email support... :(
 

cprompt

Verified User
Joined
Sep 27, 2004
Messages
57
Location
Bristol, UK
This setting seems to be a weird choice of folder location:
save /home/admin/.spamassassin/spam
Most imap clients wont be able to find the folder because spamassassin is hidden.
Squirrelmail certainly can't find the folder to suscribe to (to check what spam is being save there).
Can anyone comment as to why this location was chosen.
If I change the config to something like
save /home/admin/mail/spam
I get all sorts of permission problems even if I chmod admin.mail and set the sticky bit.
 

fusionictnl

Verified User
Joined
Jun 22, 2004
Messages
1,053
Location
Netherlands
Don't change anything!

In the users dir you will find another dir called: Mail

In this dir is the users complete Mailbox. Here's a symbolic link spam to the .spamassassin/spam folder.

Why is it in .spamassassin ? It's probaly because of the rights.
And it is in the Mail folder so POP/IMAP can access it.
Squirrelmail doesn't access you're server's directory structure (so hidden is no problem).

So don't move it anywhere or you get an invalid spam folder in you mailbox structure.

What are the correct rights:

USER/OWNER = MAIL
GROUP = [USER]

So for example chown mail:fusionict spam


Should work perfectly, but now it isn't counted to users size. How to fix: update to latest DA.

Still errors check logs for error messages.
 
Last edited:

cprompt

Verified User
Joined
Sep 27, 2004
Messages
57
Location
Bristol, UK
Thanks fusionictnl
I didn't realise it was a symbolic link. Once I put that back it all stared working and I can see the folder in SquirrelMail!
Your advice was most welcome.
 

motobrandt

Verified User
Joined
Jan 8, 2004
Messages
217
Any ideas on why mine isn't working? I haven't moved or changed anything. I think everything is up to date. DA is and spamassassin is at whatever the DA guys are packaging now. Not 3.0 yet :(

So does the spam for a user get put in that users folder? or one for the whole domain?
 

fusionictnl

Verified User
Joined
Jun 22, 2004
Messages
1,053
Location
Netherlands
I probaly think it is for that user as the filter files and spamassassin settings are setup per/user.

Why it isn't working ? Check you're rights as I said before on the file .spamassassin/spam in the user dir.
 
Last edited:

cprompt

Verified User
Joined
Sep 27, 2004
Messages
57
Location
Bristol, UK
motobrandt, when I say my setup is working I simply mean the flagged spam mail is now going correctly into the spam folder for the DA user who "owns" that domain. There isn't a "per email account" option under the DA install of SA as it stands. My account "admin" has a dozen or so domains under it (all my own) and spam for ALL of those domains ends up in the same single folder. I realise you're after per "email address" level of control but it simply isn't available under DA yet (as far as I know anyway). I seem to recall a post in here about SA with virtual email accounts - perhaps you could search for it but I don't know if it's any good. :(
 

cprompt

Verified User
Joined
Sep 27, 2004
Messages
57
Location
Bristol, UK
All of a sudden my spam folder has become inaccesible.
In Squirrel I get this.
ERROR : Could not complete request.
Query: SELECT "spam"
Reason Given: SELECT failed: Unable to open file /home/admin/mail/spam
/home/admin/mail/spam is ln'd to
/home/admin/.spamassassin/spam
which has the following rights:
-rw------- 1 mail admin 93429 Oct 13 19:17 spam
Now I realise that only the owner and not the group have permissions here but whenever I set the group to have rw as well it gets changed back to the above when SA sends new mail to the spam folder. SA is running as mail (standard exim.conf from DA build)

Any one have any clues? I'm stumped!
 

motobrandt

Verified User
Joined
Jan 8, 2004
Messages
217
wrong uid!

Every domain that I have enabled spamassassin on gets a wrong uid. for the spam folder.

I can fix this manually but is this a mistake in DA when creating those folders?

Here's an example from the maillog:

2004-10-09 15:50:03 1CGBDC-000JUn-MD == /home/username/.spamassassin/spam <community@domain.com> R=domain_filter T=address_file defer (-6): mailbox /home/username/.spamassassin/spam has wrong uid (1239 != 12)

DA guys. Please keep working on this. It is VERY important that it function properly especially since it is now integrated into every users control panel.:eek:

thx
 

fusionictnl

Verified User
Joined
Jun 22, 2004
Messages
1,053
Location
Netherlands
mailbox /home/username/.spamassassin/spam has wrong uid (1239 != 12)
You're spam file/folder permission is set wrong. So if you just change it to it's original of DA 1.23 it would be fixed:

-rw-rw---- 1 mail [USER] 64314 Oct 15 12:38 spam

DA guys. Please keep working on this. It is VERY important that it function properly especially since it is now integrated into every users control panel.
You can easy disable it by modifying the resellers permissions to have Spamassassin.
 

motobrandt

Verified User
Joined
Jan 8, 2004
Messages
217
fusionictnl said:
You're spam file/folder permission is set wrong. So if you just change it to it's original of DA 1.23 it would be fixed:
yes I know that the permission is set wrong and I know how to fix it. My point is that Directadmin set the permissions wrong to begin with so there is something wrong with the script that sets that up.

fusionictnl said:
You can easy disable it by modifying the resellers permissions to have Spamassassin.
So you're suggesting the fix to a function of DA that isn't working is to disable it? I'd rather just have the writers of the script fix the problem.
;)
 

Richard

Verified User
Joined
Jul 2, 2004
Messages
33
Location
Argentina
i updated DA but the spam folder doesn't appear in
webmail (squirrelmail).

i have the correct permission:
-rw-rw---- 1 mail username 4678 Oct 18 16:26 spam
and the symbolic link @spam is in /home/username/mail/

anyone can help me??
 
Last edited:

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,987
Hello,

Firstly, spamassasin 3.0 is not included because it requires a version of perl that doesn't span all of our os's.. ie: the older redhats.. If we include 3.0, then they would have to install a newer perl to use spamassassin, eg:
Perl v5.6.1 required--this is only v5.6.0, stopped at Makefile.PL line 2.
I could make the change anyway, and leave the older system to fend for themselves for perl, or could also give the newer system 3.0 and leave the older spamasssin with the older os's..

There was a permission issue with the older version of DA for the "spam folder". If you've got DA 1.23.0, you should be able to hit "save" again and the permissions should be set. The permissions themselves are very constricting, I had trouble getting it that far to get it to work with imapd and exim, so get to get even fancier would be interesting to say the least ;)

As for viewing the spam folder, it's very basic. You can only view it while in imap (squirrelmail works) and while using the main user account (same as DA login). DA should have created a symbolic link ~/mail/spam -> ../.spamassassin/spam and also added "spam" to the ~/.mailboxlist file.

I'm open to suggestions as for possible changes to make it better, but would like to get all the quirks with this one worked out before moving on.

John
 

outpernet

Verified User
Joined
May 26, 2003
Messages
251
DirectAdmin Support said:
Hello,

There was a permission issue with the older version of DA for the "spam folder". If you've got DA 1.23.0, you should be able to hit "save" again and the permissions should be set. The permissions themselves are very constricting, I had trouble getting it that far to get it to work with imapd and exim, so get to get even fancier would be interesting to say the least ;)
1.23 here. I clicked in 'save' again. Still the same error. And i tested in more than one server and more than one S.O.

And also the error is not only that (folder spam doesnt appears in the webmail), the other error is that all emails (spam and no spam) go to that folder.
 
Last edited:

rldev

Verified User
Joined
May 26, 2004
Messages
1,074
If email tagged as spam can be delivered to any mailbox, why can't we choose which mailbox we want it delivered to? I know this can be done after the fact, but why can't it be done before the fact? Why is it relegated to just IMAP? Just curious.
 

gdarcan

New member
Joined
May 4, 2012
Messages
1
i had the same prooblem, but just solved it !!!

I set below settings for each filter.conf in /etc/virtual/*/filter.conf

Code:
[root@srv domain.com]#cat /etc/virtual/domain.com/filter.conf
high_score=15
high_score_block=yes
where=userspamfolder
[root@srv domain.com]#
Now spam mails are moved automatically to users spam folder, you should also modify scripts/custom/user_create_post.sh to automatically copy the default filter.conf that you created anywhere with above settings, to /etc/virtual/$domain/filter.conf
 
Top