Author |
|
pixelweben Newbie
Joined: 09 November 2011 Location: Germany
Online Status: Offline Posts: 4
|
Posted: 11 November 2011 at 1:22pm | IP Logged
|
|
|
I was wondering if it is possible to configure WebMail not to show the "SPAM" / "Not SPAM" buttons in the navigation (and not to create a Spam folder as well)?
Setup is an IMAP server on localhost.
I found a promising flag in /js/common/defines.js line 3:
Quote:
var HideSpamButton = false; |
|
|
but changing this value to "true" doesn't change a thing.
Regards
pixelweben
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 14 November 2011 at 1:59am | IP Logged
|
|
|
WebMail maintains a list of folders it should create within new IMAP account, unless matching folders exist already. You can override that list using a custom extension. The location of plugin to be used is examples/plugins/change-default-folders, you need to copy that folder so that it's located at data/plugins/change-default-folders.
In data/plugins/change-default-folders/index.php file, you'll find a list of folders to be created. Each folder type matches one or several folder names to be looked up. For instance, existing Sent folder can be recognized if it's called 'Sent Items', 'Sent' or 'Sent Mail'.
Supply the following content for $aFolderMap array (as you can see, the list doesn't contain Spam folder):
Code:
EFolderType::Inbox => array('INBOX', 'Inbox'),
EFolderType::Drafts => array('Drafts', 'Draft'),
EFolderType::Sent => array('Sent Items', 'Sent', 'Sent Mail'),
EFolderType::Trash => array('Trash', 'Bin', 'Deleted') |
|
|
The last thing to do is to activate the plugin. Open data/settings/config.php file, by default it only contains an empty array:
You need to add a line which enables the plugin:
Code:
return array(
'plugins.change-default-folders' => true
); |
|
|
Hope this helps!
--
Regards,
Igor, AfterLogic Support
P.S.: The setting you mentioned is actually a leftover from an old code, so it will be removed, thanks for pointing it out.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 14 November 2011 at 2:02am | IP Logged
|
|
|
Even though it might be clear enough, I'd like to outline it anyway: in case if Spam folder is not there, spam-related functionality is not activated in WebMail.
If you'd like to disable that functionality for existing account, that's possible too. Using "Setup special folders" tool of Manage Folders screen, set "No Usage Selected" for Spam folder, and then you can delete the folder itself.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
pixelweben Newbie
Joined: 09 November 2011 Location: Germany
Online Status: Offline Posts: 4
|
Posted: 15 November 2011 at 1:03pm | IP Logged
|
|
|
Thank you very much for your detailed explanation, the solution you provided works like a charm.
Regards
pixelweben
|
Back to Top |
|
|
edek010 Newbie
Joined: 26 November 2011 Location: Netherlands
Online Status: Offline Posts: 1
|
Posted: 26 November 2011 at 1:20pm | IP Logged
|
|
|
This has been i really great help to me, thanks!
|
Back to Top |
|
|
dla Newbie
Joined: 20 February 2013 Location: United States
Online Status: Offline Posts: 8
|
Posted: 01 March 2013 at 1:38pm | IP Logged
|
|
|
Hi again, I'm trying to disable the spam folder globaly as well. When you say to add code to the '$aFolderMap' array, this is what I have in the examples/plugins/change-default-folders/index.php file:
public function PluginDomainConstruct (&$oDomain)
{
$aFolderMap =& $oDomain->GetFoldersMap();
$aFolderMap = array(
EFolderType::Inbox => 'INBOX',
EFolderType::Trash => 'Trash'
);
}
Now when I copied the folder over to /data/plugins/... I modified the php file:
{
$aFolderMap =& $oDomain->GetFoldersMap();
$aFolderMap = array(
EFolderType::Inbox => 'INBOX',
EFolderType::Drafts => 'Drafts',
EFolderType::Sent => 'Sent Items',
EFolderType::Trash => 'Trash'
);
}
And modified the conf file to activate the plugin and it's a no go. When I changed it to exactly what you have, it breaks the web interface (cannot log in). What should this code look like if the $aFolderMap is within a array already?
Thanks!
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 04 March 2013 at 1:05am | IP Logged
|
|
|
Well the thread is over a year old and things changed a lot since then. Assuming you work with current 6.6 version, the modification you posted looks alright; it will only work for new accounts of course.
If logging in doesn't work for some reason, you'll need to enabled debug logs in AdminPanel, replicate the issue and see what's in the logs.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|