The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to install MailWatch for MailScanner?

Discussion in 'E-mail Discussions' started by shaky, Mar 30, 2004.

  1. shaky

    shaky Well-Known Member

    Joined:
    May 31, 2003
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    I installed MailScanner from Layer1, and have stumbled upon MailWatch http://mailwatch.sourceforge.net/

    This script looks great anyone have a "cpanel how to" install MailWatch after installing MailScanner fromLayer1?

    Many Thanks.
     
  2. shaky

    shaky Well-Known Member

    Joined:
    May 31, 2003
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    Anyone using MailWatch?
     
  3. fizz

    fizz Well-Known Member

    Joined:
    Jan 25, 2002
    Messages:
    202
    Likes Received:
    0
    Trophy Points:
    16
    looks nice, wouldnt mind seeing a howto :)
     
  4. shaky

    shaky Well-Known Member

    Joined:
    May 31, 2003
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    Yeah, I'm sure it's fairly easy to install probably a few lines of command in SSH but not really sure of the step-bystep process for cpanel config.
     
  5. fizz

    fizz Well-Known Member

    Joined:
    Jan 25, 2002
    Messages:
    202
    Likes Received:
    0
    Trophy Points:
    16
    Ive got it installed, but have one problem..
    # I keep getting the error 'MySQL server has gone away' in the mail logs since I installed MailWatch, how do I fix this?

    According to thier FAQ: This is caused by using the latest version of Perl DBD-MySQL (2.9002 at the time of writing), downgrade to version 2.1028 which you can get from here and this will fix the problem.

    However i downloaded this module, and installed, but still have the problem.
     
  6. fizz

    fizz Well-Known Member

    Joined:
    Jan 25, 2002
    Messages:
    202
    Likes Received:
    0
    Trophy Points:
    16
    Well, got everything workin, but I dont see a huge reason to use this as most of the functionality of this problem is built into WHM. It does have a few nice features such as virus trending and more detailed reports, but sending by volumn, and amount and received and what not is alrready part of WHM. Just my .02
     
  7. shaky

    shaky Well-Known Member

    Joined:
    May 31, 2003
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    Shame I was hoping it would be a strong GUI report and analysis program for MailScanner.

    Would you be kind enough to post a step-by-step SSH instructions on how to install this on cpanel, so I can check it out on my own server?

    Thanks for your help fizz.
     
  8. fizz

    fizz Well-Known Member

    Joined:
    Jan 25, 2002
    Messages:
    202
    Likes Received:
    0
    Trophy Points:
    16
    Wont be huge in detail, but here goes,,
    ssh to your box
    wget the file from the site and untar

    mysql -uroot -p'yourpass' < create.sql
    mysql -uroot -p'yourpass' mailscanner
    GRANT ALL ON mailscanner.* TO mailwatch@localhost IDENTIFIED BY 'yourpass'

    Next, edit the MailWatch.pm and put in yout db details like this

    # Modify this as necessary for your configuration
    my($db_name) = "mailscanner";
    my($db_host) = "localhost";
    my($db_user) = "root";
    my($db_pass) = "yourpass";

    Save, and move to /usr/mailscanner/lib/MailScanner
    Next, Edit CustomConfig.pm and add the following to the top of the file just beneath the line that starts '$VERSION = substr...':

    require 'MailScanner/MailWatch.pm';

    Code:
    ### The package version, both in 1.23 style *and* usable by MakeMaker:
    $VERSION = substr q$Revision: 1.3.2.8 $, 10;
    require 'MailScanner/MailWatch.pm';
    

    Next, we need to insert a user for MailWatch
    mysql -uroot -p'yourpass' mailscanner
    INSERT INTO users VALUES ('mailwatch',md5('yourpass'),'MailWatch','A');
    quit

    Next, move the mailscanner dir (from the mailwatch tar file) to a public www.
    - Check the permissions of /var/www/html/mailscanner/images and /var/www/html/images/cache - they should be ug+rwx and owned by root and in the same group as the web server user (apache on R$

    # chown root:apache images
    # chmod ug+rwx images
    # chown root:apache images/cache
    # chmod ug+rwx images/cache

    - Create conf.php by copying conf.php.example and edit the values to suit, you will need to set DB_USER and DB_PASS to the MySQL user and password that you created earlier.

    # cp conf.php.example conf.php
    pico conf.php and insert the SQL details (user=root, pass=yourpass, db=mailscanner(

    Edit your MailScanner.conf (pico /usr/mailscanner/etc/MailScanner.conf)

    Search with (ctrl+w)
    Always Looked Up Last = &MailWatchLogging
    Detailed Spam Report = yes
    Quarantine Whole Message = yes
    Quarantine Whole Message As Queue Files = no
    Include Scores In SpamAssassin Report = yes
    Quarantine User = root
    Quarantine Group = apache (this should be the same group as your web server)
    Quarantine Permissions = 0660

    Now, goto http://www.yoursite.com/mailscanner
    it will prompt you for the user/pass
    user=mailwatch
    pass=yourpass


    That should do it.
     
  9. fizz

    fizz Well-Known Member

    Joined:
    Jan 25, 2002
    Messages:
    202
    Likes Received:
    0
    Trophy Points:
    16
    Only problem ive run into, is that cpanel auto updated dbd-mysql package thus breaking mailwatch. The author of this program really needs to fix the program to keep up with the new :)
     
  10. shaky

    shaky Well-Known Member

    Joined:
    May 31, 2003
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for checking it out and letting the forum know ;)
     
  11. fizz

    fizz Well-Known Member

    Joined:
    Jan 25, 2002
    Messages:
    202
    Likes Received:
    0
    Trophy Points:
    16
    Im afraid i didnt encounter that.. Where abouts are you getting the need for that and what error?
     
  12. shaky

    shaky Well-Known Member

    Joined:
    May 31, 2003
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    Thaphantom did you find a fix for the:

    Thx.
     
  13. VultureCP

    VultureCP Member

    Joined:
    Mar 23, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    I was able to get everything installed after upgrading perl, and downgrading DBD. However I have one last problem.

    When I click quarantine I get "Cannot open directory: /var/spool/MailScanner/quarantine." My apache runs from user/group nobody. MailScanner runs from user: mailnull group: nobody. In fix_qauarantine_permissions I have GROUP=nobody, DIRMODE=0770, FILEMODE=0660. The quarantine dir and files inside are all set according to the fix script. Any help would be appreciated.
     
  14. cwihost

    cwihost Member

    Joined:
    Sep 9, 2001
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    6
    I am having a problem with releasing the messages from the quarantine. In MailWatch it says

    Release: error

    I can delete messages from Quarantine OK. Any Ideas?
     
  15. perlchild

    perlchild Well-Known Member

    Joined:
    Sep 1, 2002
    Messages:
    279
    Likes Received:
    0
    Trophy Points:
    16
    I had something similar, until I ran the fix_quiarantine_permissions script that comes with mailwatch.
    I didn't follow the howto(just saw it AFTER I installed) but the installation was relatively painless even without it.
     
  16. perlchild

    perlchild Well-Known Member

    Joined:
    Sep 1, 2002
    Messages:
    279
    Likes Received:
    0
    Trophy Points:
    16
    Actually, since the bug is in the dbd-package, perhaps that's where the fix should be applied.
    Either that, or find some way to prevent cpanel from updating automatically
     
  17. seeyes

    seeyes Well-Known Member

    Joined:
    Sep 12, 2003
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
  18. areha

    areha Well-Known Member

    Joined:
    Oct 30, 2002
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    The mailer starts fine, and says that databae connection works. Is it something wrong with my configuration?


    %report-dir% /etc/MailScanner/reports/en
    %etc-dir% /etc/MailScanner
    %rules-dir% /etc/MailScanner/rules
    Max Children 10
    Run As User mailnull
    Run As Group mail
    Queue Scan Interval 3
    Incoming Queue Dir /var/spool/exim

    Warning: is_file(): Stat failed for /var/spool/exim/input (errno=13 - Permission denied) in /home/myuser/public_html/mailscanner/msconfig.php on line 42

    Outgoing Queue Dir /var/spool/exim/input

    Incoming Work Dir /var/spool/MailScanner/incoming

    Quarantine Dir /var/spool/MailScanner/quarantine

    PID file /var/run/MailScanner.pid
    Restart Every 14400
    MTA exim
    Sendmail /usr/sbin/exim -C /etc/exim_outgoing.conf -oMr MailScanner
    Sendmail2 /usr/sbin/exim -C /etc/exim_outgoing.conf
    Max Unscanned Bytes Per Scan 100000000
    Max Unsafe Bytes Per Scan 50000000
     
  19. abubin

    abubin Well-Known Member

    Joined:
    Dec 7, 2004
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    i too have this error :

    Cannot open directory: /var/spool/MailScanner/quarantine

    I have tried changing MailScanner.conf to use user:mailnull group:nobody.
    Tried changing fix_quarantine_permissions to group:nobody still doesn't work


    Anyone can help?
     
  20. aloysiusf

    aloysiusf Registered

    Joined:
    Jul 21, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    hello guys,

    i just follow the mailwatch installation guide and i got this error when i log in

    Warning: db_colorised_table(Mail/mimeDecode.php): failed to open stream: No such file or directory in /home/mysite/public_html/mailscanner/functions.php on line 1014

    Fatal error: db_colorised_table(): Failed opening required 'Mail/mimeDecode.php' (include_path='.:/var/www/html/mailscanner/pear:/var/www/html/mailscanner/fpdf:/var/www/html/mailscanner/xmlrpc') in /home/mysite/public_html/mailscanner/functions.php on line 1014

    am i suppost the put the file somewhere else?
     
Loading...

Share This Page