MailCleaner + Exchange + IMAP Bayes Training

Users tips and ideas

Moderators: FlorianB, Pascal, bourgeois, mentor

User avatar
suhasingale
Posts: 298
Joined: Mon Nov 13, 2006 2:30 pm
Location: India
Contact:

Postby suhasingale » Fri Nov 24, 2006 8:18 am

The perl script runs perfectly when i run it manually. The only problem is that it don't run via cron job.
User avatar
jordant
Posts: 218
Joined: Sat Sep 16, 2006 2:48 pm
Location: Perth, Western Australia

Postby jordant » Fri Nov 24, 2006 8:31 am

Try this one: http://noc.lindentech.com.au/public/mai ... n-debug.pl

dont forget to edit the values first

It will create a file called /tmp/imapsalearn.log

Post the output of that in here when your done
User avatar
suhasingale
Posts: 298
Joined: Mon Nov 13, 2006 2:30 pm
Location: India
Contact:

Postby suhasingale » Fri Nov 24, 2006 8:58 am

Hi Jordant,

Since there were no messages in the folders, it logged 0 messaged in the log.

Code: Select all

./imap-sa-learn-debug.pl started
Entering while loop
Connecting to imap server
Selecting imap folder: Main
Fetching messages
Found 0 messages
Selecting imap folder: Ham
Fetching messages
Found 0 messages
Now rebuilding the Bayesian filters
Closing imap connection


Your script is working perfect. The problem is that it is not getting executed via cron. I have also given 777 permission to the perl file.
User avatar
jordant
Posts: 218
Joined: Sat Sep 16, 2006 2:48 pm
Location: Perth, Western Australia

Postby jordant » Fri Nov 24, 2006 9:07 am

not even executing via cron ? thats a strange one
Try this

Code: Select all

echo "00 * * * *   root    /path/to/imap-sa-learn-debug.pl" >> /etc/crontab
/etc/init.d/cron restart


that will execute the script every hour on the hour, let me know how that goes
User avatar
suhasingale
Posts: 298
Joined: Mon Nov 13, 2006 2:30 pm
Location: India
Contact:

Postby suhasingale » Fri Nov 24, 2006 9:11 am

Let me try that.
User avatar
suhasingale
Posts: 298
Joined: Mon Nov 13, 2006 2:30 pm
Location: India
Contact:

Postby suhasingale » Fri Nov 24, 2006 8:27 pm

It seems to be working now.

Good to see you as a moderator. Congrats! :wink:
User avatar
jordant
Posts: 218
Joined: Sat Sep 16, 2006 2:48 pm
Location: Perth, Western Australia

Postby jordant » Sat Nov 25, 2006 3:49 am

Thanks!
ordoghl
Posts: 2
Joined: Wed Jan 03, 2007 10:35 am

Subroutine redefined warnings in imap-sa-learn.pl

Postby ordoghl » Wed Jan 03, 2007 10:42 am

Hi,

I configured the script and it seems to work but it produces "Subroutine ... redefined" warnings on every processed message:

Code: Select all

 
...
Learning on ham message 8
Subroutine new redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 97.
Subroutine _get_images redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 222.
Subroutine image_named redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 259.
Subroutine image_count redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 275.
Subroutine pixel_coverage redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 291.
Subroutine image_to_text_ratio redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 307.
Subroutine image_size_exact redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 329.
Subroutine image_size_range redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 345.
Subroutine result_check redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 373.
Learned tokens from 0 message(s) (1 message(s) examined)
Deleting Ham (normal email) Message 8

Now rebuilding the Bayesian filters
Subroutine new redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 97.
Subroutine _get_images redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 222.
Subroutine image_named redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 259.
Subroutine image_count redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 275.
Subroutine pixel_coverage redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 291.
Subroutine image_to_text_ratio redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 307.
Subroutine image_size_exact redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 329.
Subroutine image_size_range redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 345.
Subroutine result_check redefined at /usr/mailcleaner/share/spamassassin/plugins/ImageInfo.pm line 373.
mailcleaner:/etc/cron.hourly#


Is this normal?
I'm using the the latest 2006111701 patch.

Thanks in advance,
--Laszlo Ordogh
olivier
Posts: 1348
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Postby olivier » Wed Jan 03, 2007 10:49 am

the inclusion of the ImageInfo plugin appeared twice (maybe in /usr/mailcleaner/share/spamassassin and /usr/mailcleaner/etc/mailscanner/).
The messages are annoying, but should not affect the process.
bret
Posts: 2
Joined: Sun Jan 14, 2007 4:16 pm

can't use (dot) extensions in cron dir on Deb box

Postby bret » Sun Jan 14, 2007 5:01 pm

jordant wrote:not even executing via cron ? thats a strange one
Try this

Code: Select all

echo "00 * * * *   root    /path/to/imap-sa-learn-debug.pl" >> /etc/crontab
/etc/init.d/cron restart


that will execute the script every hour on the hour, let me know how that goes



By default, any files named with a 'dot' extension do not get executed by cron. If you write/have a script that you would like to run periodically under cron then be sure to name it with ONLY upper and lower case characters.

You can list which scripts will be executed within the /etc/cron.daily directory with the run-parts command:

$ run-parts --test /etc/cron.daily

I am not that smart...just had the same problem when I first started using Debian!

Great work Jordan and Mailcleaner team...we love it :D
Bret
coolzer0
Posts: 8
Joined: Thu Jan 11, 2007 10:02 am

Getting Imap SALearn File

Postby coolzer0 » Tue Jan 16, 2007 10:51 am

I have tried numerous times to try and download the files created by jordant but to no prevail i wondered if anyone else has had a problem ??

Or is there anywhere else i maybe able to obtain them from??

Eagerly Awaiting a Response



Regards

Wayne
User avatar
jordant
Posts: 218
Joined: Sat Sep 16, 2006 2:48 pm
Location: Perth, Western Australia

Postby jordant » Mon Jan 22, 2007 4:21 am

I can see hundreds of access logs from IP's all over the world, so it must be something at your end or your ISP's end. can you do a traceroute to noc.lindentech.com.au and post the results here thanks
coolzer0
Posts: 8
Joined: Thu Jan 11, 2007 10:02 am

Postby coolzer0 » Wed Jan 24, 2007 9:51 pm

Here is the trace route as requested


1 1 ms <1 ms 1 ms 192.168.100.10
2 3 ms 27 ms 27 ms host-213-253-132-69.no-dns.as5587.net [213.253.132.69]
3 28 ms 26 ms 26 ms lon-router1.zetnet.net [194.247.40.65]
4 28 ms 28 ms 27 ms fa0-16.sw1.f1i14.iph.lon.as5587.net [213.253.132.74]
5 29 ms 29 ms 28 ms 821.gi0-1.rtr2.iph.lon.as5587.net [195.13.89.17]
6 30 ms 29 ms 29 ms vlan900.g0-2-0.rtr5.thn.lon.as5587.net [213.253.141.10]
7 32 ms 43 ms 29 ms linx1.ix.singtel.com [195.66.224.122]
8 31 ms 30 ms 29 ms 203.208.154.22
9 203.208.154.133 reports: Destination net unreachable.

Regards

Wayne
the_fbi
Posts: 49
Joined: Sat Dec 09, 2006 11:28 am
Location: Oxfordshire, UK

Re: Getting Imap SALearn File

Postby the_fbi » Wed Jan 24, 2007 11:04 pm

coolzer0 wrote:I have tried numerous times to try and download the files created by jordant but to no prevail i wondered if anyone else has had a problem ??

Or is there anywhere else i maybe able to obtain them from??

Eagerly Awaiting a Response

Regards

Wayne

URL works fine for me.

If you need it then its also at http://www.megablade.co.uk/mc/imap-sa-l ... g.renameme

You'll need to rename the extension to .pl (after getting it). (weird the apache config on that doesn't let you get it as a .pl)
coolzer0
Posts: 8
Joined: Thu Jan 11, 2007 10:02 am

Postby coolzer0 » Thu Jan 25, 2007 1:06 pm

thank you very much for posting the file, i am looking forward to implementin g it into my system

Thanks to jordant for editing the script for it to work with mailcleaner
Thanks to the_fbi for kindly making the script available for me to dl


Kinds Regards

Wayne

PS thanks for all you help

Return to “Tips”

Who is online

Users browsing this forum: No registered users and 2 guests