
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
This is a Superkaramba widget that examines an arbitrary number of IMAP mailboxes, POP3 mailboxes and local mail folders for new messages. For the latest new messages, the content of a specified header is displayed on the screen. When new messages arrive, Mailbox Strainer emits a notification via KNotify.
You may have serveral instances running such that each one checks its own collection of mailboxes. SpamAssassin may be invoked to detect spam, or message headers modified by external spam checkers can be evaluated. It is also possible to make SpamAssassin learn from specified IMAP or local folders.
Configuration can be done through a graphical interface or manually via a configuration file (an annotated configuration file is supplied).
Mailbox Strainer is written in Perl. Depending on the features you want to use, a number of Perl modules must be installed. In particular, PerlQt will be needed for the configuration dialog. All modules can be found at http://www.cpan.org , consider using the CPAN shell (perl -MCPAN -e shell) for this will automatically resolve dependencies. To find out which modules are missing on your system, invoke module-test.pl . (Hopefully I didn't forget any of them, it has become quite a number.)
The local mail capabilities are those of the Email::Folder::* modules, so they should be able to handle mbox and maildir. Currently, using the spam detection with local mbox folders is _strongly_ discouraged! It is likely to destroy your Emails, see http://www.nntp.perl.org/group/perl.pep/68 for the reason. (A possible workaround is presented in http://www.nntp.perl.org/group/perl.pep/72.) So spam checking is currently disabled for local mailboxes. You can enable it by changing lines 975, 998 and 1081 of perl/mailbox-strainer.pl. Remove "0 &&" from each of those lines.
A few words about password storage: The configuration dialog stores encrypted passwords (of length at least 8) in the configuration file. This is meant as a protection against accidentally displaying the configuration file, but nothing else. Consider this as a parody on proper encryption, even the 'secret' key can be found in the perl scripts.
15 years ago
v.91 - The Perl DCOP module has changed recently. I decided to drop the module and use a system call instead.
v.9 - As proposed by alex77s, a sound can be played in case of recent messages. This is done via knotify.
- widget may be hidden unless there are unread messages. (It's in the third screenshot, you see?)
15 years ago
v.91 - The Perl DCOP module has changed recently. I decided to drop the module and use a system call instead.
v.9 - As proposed by alex77s, a sound can be played in case of recent messages. This is done via knotify.
- widget may be hidden unless there are unread messages. (It's in the third screenshot, you see?)
N7DR
15 years ago
I created a mailbox-streamer.cfg file, and checked that it was actually being used by changing some innocuous things (like the background image) and reloading the theme to make sure that indeed my changes were reflected in what I see on screen.
So I know that the config file is being read OK.
But I NEVER see any mail, even though I know that there are several e-mails waiting on the POP3 server.
Report
quark
15 years ago
"mailbox-strainer.pl ../mailbox-strainer.cfg"
(A single line, mailbox-strainer.pl is the command with the configuration file as an argument.)
There might also be error messages if Superkaramba itself is run from a console.
If this doesn't help, let's try to work it out via email. I'm glad to get some response.
Report
N7DR
15 years ago
Can't locate Config/General.pm in @INC (@INC contains: /usr/lib/perl5/5.8.7/x86_64-linux /usr/lib/perl5/5.8.7 /usr/lib/perl5/site_perl/5.8.7/x86_64-linux /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.7/x86_64-linux /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl .) at ./mailbox-strainer.pl line 35.
BEGIN failed--compilation aborted at ./mailbox-strainer.pl line 35.
[H:perl]
I'll also send this to your e-mail address, so you can respond whichever way you prefer.
Report
quark
15 years ago
Config::General probably won't be the only one. You can get all of them from www.cpan.org, but installing each one manually, including its dependencies, will prove cumbersome. So I advise you to try "perl -MCPAN -e shell". If it works, you'll be able to install a module from within that shell simply by typing "install NAME", as in "install Config::General".
Sorry for the inconvenience, but those modules really are necessary.
Report
quark
15 years ago
Report
quark
15 years ago
Secondly, you may run the shell as root or as an ordinary user at your choice, but it will require root privileges to install the modules after the (automatic) build process. If privileges are missing, it will complain and tell you about a config option that has to be changed. I don't remember that option, and I always run the shell as root, anyway.
By the way, I think it is good practice to do a "clean PACKAGE-NAME" after an installation of PACKAGE-NAME has failed (for example because of missing privileges), otherwise I ran into minor problems sometimes.
Finally, the script "module-test.pl" uses the Perl command "use Qt" to detect the presence of PerlQt, which is the canonical way of loading a module. If it doesn't work, I'd say there must be something wrong with the installation. But again, you can install it via the CPAN shell using "install Qt".
Report
quark
15 years ago
Report
N7DR
15 years ago
perl -MCPAN -e shell
The last few lines of output were...
-----
You have no /home/n7dr/.cpan/sources/MIRRORED.BY
I'm trying to fetch one
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz
-----
Then I got what looked like an ordinary shell prompt, and I executed "install DCOP".
Report
N7DR
15 years ago
perl -MCPAN -e shell
The last few lines of output were...
-----
You have no /home/n7dr/.cpan/sources/MIRRORED.BY
I'm trying to fetch one
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz
-----
Then I got what looked like an ordinary shell prompt, and I executed "install DCOP".
Report
N7DR
15 years ago
It says I need PerlQt (to access the graphical configuration stuff) -- but PerlQt is installed (via urpmi from my distro). So I wonder if there's a problem with the part of module-test.pl that detects PerlQt.
Report
N7DR
15 years ago
Report
N7DR
15 years ago
I tried as an ordinary user, and when it had all finished, I tried "install DCOP", and got the following:
$ install DCOP
install: too few arguments
Try `install --help' for more information.
So presumably I need to run this stuff as root -- but I don't want to run as root unless you tell me I have to.
I added the Time and Config modules from my distro, but the distro doesn't contain DCOP (mandatory) or some of the necessary optional modules.
Report
alex77s
15 years ago
def widgetClicked(widget, x, y, button):
if ( button == 1 or button == 2):
click_check = 0
launch = ''
configuration = open(str(karamba.readConfigEntry(widget,"configuration_file")) )
line = configuration.readline()
while line:
if re.search( r'^\s*click_check\s*(1|true|on)',line):
click_check = 1
match = re.search( r'^\s*click_launch\s*(.*)',line)
if match:
launch = match.groups()[-1]
line = configuration.readline()
configuration.close()
if (not click_check and launch and button == 1) or (click_check and launch and button == 2):
program = os.popen( launch + '&')
program.close()
else:
if (click_check and button == 1) or (not click_check and launch and button == 2):
widgetUpdated( widget)
(Damn! The site remove all the spaces in the code. If you need, I send it by email.)
Whit this modifies, if in the config file, the click_launch and the click_check are enabled, and you click button 1 (left button) the script start to check new mails, or if you click button 2 (middle button) start your mail client.
If only one of click_check or click_launch is enable, the script run in usual way.
Report
quark
15 years ago
Report
alex77s
15 years ago
Report
alex77s
15 years ago
system('play -v 0.1 /opt/kde3/share/sounds/KDE_Notify.wav');
to play a notify when I receive a new mail.
It's an idea for the future versions of this theme.
Report
quark
15 years ago
I'll have to think about this, and I also think that sound should be configurable through the Control Centre, I don't know yet how that may be accomplished.
Report
seraphyn
15 years ago
The Configurator make problems with adding some boxes to the mailbox Strainer.
Hope i will find the Bug and give it 2 u for fixing it.
Greetz
Chris
Report
persuader
15 years ago
This Perl hasn't been configured and built properly for the threads
module to work. (The 'useithreads' configuration option hasn't been used.)
Having threads support requires all of Perl and all of the XS modules in
the Perl installation to be rebuilt, it is not just a question of adding
the threads module. (In other words, threaded and non-threaded Perls
are binary incompatible.)
If you want to the use the threads module, please contact the people
who built your Perl.
Cannot continue, aborting.
Thanks
Report
quark
15 years ago
Report
quark
15 years ago
>strainer_configuration.pl ../mailbox-strainer.cfg
from the console with mailbox-strainer/perl as current directory. You will hopefully receive some useful error message.
Report