Running the source code

Discussion re sg development. You don't have to be a developer.

Running the source code

Postby thewiz » Thu Oct 21, 2004 11:22 am

Hi

I am interested in getting the source code up and running, but I'm no t having much luck.

I'm using Apache v2 with PHP 4, mySQL 4 and Perl with mod_perl

Has anyone managed to get it running under a similar enviroment?

Has anyone created a simple PHP driven front end?

Any hints appreciated.

Cheers
thewiz
 
Posts: 1
Joined: Thu Oct 21, 2004 11:11 am

Postby SysKoll » Sat Oct 23, 2004 9:43 pm

Josh, I believe this one is for you to answer...
-- SysKoll
SysKoll
 
Posts: 893
Joined: Thu Aug 28, 2003 9:24 pm

Postby josh » Mon Oct 25, 2004 4:10 pm

We're still in poor shape when it comes to installability. One brave soul did get everything up (including the web site) -- here are his notes. Note that most of this is related to getting the website to run, and when you're done, you have one that looks just like ours :) (albeit using a template system that makes it fairly easy to change). Note that all this is relative to a recent pull from CVS - not the distros, which are hopelessly old.

What we really need to do is come up with one or more generic front ends -- PHP, probably. If you want to use existing unix email accounts for the sg accounts, you don't need a front end, and all you have to set up is the mail handler.





>>>>>>Here is a fairly complete list of things that had to be changed to make
>>>>>>spamgourmet work properly on my system:
>>>>>>
>>>>>>
>>>>>>C library needed
>>>>>>
>>>>>>gc 2.0+
>>>>>>
>>>>>>Perl modules needed
>>>>>>
>>>>>>Apache-GDGraph-0.96
>>>>>>File::Cache
>>>>>>GD::Graph
>>>>>>GD::Text
>>>>>>GD
>>>>>>GD::Graph::bars3d
>>>>>>
>>>>>>
>>>>>>Symbolic links needed
>>>>>>
>>>>>>in /usr/X11R6/lib:
>>>>>>ln -s libXpm.so.4.11 libXpm.a
>>>>>>ln -s libX11.so.6.2 libX11.a
>>>>>>
>>>>>>
>>>>>>Need to set temp directory (or create it)
>>>>>>
>>>>>>
>>>>>>
>>>>>>Files that needed to be changed to reflect the web server address and
>>>>>>
>>>>>>other needed parameter changes:
>>>>>>
>>>>>>spamgourmet.config
>>>>>> @localdomains
>>>>>>
>>>>>> $dbstring
>>>>>> $dbuser
>>>>>> $dbpassword
>>>>>>
>>>>>> $webapproot
>>>>>> $webtemplatedir (filesystem path)
>>>>>>
>>>>>> $secretphrase
>>>>>> $captchagenhost
>>>>>>
>>>>>> $mailhost
>>>>>> $adminemail
>>>>>>
>>>>>>
>>>>>>
>>>>>>web/disposableemail.pl
>>>>>> $secureURL
>>>>>> $normalURL
>>>>>> $chartserver
>>>>>>
>>>>>> $| Set to 0 for Mod_Perl 2
>>>>>>
>>>>>>
>>>>>>
>>>>>>web/graphs.cgi
>>>>>> $chartserver
>>>>>> $| Set to 0 for Mod_Perl 2
>>>>>>
>>>>>>modules/WebStuff/WebConfig.pm
>>>>>> @localdomains
>>>>>>
>>>>>>modules/Mail/Spamgourmet/CommandLineMailer.pm
>>>>>> $url (line 63)
>>>>>> print (line 72)
>>>>>> $url (line 92)
>>>>>> print (line 100)
>>>>>>
>>>>>>
>>>>>>web/templates/EN/signupform.html
>>>>>> <img...
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>Apache configs
>>>>>>
>>>>>><VirtualHost 0.0.0.0:80>
>>>>>> ServerName *****************
>>>>>>
>>>>>> CustomLog /var/log/httpd/***************/access_log combined
>>>>>> ErrorLog /var/log/httpd/***************/error_log
>>>>>>
>>>>>> <Files ~ "^\.ht">
>>>>>> Order allow,deny
>>>>>> Deny from all
>>>>>> </Files>
>>>>>>
>>>>>> Alias /captcha/ "/home/spamgourmet/captchasrv/captcha/"
>>>>>> <Directory /home/spamgourmet/captchasrv/captcha>
>>>>>> Order allow,deny
>>>>>> Allow from all
>>>>>> </Directory>
>>>>>>
>>>>>> DocumentRoot "/var/www/***************/html"
>>>>>> <Directory "/var/www/***************/html">
>>>>>> AllowOverride None
>>>>>> Order allow,deny
>>>>>> Allow from all
>>>>>> </Directory>
>>>>>>
>>>>>> Alias /spameater/ "/home/spamgourmet/web/"
>>>>>> Alias /spamgourmet/ "/home/spamgourmet/web/"
>>>>>> <Directory "/home/spamgourmet/web" >
>>>>>> AllowOverride None
>>>>>> Options ExecCGI FollowSymLinks Includes
>>>>>> Order allow,deny
>>>>>> Allow from all
>>>>>>
>>>>>> SetHandler perl-script
>>>>>> PerlResponseHandler ModPerl::Registry
>>>>>> PerlOptions +ParseHeaders
>>>>>> </Directory>
>>>>>>
>>>>>> <Directory "/home/spamgourmet/web/stuff" >
>>>>>> SetHandler default-handler
>>>>>> </Directory>
>>>>>>
>>>>>>
>>>>>> PerlModule Apache::compat
>>>>>>
>>>>>> <Location /chart>
>>>>>> SetHandler perl-script
>>>>>> PerlHandler +Apache::GD::Graph
>>>>>> ## These are optional (defaults shown)
>>>>>> ## In days:
>>>>>> #PerlSetVar Expires 30
>>>>>> #
>>>>>> ## In megs:
>>>>>> #PerlSetVar CacheSize 5242880
>>>>>> #PerlSetVar ImageType png
>>>>>> #PerlSetVar JpegQuality 75 # 0 to 100
>>>>>> #PerlSetVar TTFFontPath /usr/ttfonts:
>>>>>> #/var/ttfonts:/usr/X11R6/lib/X11/fonts/ttf/:
>>>>>> #/usr/X11R6/lib/X11/fonts/truetype/:
>>>>>> #/usr/share/fonts/truetype
>>>>>> </Location>
>>>>>>
>>>>>></VirtualHost>
josh
 
Posts: 1371
Joined: Fri Aug 29, 2003 2:28 pm

Running the source code

Postby rdigqd » Mon Jul 28, 2008 9:47 pm

josh wrote:We're still in poor shape when it comes to installability. One brave soul did get everything up (including the web site) -- here are his notes. Note that most of this is related to getting the website to run, and when you're done, you have one that looks just like ours :) (albeit using a template system that makes it fairly easy to change). Note that all this is relative to a recent pull from CVS - not the distros, which are hopelessly old.

What we really need to do is come up with one or more generic front ends -- PHP, probably. If you want to use existing unix email accounts for the sg accounts, you don't need a front end, and all you have to set up is the mail handler.


<< ... SNIP ... >>




If I interpret correctly, that sez one could take an
existing domain and have mail to it passed thru the
processing by SG (which I vaguely remember reading
about _somewhere_ but can no longer 'rediscover' <G>).
.
If that is a correct interpretation/assumption,
Plz, plz ... can you provide reference [via PM if that is
most advisable
] as to location of instructions for
doing that 'set up' ???

jim

------------------------------------
rdigqd
 
Posts: 24
Joined: Mon Feb 21, 2005 7:38 pm

Postby josh » Tue Jul 29, 2008 7:42 pm

I haven't tested the unix account config for a few years, but the setup is the same as the normal way, except with no website, and it's a configuration option in the config file, I think.

step 1: create a new unix account to be used just for this (like 'spamgourmet' or something)

step 2: put the spameater script and spamgourmet.config file in the home directory somewhere. You may have to also create a symlink to the spameater file in your smrsh directory as root, wherever that is (consult sendmail docs for that)

step 2.5: set up the spamgourmet database and config (there is much to do here, but hopefully it's straightforward) - you still need the database for use with unix accounts, it's just that the Users table won't be used.

step 3: in the home directory for that user, create a .forward file and put one line it in: "|/path/to/spameater" - with the quotes, replacing /path/to with the path to the file

step 4: in /etc/mail/virtusertable add the line:

@mydomain.com spamgourmet

(replacing mydomain.com with the domain you want forwarded and spamgourmet with the user account you used for set up - this also assumes that mydomain.com is properly set up to receive mail normally)

step 5: set $useunixaccounts = 1; in the spamgourmet.config file

step 6: get out the fire extinguisher and send a test message. I don't think I accounted for the possibility that someone sends a message to the spamgourmet account directly, which might create a loop - I can't remember.
josh
 
Posts: 1371
Joined: Fri Aug 29, 2003 2:28 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 28 guests

cron