These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for .spam directory accessible from imap? on the new forum.
Argh, this really seems like something that must be answered already, but I didn't find anything in the FAQ, forum, or wiki :(
I want mail delivered normally into a folder in the user's account called 'Spam'. I see that there is a .spam file in the Maildir, but it's not visible to the users through their IMAP account. One has to log into the virtualmin/webmin module and view the mail to see that folder.
I went into System Settings -> Module Config -> Spam filtering options, and tried to set the Default delivery for spam.
The doc has this to say:
it may be wise to retain messages for some period of time and allow users to check the spam folder using Usermin webmail, or via IMAP folders (if IMAP is available to your users).The IMAP option sounds like what I want, but how do I make that work?
Good morning,
A well behaved IMAP client won't just show all available mailbox folders by default.
For IMAP, you may need to "subscribe" to folders that interest you, including the spam folder.
How exactly you do that depends on your specific client, but in essence you may need to click a few buttons and have it show additional folders you're interested in.
For example, you could follow these steps if you're using Outlook 2003:
http://office.microsoft.com/en-us/outlook/HP052426081033.aspx
In Thunderbird, you'd do something similar, but in File -> Subscribe.
-Eric
Hello Eric!
Thanks for the tips. I tried the subscribe option, but the folders don't show up for me in t-bird or in outlook.
Outlook does add a folder called "Junk Email", but this doesn't seem to be coming from imap, it seems to be an outlook contrivance.
Any more tips?
Mmm, so what exactly is the full path to your .spam directory? And are you using Dovecot for IMAP (ps auxw|grep dovecot|grep imap)?
Also, just to verify, you are configuring the client to use IMAP rather than something like POP, correct?
And yeah, by default I do believe Outlook will make it's own junk mail folder that's unrelated to any account you have setup.
-Eric
Note that if you didn't create a folder in the client, you'll have to "subscribe" to it before it will show up.
--
Check out the forum guidelines!
<b>Eric Wrote:</b>
<div class='quote'>full path to your .spam directory?</div>
Here you go:
[code:1][kato@server Maildir]$ pwd
/home/users/kato/Maildir
[kato@server Maildir]$ ls -la
total 24
drwx------ 6 kato kato 4096 Jul 28 22:32 .
drwxr-x--- 21 kato kato 4096 Aug 5 00:05 ..
drwx------ 2 kato kato 4096 Jul 29 11:08 cur
drwx------ 2 kato kato 4096 Aug 5 06:20 new
drwx------ 5 kato kato 4096 Jul 28 22:32 .spam
drwx------ 2 kato kato 4096 Aug 5 06:20 tmp
[kato@server Maildir]$ ls -la .spam/
total 20
drwx------ 5 kato kato 4096 Jul 28 22:32 .
drwx------ 6 kato kato 4096 Jul 28 22:32 ..
drwx------ 2 kato kato 4096 Jul 28 22:32 cur
drwx------ 2 kato kato 4096 Jul 28 23:41 new
drwx------ 2 kato kato 4096 Jul 28 23:41 tmp
[/code:1]
<div class='quote'>And are you using Dovecot for IMAP?</div>
Yes.
<div class='quote'>Also, just to verify, you are configuring the client to use IMAP rather than something like POP, correct?</div>
Yes, we configure all our clients to use IMAP.
<b>Joe Wrote:</b>
<div class='quote'>Note that if you didn't create a folder in the client, you'll have to "subscribe" to it before it will show up.</div>
That's the issue, in my mind. The folder doesn't show up in the "subscribe" options for outlook or t-bird.
Could this problem be because the folder starts with a . (system folder)? If so, how do I change that behavior for my new servers and existing ones?
<div class='quote'>Could this problem be because the folder starts with a . (system folder)? If so, how do I change that behavior for my new servers and existing ones?</div>
Well, therein is the issue that's confusing me a bit -- a . is how it's supposed to be. Looking at the Dovecot docs:
http://wiki.dovecot.org/MailboxFormat/Maildir
[code:1]
Directory Structure
Dovecot uses Maildir++ directory layout for organizing mailbox directories. This means that all the folders are directly inside ~/Maildir directory:
* ~/Maildir/new, ~/Maildir/cur and ~/Maildir/tmp directories contain the messages for INBOX. The tmp directory is used during delivery, new messages arrive in new and read shall be moved to cur by the clients.
* ~/Maildir/.folder/ is a mailbox folder
* ~/Maildir/.folder.subfolder/ is a subfolder of a folder (ie. "folder/subfolder"«»)
[/code:1]
So with the . there in the folder name, it's setup exactly as we'd expect.
Are any other folders that do show up as being available in Outlook/Thunderbird?
And if you were to create a new folder through Outlook/Thunderbird, does it show up on the filesystem?
-Eric
Hi Eric,
Great questions, I'm going to try them out right now...
If I create folders on the client, they show up on the server. If I create them on the server, they show up in the client's "subscribe" window, but not automagically on the client, as expected.
So I might be able to tell customes to create the spam folder on their client, and it will be available. However, I can't seem to get a spam message to inject into the folder if they are created by the client. I'm not sure what the cause is of that yet, might just be that the filters aren't working at all now :(