Cannot open Mailwatch

Report bugs and workarounds
Post Reply
cguarisco
Posts: 6
Joined: 11 Jul 2017 11:09

Cannot open Mailwatch

Post by cguarisco »

I've updated to version 3.0.2.3 without errors, but now the web interface is not opening.

When i open with the browser the ip address on the machine where EFA is installed, it redirects me to https://EFA/mailscanner/status.php and show text instead of the page:

Code: Select all

// Define MailWatch logo name define('MW_LOGO', 'mailwatch-logo.png'); // Define language (de, en, fr, it, nl, pt_br); // See http://www.lingoes.net/en/translator/langcode.htm define('LANG', 'en'); // Optional: If USER_SELECTABLE_LANG is defined and the value contains more than one language then the user gets a dropdown // in the gui to change the language of his browser. The selectable languages are defined as a comma separated list. //define('USER_SELECTABLE_LANG', 'de,en,fr,it,nl,pt_br'); // Session Handling - conflicts can exist when the your environment makes use of multiple php sessions on the same server // to resolve this, uncomment the following option. See https://github.com/mailwatch/MailWatch/issues/730 for more info // define('SESSION_NAME', 'MailWatch'); // Session Timeout - Sets the global session timeout value, default is 600 sec (10 minutes) if not defined // Range is 0 to 99999 seconds. Setting to 0 will disable session timeout and active session statuses. // This can also be set individually per user in the MailWatch GUI for greater flexibility. //define('SESSION_TIMEOUT', 600); // Greylisting menu item define('SHOW_GREYLIST', false); // Hide Unknown Mail from quarantine reports define('HIDE_UNKNOWN', false); //Quarantine Auto Release //Set true to allow auto release of quarantined items from quarantine report define('AUTO_RELEASE', false); //Give Domain Admins ability to release dangerous content, like viruses define('DOMAINADMIN_CAN_RELEASE_DANGEROUS_CONTENTS', false); define('DOMAINADMIN_CAN_SEE_DANGEROUS_CONTENTS', false); /* Password Reset */ // Give users the ability to reset a forgotten password. define('PWD_RESET', false); // Number of hours link is valid for. define('RESET_LINK_EXPIRE',1); // Set the following 2 variables (and uncomment) if you wish to define // an alternative sender name and address for password resets. // NOTE: Both must be set, otherwise it will use the default settings. // define('PWD_RESET_FROM_NAME', 'Some other name'); // Set if you wish reset email sent from alternative name. // define('PWD_RESET_FROM_ADDRESS', 'support@yourdomain.com'); // Set is you wish reset email sent from alternative address. /* End Password Reset */ The following conf.php mandatory entries are missing, check and compare your conf.php with conf.php.example.
- ALLOWED_TAGS
- AUDIT
- AUDIT_DAYS_TO_KEEP
- AUTO_RELEASE
- CACHE_DIR
- DATE_FORMAT
- DB_DSN
- DB_HOST
- DB_NAME
- DB_PASS
- DB_TYPE
- DB_USER
- DEBUG
- DISPLAY_IP
- DISTRIBUTED_SETUP
- DOMAINADMIN_CAN_RELEASE_DANGEROUS_CONTENTS
- DOMAINADMIN_CAN_SEE_DANGEROUS_CONTENTS
- FILTER_TO_ONLY
- FROMTO_MAXLEN
- HIDE_HIGH_SPAM
- HIDE_NON_SPAM
- HIDE_UNKNOWN
- IMAGES_DIR
- LDAP_DN
- LDAP_EMAIL_FIELD
- LDAP_FILTER
- LDAP_HOST
- LDAP_MS_AD_COMPATIBILITY
- LDAP_PASS
- LDAP_PORT
- LDAP_PROTOCOL_VERSION
- LDAP_SITE
- LDAP_SSL
- LDAP_USER
- LDAP_USERNAME_FIELD
- LISTS
- MAIL_LOG
- MAILWATCH_HOME
- MAILWATCH_MAIL_HOST
- MAILWATCH_MAIL_PORT
- MAILWATCH_FROM_ADDR
- MAILWATCH_HOSTURL
- MAX_RESULTS
- MEMORY_LIMIT
- MS_CONFIG_DIR
- MS_EXECUTABLE_PATH
- MS_LIB_DIR
- MS_LOG
- MS_SHARE_DIR
- MSRE
- MSRE_RELOAD_INTERVAL
- MSRE_RULESET_DIR
- MW_LOGO
- PROXY_PASS
- PROXY_PORT
- PROXY_SERVER
- PROXY_TYPE
- PROXY_USER
- QUARANTINE_DAYS_TO_KEEP
- QUARANTINE_FILTERS_COMBINED
- QUARANTINE_MSG_BODY
- QUARANTINE_REPORT_DAYS
- QUARANTINE_REPORT_FROM_NAME
- QUARANTINE_REPORT_SUBJECT
- QUARANTINE_SENDMAIL_PATH
- QUARANTINE_SUBJECT
- QUARANTINE_USE_FLAG
- QUARANTINE_USE_SENDMAIL
- RECORD_DAYS_TO_KEEP
- RESOLVE_IP_ON_DISPLAY
- RPC_ALLOWED_CLIENTS
- RPC_ONLY
- RPC_RELATIVE_PATH
- SA_DIR
- SA_MAXSIZE
- SA_PREFS
- SA_RULES_DIR
- SHOW_DOC
- SHOW_MORE_INFO_ON_REPORT_GRAPH
- SHOW_SFVERSION
- SSL_ONLY
- STATUS_REFRESH
- STRIP_HTML
- SUBJECT_MAXLEN
- TEMP_DIR
- TIME_FORMAT
- TIME_ZONE
- TTF_DIR
- USE_LDAP
- USE_PROXY
- VIRUS_INFO
- DISPLAY_VIRUS_REPORT
Any idea on how to fix this?
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Cannot open Mailwatch

Post by shawniverson »

Hmm...very odd. How do things look in /var/www/html/mailscanner? Is conf.php ok and intact?
cguarisco
Posts: 6
Joined: 11 Jul 2017 11:09

Re: Cannot open Mailwatch

Post by cguarisco »

Nope. It was completely erased.
I tried to restore the old conf.php but it does not work anyway.
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Cannot open Mailwatch

Post by shawniverson »

Have you looked in /var/EFA/backup ?
cguarisco
Posts: 6
Joined: 11 Jul 2017 11:09

Re: Cannot open Mailwatch

Post by cguarisco »

Yep, but all the version of the files present here are not working.
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: Cannot open Mailwatch

Post by pdwalker »

Did you save the log of your update? I'm curious to see if there were any error messages during the process which might provide a hint.
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: Cannot open Mailwatch

Post by pdwalker »

add this to a file called test.php in /var/www/html/

Code: Select all

<?php
phpinfo();
?>
then access the following url: http://<EFA>/test.php

Do you get something that starts with the following?
Screen Shot 2017-07-21 at 11.42.png
Screen Shot 2017-07-21 at 11.42.png (12.84 KiB) Viewed 8747 times
From what I see, your browser is showing you the contents of your conf.php file which either means php is not enabled with apache, or something else.

The above test will rule out an obvious php problem.

Oh, run this command next from the shell

Code: Select all

file /var/www/html/mailscanner/conf.php
You should get the following answer
[root@efa mailscanner]# file conf.php
conf.php: PHP script text
cguarisco
Posts: 6
Joined: 11 Jul 2017 11:09

Re: Cannot open Mailwatch

Post by cguarisco »

pdwalker wrote: 21 Jul 2017 03:45 add this to a file called test.php in /var/www/html/

Code: Select all

<?php
phpinfo();
?>
then access the following url: http://<EFA>/test.php

Do you get something that starts with the following?
Screen Shot 2017-07-21 at 11.42.png

From what I see, your browser is showing you the contents of your conf.php file which either means php is not enabled with apache, or something else.

The above test will rule out an obvious php problem.

Oh, run this command next from the shell

Code: Select all

file /var/www/html/mailscanner/conf.php
You should get the following answer
[root@efa mailscanner]# file conf.php
conf.php: PHP script text
Where is the log of the updates?

Also, the phpinfo returned version PHP Version 5.3.3.

This is the answer of "file /var/www/html/mailscanner/conf.php":
conf.php: ASCII C++ program text
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: Cannot open Mailwatch

Post by pdwalker »

The phpinfo() test means your apache/php installation should be working correctly.

The file command should return the following:
/var/www/html/mailscanner/conf.php: PHP script text

Since it doesn't, there might be something wrong with the format of your config.php. There should be an example config file called conf.php.example. Try the file command on that and see if your results are any different.

After that, either you'll have to email the file to someone to check, or try to diagnose the problem yourself.

Good luck!
cguarisco
Posts: 6
Joined: 11 Jul 2017 11:09

Re: Cannot open Mailwatch

Post by cguarisco »

pdwalker wrote: 24 Jul 2017 09:40 The phpinfo() test means your apache/php installation should be working correctly.

The file command should return the following:
/var/www/html/mailscanner/conf.php: PHP script text

Since it doesn't, there might be something wrong with the format of your config.php. There should be an example config file called conf.php.example. Try the file command on that and see if your results are any different.

After that, either you'll have to email the file to someone to check, or try to diagnose the problem yourself.

Good luck!
Yeah, as i said before the conf.php was completely erased. The old backup is not working since there are many missing fields.
If i add these fields, the system is not working anyway.
I think that the update process will also automatically update the conf.php file, but something wen twrong.. Anyone with the same issue?
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: Cannot open Mailwatch

Post by pdwalker »

Can you send me the contents of your conf.php file? It shouldn't be hard to fix.
cguarisco
Posts: 6
Joined: 11 Jul 2017 11:09

Re: Cannot open Mailwatch

Post by cguarisco »

pdwalker wrote: 25 Jul 2017 04:47 Can you send me the contents of your conf.php file? It shouldn't be hard to fix.
Add the php header before and after the code on my first post, that's my new conf.php file.


If i take a really old backup, and define default values for the tag that says are not dfined, it shows a blank page with no errors on error.log or whatsoever (yes, i modified the httpd.conf in order to display php errors log)

For now, the solution is keeping an old version without updating that, while installing a fresh new version and swap during the next weekend.
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: Cannot open Mailwatch

Post by pdwalker »

Yeah, here is my suggestion:

Take a working copy of the conf.php, and update it with the values. The file above, even with the php headers added back is not quite right and it would be faster to fix up a good copy than try to fix the bad one.
Post Reply