Email Spam Folders

youds

Verified User
Joined
Jul 11, 2008
Messages
471
Location
Lancashire, UK
Dear All

Am I correct in thinking that if I use an IMAP server, it is possible for folders listed in the Maildir/subscriptions file and present in the Maildir folder, will appear in IMAP clients?
I've created folders in the Maildir format for the purpose of using IMAP so that users can download there Spam emails to there email IMAP enabled email clients, but have them appear in another folder. More interestingly, I've set it up so that they can move/copy emails to "Teach" folders which has an sa-learn command run on them every once in a while.
These folders appear fine in squirrelmail and roundcube so the user has the option of going to Web Mail and moving emails that way. But as virtually none of my users know about the web mail system and only a very limited number use it on a regular basis, this is not yet enough. So, hopefully, you guys can help me out.

For anybody who is interested in achieving this, I have found these guides very useful:
http://help.directadmin.com/item.php?id=36 - quite common, obviously required
http://help.directadmin.com/item.php?id=117 - i found the example code very useful
http://help.directadmin.com/item.php?id=142 - i have done this as well
http://help.directadmin.com/item.php?id=156 - and this
http://help.directadmin.com/item.php?id=188 - this is the guide for those not using Maildir

Final question, how do you execute a script each time a new mail account is created?

Thanks in advance
 
Last edited:
Ah, I get it.
I'm stuck with trying to change the default "spam" folder to something else at the moment, it appears to get re-created even if you change it on the filesystem.
 
Also, when you change the spamassassin config from inside DirectAdmin, the local.cf file displayed by the editor shows no changes when you configure what to do with spam, send it to .spamassassin folder or users mailbox or delete etc, where are these changes stored???
 
Hi again,
Questions I still can't get answered:
1) How to change the name/location of the users default spam mailbox
2) Where are the settings configured in the SpamAssassin user pages stored?
3) What is the name of the file we should use to run additional scripts for all new email accounts?
 
Hello

1) How to change the name/location of the users default spam mailbox
It's hardcoded within DA, so you can't really, unless you go to a lot of work to rename things on a regular basis (it wouldn't be fun)

2) Where are the settings configured in the SpamAssassin user pages stored?
/home/username/.spamassassin/user_prefs

3) What is the name of the file we should use to run additional scripts for all new email accounts?
/usr/local/directadmin/scripts/custom/email_create_post.sh

You'd have to create it, see the README file for environement info.
Eg:
Code:
#!/bin/sh
echo "the email ${user}@${domain} has been creaed by ${username}" >> /tmp/log.txt
exit 0;
John
 
Hello John

1) How to change the name/location of the users default spam mailbox
It's hardcoded within DA, so you can't really, unless you go to a lot of work to rename things on a regular basis (it wouldn't be fun)
Nothing I can do then..

2) Where are the settings configured in the SpamAssassin user pages stored?
/home/username/.spamassassin/user_prefs
When changing:
Code:
Where do you want the spam to go?
	Send the spam to it's intended recipient.
	Send the spam to the ~/.spamassassin/spam folder.
	Send the spam to the specified account's spam folder.
	Delete the spam.
and
Code:
Would you like to delete high scoring spam?
	Yes, block all spam scoring higher than: (1-99, no decimals)
	No, do not block high scoring spam. Use only the threshold in the previous section.
They don't go into user_prefs (didn't even know they were spamassassin configuration options??)

3) What is the name of the file we should use to run additional scripts for all new email accounts?
/usr/local/directadmin/scripts/custom/email_create_post.sh
Thanks
 
Back
Top