Page 1 of 1

successfully installed and got spamgourmet site up

PostPosted: Wed Apr 07, 2010 6:33 pm
by cndpost
Summary:

The spamgourmet installation is so poorly documented that, it takes a professional software engineer like me two weeks to get it really working ! After so much of a pain in debugging, I finally got my spamgourmet site up and running at http://mail1.n2k.net

I am using a CentOs 5.3 box, the document says /etc/smrsh is the location to put your spameater links. But the sendmail (I compiled from source code version 8.14.4) is actually expecting /usr/adm/sm.bin/ as the location to put your spameater link. After this change, then the spameater will getting mails if you forward all of your catchall mail account's mail to it.

Details: (to get spamgourmet working from scratch)

1. install CentOs 5.3 on a formatted hard drive.
2. Use yum to install the gcc (without it, you cannot compile anything)
3. Dowload Berkeley db4 package and install it (otherwise sendmail
will fail to start with hashed alias and virtual user table)
4. Download sendmail from source location and build it according to its instruction. Before doing the build of sendmail, be sure to copy

path-to-sendmail/cf/cf/generic-linux.mc

to
path-to-sendmail/cf/cf/sendmail.mc

and copy
path-to-sendmail/devtool/Site/site.config.m4.sample
to
path-to-sendmail/devtool/Site/site.config.m4.sample

5. start sendmail by typing following command as root

/etc/init.d/sendmail restart

I am assuming you have debugged the running of sendmail before you move on to debug spamgourmet

6. Create a catchall account to catch all the emails sent to that domain
and have it feed to the spamgourmet. The simplest way is to add
an regular user called "catchall" and then add an entry like this
in /etc/mail/virtualusertable:

@yourdomain.com catchall

This way, all mails send to xxx@yourdomain.com are going to
catchall@yourdomain.com. And then you can use the .forward
feature of sendmail to feed all the mails to spamgourmet.

6. Download and install spamgourmet as it documented. Including mysql database and front end website files. config your httpd.conf accordingly. Replace all spamgourmet.com links to your own links. This is especially essential to get captchasrv to work. The confirmation emails also need to replaced to have your own correct link.
contrary to the document, there is no file named ".forward.sample" in the package, so just create a .forward file in the catchall account's home directory and fill it with following one line content:

catchall: " | perl spameater"

7. If you like me who have compiled sendmail from source code, the
smrsh shell expects allowed program links in /usr/adm/sm.bin. So you need to do following things:

mkdir /usr/adm/sm/bin

ln -s path-to-spamgourmet/mailhandler/spameater /usr/adm/sm.bin/spameater

ln -s /usr/bin/perl /usr/adm/sm.bin/perl

8. Test the install

before you try to test from the website, try to test to see if the mails actually get flowing from sendmail to spameater. The way to do that is as follows:
8.1) uncomment the debug lines in spameater. and pipe a text file
to spameater to see if it correctly shows up in the
spamgourmet/debug file
8.2) manually send a test email from root to
fakeuser@yourdomain.com and see if it successfully sent out and get dumped to spamgourmet/debug file.

when you can see that happens, then, mostly of your configuration are working and you are ready to test the website part.

PostPosted: Wed Dec 29, 2010 4:47 pm
by tpt
Thanks for posting this, cndpost.

Any ideas about how this installation could happen without root access?

Re: successfully installed and got spamgourmet site up

PostPosted: Thu Apr 27, 2017 12:05 pm
by Josh Parris
I had similar difficulties, the biggest help was using an up-to-date release.

Things have changed since 2010, but I managed a 2017 successful install on Debian Ubuntu 16.04 Xenial Xerus