Own install - SG will not log

Use this forum to get help.

Own install - SG will not log

Postby Smo » Wed Jan 22, 2020 12:17 am

Hi there,

want to install spamgourmet on an own server. I used the guide from viewtopic.php?f=2&t=1703#
Got the sourcecode from: https://github.com/spamgourmet/spamgourmet-clone.git
Will use existing sendmail instead of exim.

I can access the sg site at my domain, but registration does not work. Wantet to look into the debug log, but sg doesnt write a logfile. The log directory is configured in /etc/spamgourmet/spamgourmet.config. Pointed the logdir to /tmp, to avoid every permission errors. No logfile will appear.

Code: Select all
# use these variables to indicate whether debug statements should be output
  $debugmode = 1; # 1 for on, 0 for off
  $debugfilename = '/tmp/spamgourmet.config'; # full path to debug output file


I get some errors in Apaches error log, maybe there is something to find?

Code: Select all
readdir() attempted on invalid dirhandle DIR at /usr/local/lib/spamgourmet/modules/Mail/Spamgourmet/Dialogs.pm line 50.
Use of uninitialized value in concatenation (.) or string at /var/www-spamgourmet/index.pl line 884.
Use of uninitialized value $stats{"forwardcount"} in concatenation (.) or string at /var/www-spamgourmet/index.pl line 1451.
Use of uninitialized value $stats{"spamcount"} in concatenation (.) or string at /var/www-spamgourmet/index.pl line 1472.
Use of uninitialized value $stats{"counterID"} in concatenation (.) or string at /var/www-spamgourmet/index.pl line 1491.
Use of uninitialized value $stats{"todaycount"} in concatenation (.) or string at /var/www-spamgourmet/index.pl line 1492.
Use of uninitialized value $stats{"todayforwarded"} in concatenation (.) or string at /var/www-spamgourmet/index.pl line 1493.
syswrite() on closed filehandle FILE at /var/www-spamgourmet/index.pl line 1496.
Use of uninitialized value in concatenation (.) or string at /var/www-spamgourmet/index.pl line 1040.
CGI::param called in list context from /usr/local/lib/spamgourmet/modules/Mail/Spamgourmet/Session.pm line 235, this can lead to vulnerabilities. See the warning in "Fetching the value or values of a single named parameter" at /usr/share/perl5/CGI.pm line 412.
Use of uninitialized value $instr in substitution (s///) at /usr/local/lib/spamgourmet/modules/Mail/Spamgourmet/WebUtil.pm line 89.
Use of uninitialized value $instr in substitution (s///) at /usr/local/lib/spamgourmet/modules/Mail/Spamgourmet/WebUtil.pm line 90.
Use of uninitialized value $instr in substitution (s///) at /usr/local/lib/spamgourmet/modules/Mail/Spamgourmet/WebUtil.pm line 91.
Use of uninitialized value $instr in substitution (s///) at /usr/local/lib/spamgourmet/modules/Mail/Spamgourmet/WebUtil.pm line 92.
Use of uninitialized value $instr in substitution (s///) at /usr/local/lib/spamgourmet/modules/Mail/Spamgourmet/WebUtil.pm line 93.
Use of uninitialized value $instr in substitution (s///) at /usr/local/lib/spamgourmet/modules/Mail/Spamgourmet/WebUtil.pm line 94.
Use of uninitialized value $instr in substitution (s///) at /usr/local/lib/spamgourmet/modules/Mail/Spamgourmet/WebUtil.pm line 95.
Use of uninitialized value $instr in substitution (s///) at /usr/local/lib/spamgourmet/modules/Mail/Spamgourmet/WebUtil.pm line 96.
Use of uninitialized value $instr in substitution (s///) at /usr/local/lib/spamgourmet/modules/Mail/Spamgourmet/WebUtil.pm line 97.
Use of uninitialized value $instr in substitution (s///) at /usr/local/lib/spamgourmet/modules/Mail/Spamgourmet/WebUtil.pm line 98.
Use of uninitialized value $instr in substitution (s///) at /usr/local/lib/spamgourmet/modules/Mail/Spamgourmet/WebUtil.pm line 99.


Thank you very much for any help.
Smo
 
Posts: 4
Joined: Tue Jan 21, 2020 11:58 pm

Re: Own install - SG will not log

Postby Smo » Wed Jan 22, 2020 10:10 pm

Enabled Captchaserv, which was disabled yesterday seems to cause something to happen.

If i try to sign up, captcha comes up and seem to function.
Also now a new record is written into db:

Code: Select all
CounterID   CountDate   Num Forwarded       NewUsers   WeekDay   NumDeleted
3128          2020-01-22   0                              2                 0         0


So, SG writes now into db that 2 new users had signed up. But, the table users, and all other (except dialogs) is empty.
Also still no logfile exist, and the errors in apaches error log are the same.
Smo
 
Posts: 4
Joined: Tue Jan 21, 2020 11:58 pm

Re: Own install - SG will not log

Postby Smo » Wed Jan 22, 2020 11:33 pm

Next step forward: changed the length of the field "password" in table users to 256, now a user is created in DB.
Get confirmation mail which points to http://www.spamgourmet.com instead of my domain, but confirmation seems to work after manually entering the right address.

So , i changed every instance of spamgourmet.com into my domain in /usr/local/lib/spamgourmet and in the /var/www directory
Code: Select all
OLDIFS=$IFS;IFS=$'\n';for f in `grep -rl spamgourmet.com`;do sed -i 's/spamgourmet.com/MYDOMA:IM/g' $f;done;IFS=$OLDIFS
Smo
 
Posts: 4
Joined: Tue Jan 21, 2020 11:58 pm

Re: Own install - SG will not log

Postby josiah » Wed Jan 29, 2020 9:23 pm

Don’t want to leave you in the dark, I’m learning this with you.

I appreciate your spinning up your own instance.

Josh (my dad) told me the version on sourceforge is quite outdated, maybe as a litmus test see if the password column in the data table uses blowfish. He had migrated over I believe to blowfish salted encryption and automatically updated the entry for a user whenever logging into the webportal.
I feel like this change was 2017 or 2018

I’ll take a look at how it logs when I’m available.

For whitelist forwarding domains, it’s currently a perl vector at the top of ./mail/spamgourmet.conf (EDIT: NOT ./web/spamgourmet.conf) in the operating code, there are multiple instances of this file in other directories, but I have inferred them to be outdated and inactive.

Let me know how your deployment goes!

Josiah
Last edited by josiah on Thu Jan 30, 2020 1:37 am, edited 1 time in total.
josiah
 
Posts: 28
Joined: Sat Aug 31, 2019 9:32 pm

Re: Own install - SG will not log

Postby josiah » Thu Jan 30, 2020 1:34 am

Additionally, some perl packages for that version on sourceforge may be broken with a more recent package repo tree. We’re talking Debian 6 there. When we updated exim4 back in August, we needed to update to debian 9 and backport. A perl dependency was broken in the process, and Josh fixed it somehow, cannot exactly remember. I think the package was crypto related.
Could this be the issue you’re running into here?
josiah
 
Posts: 28
Joined: Sat Aug 31, 2019 9:32 pm

Re: Own install - SG will not log

Postby Smo » Mon Feb 03, 2020 2:52 pm

Hi Josiah,

thank you for taking time in these hard times. I had a crypto related error, but i could fix it. I managaed to get a partly working installation. The only thing i struggle with is SG does not write new addresses into db. If i write the addresses manually into db, SG reads the entry and also updates the counter for this entry. Forwarding mail also works fine, only writing this entry for new addresses driving me crazy. But, i find it out :)
Smo
 
Posts: 4
Joined: Tue Jan 21, 2020 11:58 pm


Return to Support / Hilfe / ayuda / ondersteuning / ...

Who is online

Users browsing this forum: No registered users and 18 guests

cron