Blue Flower

Sunday, 27 September 2015 03:01

Adding Junk/Not Junk Features to Roundcube

Written by
Rate this item
(0 votes)

In this walkthrough we will add the Junk/Not Junk buttons to the Roundcube interface. This will allow users to report spam and also report non-spam. There is also an included variable; Once the users have read the Junk mail you will be able to see the files in a predetermined spam box. This is completely optional but will give you more control over what users report.

First lets download the plugin and install it.


# cd /usr/local/www/roundcube/plugins
# fetch https://github.com/JohnDoh/Roundcube-Plugin-Mark-as-Junk-2/archive/master.zip
# unzip master.zip
# mv Roundcube-Plugin-Mark-as-Junk-2-master markasjunk2
# cd /usr/local/www/roundcube/config
# vi config.inc.php

look for plugins array:

$config['plugins'] = array(
    'archive',
    'zipdownload',
    'managesieve',
    'jqueryui',
    'recipient_to_contact',

add

    'markasjunk2'

Looks like

 'archive',
    'zipdownload',
    'managesieve',
    'jqueryui',
    'recipient_to_contact',
    'markasjunk2'

Save and Exit. Now copy the default config.inc.php so this will work properly.


# cd /usr/local/www/roundcube/plugins/markasjunk2
# cp config.inc.php.dist config.inc.php

The defaults are fine. No changes are needed. When you mark an email as Spam it will try to move it to a Junk folder which will not exist. To make this seamless for your users we will need to create a symbolic link for .Junk to point to spam. We can do this in the ~vpopmail/skel folder as follows:


# cd ~vpopmail/skel/Maildir
# ln -s .Spam/ .Junk

The following section is optional. If you would like to see users' read Spam messages you can direct the read messages to a master spambox or just put this in a postmaster mailbox. It's entirely up to you.

Lets add This email address is being protected from spambots. You need JavaScript enabled to view it. first


# ~vpopmail/bin/vadduser This email address is being protected from spambots. You need JavaScript enabled to view it.

Now lets create a symbolic link to the spambox Junk folder.


# cd ~vpopmail/skel/Maildir/.Junk
# rm -R cur

change spambox to the sa-learn catchall user for all domains


# ln -s /usr/home/vpopmail/domains/testdomain.com/spambox/Maildir/cur cur

Special thanks to Steve Donohue

Read 2419 times Last modified on Thursday, 29 September 2016 02:39

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.