Quarantine Report

Report bugs and workarounds
Post Reply
b19wll
Posts: 58
Joined: 22 Nov 2012 09:55

Quarantine Report

Post by b19wll »

Hello

I have edited the report so it only lists 1 day(s) worth of spam. I have also edited the quranatine_report.php so it only lists spam and not legit emails. Since doing this I am no longer getting the daily report :(

I have looked under cron jobs and cant see the command that would trigger the report, I wanted to try running it manually to see if I could spot what the problem was.

Can anyone help?


Thanks


Will
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Quarantine Report

Post by shawniverson »

You have a typo most likely somewhere in your quarantine_report.php
b19wll
Posts: 58
Joined: 22 Nov 2012 09:55

Re: Quarantine Report

Post by b19wll »

This is what I have edited in that file

Code: Select all

AND 
 a.date >= DATE_SUB(CURRENT_DATE(), INTERVAL ".QUARANTINE_REPORT_DAYS." DAY)
AND
 a.isspam>0
ORDER BY a.date DESC, a.time DESC";
I have not changed anything else in the file?
b19wll
Posts: 58
Joined: 22 Nov 2012 09:55

Re: Quarantine Report

Post by b19wll »

It might be connected, but I have also just noticed that the inline signatures are no longer being stamped on the emails?
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Quarantine Report

Post by shawniverson »

hmmm...it looks okay.

Run it and see what happens...as root

sudo /usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_report.php



Also, do me a favor and run through EFA-Configure and double check your spam settings are set the way you want them.
b19wll
Posts: 58
Joined: 22 Nov 2012 09:55

Re: Quarantine Report

Post by b19wll »

Hello

This is what I get when I run that command

Code: Select all

[admin@tower4 ~]$ sudo /usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_report.php
/usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_report.php: line 3: ?php: No such file or directory
/usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_report.php: line 5: /bin: is a directory
/usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_report.php: line 6: MailWatch: command not found
/usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_report.php: line 7: syntax error near unexpected token `C'
/usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_report.php: line 7: ` Copyright (C) 2003  Steve Freegard (smf@f2s.com)'
Also When I run EFA-Configure I get command not found?

Thanks


Will
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Quarantine Report

Post by shawniverson »

Yep you have problems with your quarantine_report.php

Your file should start with the following lines.

Code: Select all

#!/usr/bin/php -q
<?php

/*
 MailWatch for MailScanner
 Copyright (C) 2003  Steve Freegard (smf@f2s.com)

For EFA-Configure:

Code: Select all

sudo /usr/local/sbin/EFA-Configure
b19wll
Posts: 58
Joined: 22 Nov 2012 09:55

Re: Quarantine Report

Post by b19wll »

Great that's fixed one of the problems :)
I had a blank line above #!/usr......

Code: Select all

#!/usr/bin/php -q
<?php
I will look at the EFA-Configure now


Thanks

Will
b19wll
Posts: 58
Joined: 22 Nov 2012 09:55

Re: Quarantine Report

Post by b19wll »

After running through EFA-Configure again my inline sigs are now working again.

Thanks for your help.

One more quick question, what is the trigger for /usr/local/bin/mailwatch/tools/Cron_jobs/quarantine_report.php to be ran?

Thanks


Will
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Quarantine Report

Post by shawniverson »

/etc/cron.daily/mailwatch

:whistle:
b19wll
Posts: 58
Joined: 22 Nov 2012 09:55

Re: Quarantine Report

Post by b19wll »

Good news, the quarantine report was sent early this morning at 04:00am and then again at 04:01am and 04:02am and every minute upto 04:59am

Please help?


Thanks


Will
b19wll
Posts: 58
Joined: 22 Nov 2012 09:55

Re: Quarantine Report

Post by b19wll »

I hope I have found the problem

the cron job was set to run as below

Mins = All
Hours = 4
Days = All
Months = all
Weekdays = All

I have now changed the Mins to = 0

Will wait and see what happens tomorrow morning.

Will
colin
Posts: 99
Joined: 13 Feb 2014 16:09

Re: Quarantine Report

Post by colin »

I only ever want to see spam in the quarantine report. Why would you want to see non-spam?
I also change the report to only include the last day only by editing /var/www/html/mailscanner/conf.php as follows:

change
define(QUARANTINE_REPORT_DAYS, 7);
to
define(QUARANTINE_REPORT_DAYS, 1);

Would it be possible to have this as a default? I can see no reason why you would want to be told day after day what the last seven days contained.
Thanks
Colin
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Quarantine Report

Post by shawniverson »

Yep this is coming in the next update.

:mrgreen:
User avatar
Socal_Steve
Posts: 30
Joined: 20 Mar 2014 20:10
Location: Laguna Beach, California, USA
Contact:

Re: Quarantine Report

Post by Socal_Steve »

colin wrote:I only ever want to see spam in the quarantine report. Why would you want to see non-spam?
I also change the report to only include the last day only by editing /var/www/html/mailscanner/conf.php as follows:

change
define(QUARANTINE_REPORT_DAYS, 7);
to
define(QUARANTINE_REPORT_DAYS, 1);

Would it be possible to have this as a default? I can see no reason why you would want to be told day after day what the last seven days contained.
Thanks
Colin
How did you change the report to only show spam? much appreciated. never mind fixed it see below

STEVE
Last edited by Socal_Steve on 08 May 2014 22:28, edited 2 times in total.
User avatar
Socal_Steve
Posts: 30
Joined: 20 Mar 2014 20:10
Location: Laguna Beach, California, USA
Contact:

Re: Quarantine Report

Post by Socal_Steve »

b19wll wrote:This is what I have edited in that file

Code: Select all

AND 
 a.date >= DATE_SUB(CURRENT_DATE(), INTERVAL ".QUARANTINE_REPORT_DAYS." DAY)
AND
 a.isspam>0
ORDER BY a.date DESC, a.time DESC";
I have not changed anything else in the file?

The

Code: Select all

AND
 a.isspam>0 
worked for me to make the report only show spam.

Thanks
Post Reply