View previous topic :: View next topic |
Author |
Message |
tweakt Tux's lil' helper
Joined: 16 Sep 2003 Posts: 92 Location: Boston, MA. USA
|
Posted: Sun May 09, 2004 2:08 pm Post subject: |
|
|
Watch this space for updates:
https://bugs.gentoo.org/show_bug.cgi?id=26744
I've still got a few things to finish up before submitting my ebuild. (Create users, set some permissions correctly, etc). |
|
Back to top |
|
|
n0cturne n00b
Joined: 28 Dec 2002 Posts: 14 Location: NE, USA
|
Posted: Wed May 19, 2004 3:51 am Post subject: |
|
|
Not meaning to be obnoxious, but what's the status of this DSPAM ebuild? I visit the link above at bugs.gentoo.org and see the last message there from tweakt (I assume), but nothing more. What's the next step?
I threw together an OpenBSD box to act as a spam gateway using DSPAM, and I was blown away by the accuracy and speed. Very nice indeed! But I am a Linux user at heart and I would dearly love to have DSPAM running on my Gentoo box. _________________ /\/octurne |
|
Back to top |
|
|
w00kie n00b
Joined: 16 Jun 2002 Posts: 18 Location: Paris, France
|
Posted: Tue May 25, 2004 11:42 am Post subject: |
|
|
I'm also very much looking forward to this ebuild
all my attempts at installing dSpam with Postfix and Procmail having miserably failed |
|
Back to top |
|
|
jeffk l33t
Joined: 13 Sep 2003 Posts: 671
|
Posted: Tue May 25, 2004 2:35 pm Post subject: |
|
|
I couldn't agree more, DSPAM is the most important server program I can't yet run on Gentoo. The spammers have found our individual employee email addresses, the avalanche has begun.
FWIW, DSPAM recently released 3.0.0 beta 3. Perhaps version 3 has configuration features that will make gentoo integration easier. I wish I knew enough about it myself to make any headway.
http://www.nuclearelephant.com/projects/dspam/ |
|
Back to top |
|
|
Xaignar Apprentice
Joined: 11 Jun 2003 Posts: 153 Location: Denmark
|
Posted: Tue May 25, 2004 3:28 pm Post subject: |
|
|
It's also possible to run this as a single user. There's a guide at the dSpam site. I didn't use a ebuild for installing, but instead manually installed the binaries to ~/.dspam/bin and ~/.dspam/lib. |
|
Back to top |
|
|
Styles Tux's lil' helper
Joined: 04 Jun 2002 Posts: 82
|
|
Back to top |
|
|
Styles Tux's lil' helper
Joined: 04 Jun 2002 Posts: 82
|
|
Back to top |
|
|
kyler n00b
Joined: 27 Jun 2003 Posts: 10
|
Posted: Fri Jun 04, 2004 4:27 pm Post subject: loose translation |
|
|
I knocked out a quick and dirty translation to english for the rest of you shpam lovers.... now we just need to shut down hotmail.com and we'll knock out half of these bad guys
---
http://devnull.com/kyler/dspam.20040512.html
I will link to updated translations from the above page... I haven't actually run through a test setup yet, so I can assure you there will probably be issues if you run through my translation word for word.
Enjoy!
Kyler M. Klein |
|
Back to top |
|
|
jeffk l33t
Joined: 13 Sep 2003 Posts: 671
|
Posted: Fri Jun 04, 2004 4:38 pm Post subject: |
|
|
That is one fantastic bit of documentation.
Regarding the DSPAM ebuild, the new version is at RC2, perhaps the 3.0.0 version has many convenience features that have been holding up the existing DSPAM ebuild. With its new monitoring web app, it will probably need to integrate with the webapp-config package now, the details of which I have no clue.
http://www.nuclearelephant.com/projects/dspam/
At any rate, thanks to all involved in the DSPAM integration, I'm looking forward to it. Gentoo needs this package desperately. |
|
Back to top |
|
|
tweakt Tux's lil' helper
Joined: 16 Sep 2003 Posts: 92 Location: Boston, MA. USA
|
Posted: Sun Jun 06, 2004 4:02 pm Post subject: |
|
|
I'm still around, have no fear. Yeah, I've slacked on this for a bit, sorry!
I will do my best to get something available, maybe others can help polish it up and maintain it, because my time is limited currently.
In regards to the web app, yes, it's nice and it was actually available with the 2.10.x release as well, I'm using it now to monitor my spam quarantine. I haven't yet tried the new one, but it makes sense to skip 2.10.x and make an ebuild for 3.0 now. Many folks are using it and it seems stable, also accuracy has been improved slightly.
There's a hack with the webapp and authenticating against shadow passwords. I've made an ebuild for mod_auth_pam to facilitate this but I'm not thrilled with how it works. Also I could use input into how this my be made to fit a wider variety of configs.
Look for something in a week, promise! And definately feel free to contact me directly via email! |
|
Back to top |
|
|
Styles Tux's lil' helper
Joined: 04 Jun 2002 Posts: 82
|
Posted: Mon Jun 07, 2004 3:28 pm Post subject: Re: loose translation |
|
|
kyler wrote: |
I will link to updated translations from the above page... I haven't actually run through a test setup yet, so I can assure you there will probably be issues if you run through my translation word for word.
Enjoy!
Kyler M. Klein |
I'm just waiting on a new harddrive from insight, and will start work on the server soon. I will let you know what is wrong with the doc when I run through it. |
|
Back to top |
|
|
kyler n00b
Joined: 27 Jun 2003 Posts: 10
|
|
Back to top |
|
|
Styles Tux's lil' helper
Joined: 04 Jun 2002 Posts: 82
|
Posted: Thu Jun 10, 2004 8:32 pm Post subject: |
|
|
Great work Kyler, I just got the hard drives in for my server and will be doing a clean install on them hopfully this week if I can find the time.
As soon as you get a final draft you should post it in the Document tips and tricks section of the forum.
Cheers,
Eric |
|
Back to top |
|
|
kyler n00b
Joined: 27 Jun 2003 Posts: 10
|
Posted: Sat Jun 12, 2004 12:56 am Post subject: problems with dspam 3.x |
|
|
Just a heads up for anyone attempting to follow this article...
I'm close to getting this setup working, but dspam does not seem to classify anything as spam (YET), but it's adding the !DSPAM tag to the end of the email, so I think I'm on the right track... if i try to forward a spam to kyler@spam.devnull.com i see an error in my log, so i probably have a bad dspam command line arg in my setup somewhere unless that's a normal error... not too sure since this is my 1st dspam attempt. I'll keep trying at it if I have any free time this weekend... If anyone else has any luck with this setup, please pass any useful info my way =) Thanks...
----
Jun 12 01:46:46 localhost dspam[11814]: process_message returned error -5. delivering message.
Jun 12 01:46:46 localhost postfix/pipe[11806]: 78C4B17A309: to=<kyler@spam.devnull.com>, relay=dspam-add, delay=0, status=sent (devnull.com) |
|
Back to top |
|
|
cecep_mr n00b
Joined: 12 Jun 2004 Posts: 13 Location: Bandung, Indonesia
|
Posted: Sat Jun 12, 2004 12:25 pm Post subject: dspam 3.x has some bugs |
|
|
EDIT 15 June 2004: this is not bugs with new config master.cf, everything work fine.
Looks here: http://comlabs.itb.ac.id/~cecep/HOWTO/mailfiltering_postfix_amavis_dspam.html
My dspam has upgraded to 3.0.0 stable (and without quarantine spam like i want) and it works great!
=====================================
I think dspam 3.x is good, such as with this version we can setup per user preferences, and new cgi client has improved (and add some new feature).
New cgi client screenshot
http://comlabs.itb.ac.id/~cecep/archives/images/2004-06-12/dspam_cgi.png
After upgrade to 3.x, every user can choose which preferences is right for their purpose. Like quarantine spam, or sent spam with subject tagging (add [SPAM] prefix). Or, set training mode TOE, or TEFT (which in version 2.10.x apply globally).
Everything work fine, but it has bugs in training spam message (report spam_miss) with user preferences, Tag the subject header as spam or Deliver the message, and I'll sort it out (using X-DSPAM-Result). DSPAM make training loop with this setup.
* first sent spam miss to addspam account
* dspam processing spam_miss
* dspam classified this mail as spam, and try to deliver spam. but dspam deliver spam mail to addspam account (cecep@addspam.domain.tld), not to user account (cecep@domain.tld). and looping is begin.
With user preferences set to Quarantine the message training spam_miss is work fine.
And now, i have downgrade to dspam 2.10.6 to avoid this issue (i don't want quarantine spam, just sent all spam/ham to my mail account).
Cecep.
Last edited by cecep_mr on Mon Jun 14, 2004 10:12 pm; edited 2 times in total |
|
Back to top |
|
|
cecep_mr n00b
Joined: 12 Jun 2004 Posts: 13 Location: Bandung, Indonesia
|
Posted: Sat Jun 12, 2004 12:47 pm Post subject: Re: problems with dspam 3.x |
|
|
kyler wrote: | Just a heads up for anyone attempting to follow this article...
I'm close to getting this setup working, but dspam does not seem to classify anything as spam (YET), but it's adding the !DSPAM tag to the end of the email, so I think I'm on the right track... if i try to forward a spam to kyler@spam.devnull.com i see an error in my log, so i probably have a bad dspam command line arg in my setup somewhere unless that's a normal error... not too sure since this is my 1st dspam attempt. I'll keep trying at it if I have any free time this weekend... If anyone else has any luck with this setup, please pass any useful info my way =) Thanks...
----
Jun 12 01:46:46 localhost dspam[11814]: process_message returned error -5. delivering message.
Jun 12 01:46:46 localhost postfix/pipe[11806]: 78C4B17A309: to=<kyler@spam.devnull.com>, relay=dspam-add, delay=0, status=sent (devnull.com) |
Try with 2.10.6, and configure with --enable-debug.
You can watch some verbose log in /var/dspam/dspam.debug
Cecep |
|
Back to top |
|
|
Styles Tux's lil' helper
Joined: 04 Jun 2002 Posts: 82
|
Posted: Sat Jun 12, 2004 11:27 pm Post subject: |
|
|
Thanx Cecep for the information and the heads up!
Just an FHI Cecep is the original author.. for the howto. |
|
Back to top |
|
|
tweakt Tux's lil' helper
Joined: 16 Sep 2003 Posts: 92 Location: Boston, MA. USA
|
Posted: Sat Jun 12, 2004 11:45 pm Post subject: More progress |
|
|
Ok. I'm taking some time today work on this, and I'll be posting a link to my dspam-3.0.0-rc2 ebuild sometime this weekend.
I'd like to take an informal poll.
How many think that having a seperate ebuild for the quarantine webapp would make sense?
Untill now I've focused on creating one masterful automated ebuild trying to handle all possibilities. But it occurs to me the best way to handle this is having the quarantine cgi optional, because now it's loads easier to configure dspam to deliver spam, some may prefer to configure that way. Also, as mentioned earlier, in 3.0.x a lot of the options that control behavior of dspam were moved to the command line instead of ./configure, making life MUCH simpler for writing ebuilds.
That just leaves integration with an MTA. This part needs to be done manually anyhow because such configuration changes can't be automated. I've got postfix taken care of... I'll let others tackle sendmail, qmail, etc. |
|
Back to top |
|
|
DAWG98 n00b
Joined: 16 May 2004 Posts: 34
|
Posted: Sun Jun 13, 2004 8:13 am Post subject: |
|
|
I used the guide to install a mailserver for my home network. I am also using cyrus. Dspam works like a champ. I can receive emails (save the pesky spam mails ;) However, I cannot send any mail using my Netscape mail client. It's pointed at port 25 on the server. When I check the logs it seems that mail just runs through the regular incoming process and then is bounced since there is not mailbox to deliver to (makese sense, since it was sent to someone on the outside).
If I use sendmail from a shell I can send mail.
Can someone tell me what I am doing wrong.
Thanks. |
|
Back to top |
|
|
cecep_mr n00b
Joined: 12 Jun 2004 Posts: 13 Location: Bandung, Indonesia
|
Posted: Sun Jun 13, 2004 9:19 am Post subject: |
|
|
DAWG98 wrote: | I used the guide to install a mailserver for my home network. I am also using cyrus. Dspam works like a champ. I can receive emails (save the pesky spam mails However, I cannot send any mail using my Netscape mail client. It's pointed at port 25 on the server. When I check the logs it seems that mail just runs through the regular incoming process and then is bounced since there is not mailbox to deliver to (makese sense, since it was sent to someone on the outside).
If I use sendmail from a shell I can send mail.
Can someone tell me what I am doing wrong.
Thanks. |
did you have configurations like this (/etc/postfix/main.cf)
Code: | mynetworks = YOUR_SUBNET/MASK, 127.0.0.0/8
smtpd_client_restrictions = permit_mynetworks, reject_unknown_client |
please paste your logs here, its make clearer to solve your problem. |
|
Back to top |
|
|
DAWG98 n00b
Joined: 16 May 2004 Posts: 34
|
Posted: Sun Jun 13, 2004 3:18 pm Post subject: |
|
|
Ok here is the main.cf
Code: |
soft_bounce = no
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postmaster
myhostname = poseidon.do.main.org
mydomain = do.main.org
mydestination = $myhostname, localhost.$mydomain, $mydomain
my_networks = 192.168.0.0/24, 127.0.0.0/8
unknown_local_recipient_reject_code = 450
#myorigin = do.main.org
transport_maps = regexp:/etc/postfix/transport_regexp
virtual_alias_maps = hash:/etc/postfix/virtual
check_relay_domains = $relay_domains, $inet_interfaces, virtual table
inet_interfaces = all
alias_maps = hash:/etc/mail/aliases
alias_database = hash:/etc/mail/aliases
debug_peer_level = 5
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
manpage_directory = /usr/share/man
sample_directory = /etc/postfix/sample
readme_directory = /usr/share/doc/postfix-2.0.19-r2
mailbox_transport = cyrus
#content_filter = smtp-amavis:[127.0.0.1]:10024
#smtpd_sasl_auth_enable = yes
#smtpd_sasl_security_options = noanonymous
local_recipient_maps =
|
And the master.cf
Code: |
cyrus unix - n n - - pipe
# user=cyrus:mail argv=/usr/cyrus/bin/deliver --user ${user} -e -r ${sender} -m ${extension} ${user}
# user=cyrus:mail argv=/usr/local/bin/dspam --user ${user} -e -r ${sender} -m ${extension} ${user}
user=cyrus:mail argv=/usr/local/bin/dspam --user ${user} -e -r ${sender} -m ${extension}
# user=cyrus argv=/usr/local/bin/dspam --user ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
#vscan unix - n n - 10 pipe user=amavis argv=/usr/sbin/amavis ${sender} ${recipient}
#localhost:10025 inet n - n - - smtpd -o content_filter=
#dspam-spam unix - n n - - pipe
flags=DRhu user=dspam argv=/usr/local/bin/dspam --mode=teft --process --user ${nexthop}
# amavisd-new + clamav : virus checker
# dspam : spam checker
smtp inet n - n - - smtpd
-o content_filter=smtp-amavis:[127.0.0.1]:10024
smtp-amavis unix - - n - 2 lmtp
-o smtp_send_xforward_command=yes
127.0.0.1:10025 inet n - n - - smtpd
-o cleanup_service_name=pre-cleanup
-o content_filter=dspam:dummy
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
127.0.0.1:10026 inet n - n - - smtpd
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
127.0.0.1:10026 inet n - n - - smtpd
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
dspam unix - n n - - pipe
# flags=Rhq user=dspam argv=/usr/local/bin/dspam --mode=teft --deliver=innocent,spam --feature=chained,noise --user ${recipient}$user
flags=Rhq user=dspam argv=/usr/local/bin/dspam --mode=teft --deliver=innocent --feature=chained,noise -f ${sender} -- %u --user ${recipient}
cleanup unix n - n - 0 cleanup
-o header_checks=
-o mime_header_checks=
-o nested_header_checks=
-o body_checks=
pre-cleanup unix n - n - 0 cleanup
-o canonical_maps=
-o sender_canonical_maps=
-o recipient_canonical_maps=
-o masquerade_domains=
-o virtual_alias_maps=
-o always_bcc=
-o sender_bcc_maps=
-o recipient_bcc_maps=
local unix - n n - - local
-o content_filter=
-o myhostname=localhost
-o local_recipient_maps=
-o relay_recipient_maps=
-o mynetworks=127.0.0.0/8
-o mynetworks_style=host
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
dspam-add unix - n n - - pipe
flags=Rhq user=dspam argv=/usr/local/bin/dspam --user %u --class=spam --source=error --stdout
# user=cyrus:mail argv=/usr/local/bin/dspam --user ${user} -e -r ${sender} -m ${extension} $user --class=spam --source=error --stdout
dspam-fp unix - n n - - pipe
# flags=Rhq user=dspam argv=/usr/local/bin/dspam --user ${user} --class=innocent --source=error
user=cyrus:mail argv=/usr/local/bin/dspam --user ${user} -e -r ${sender} -m ${extension} $user --class=innocent --source=error --stdout
|
Excerpts from dspam.debug
Code: |
1197: [Sun Jun 13 00:31:16 2004] LDA returned error, exit code: 65, LDA command line: /usr/cyrus/bin/deliver HIDDEN@hotmail.com dawg98@do.main.org -- HIDDEN@hotmaill.com
|
And excerpts from mail.err
Code: |
Jun 12 23:54:53 poseidon pipe[927]: fatal: pipe_comand: execvp /usr/local/bin/dspam: Permission denied
Jun 12 23:58:43 poseidon pipe[980]: fatal: pipe_comand: execvp /usr/local/bin/dspam: Permission denied
Jun 13 00:07:14 poseidon pipe[1025]: fatal: pipe_comand: execvp /usr/local/bin/dspam: Permission denied
Jun 13 00:09:42 poseidon pipe[1052]: fatal: pipe_comand: execvp /usr/local/bin/dspam: Permission denied
Jun 13 00:17:16 poseidon pipe[1108]: fatal: pipe_comand: execvp /usr/local/bin/dspam: Permission denied
Jun 13 00:25:56 poseidon pipe[1144]: fatal: pipe_comand: execvp /usr/local/bin/dspam: Permission denied
Jun 13 00:26:55 poseidon pipe[1168]: fatal: pipe_comand: execvp /usr/local/bin/dspam: Permission denied
Jun 13 00:57:42 poseidon pipe[1330]: fatal: pipe_comand: execvp /usr/local/bin/dspam: Permission denied
|
I configured Dspam using:
--with-dspam-home=/var/dspam \
--with-dspam-home-owner=dspam \
--with-dspam-home-group=postdrop \
--with-dspam-owner=dspam \
--with-dspam-group=postdrop \
--with-dspam-mode=4510 \
--prefix=/usr/local/ \
--with-delivery-agent="/usr/cyrus/bin/deliver \$u" \
--enable-spam-subject \
--enable-parse-to-headers \
--enable-debug \
--enable-verbose-debug \
--disable-bias
It catches my spam very well, but I just cannot send emails. Thanks in advance for all the help. |
|
Back to top |
|
|
cecep_mr n00b
Joined: 12 Jun 2004 Posts: 13 Location: Bandung, Indonesia
|
Posted: Mon Jun 14, 2004 1:47 pm Post subject: |
|
|
change your configure options:
Code: |
[...]
--with-dspam-home-owner=cyrus \
--with-dspam-home-group=mail \
--with-dspam-owner=cyrus \
--with-dspam-group=mail \
[...]
|
|
|
Back to top |
|
|
jeffk l33t
Joined: 13 Sep 2003 Posts: 671
|
Posted: Mon Jun 14, 2004 4:28 pm Post subject: |
|
|
FYI, DSPAM 3.0.0 has been released. |
|
Back to top |
|
|
DAWG98 n00b
Joined: 16 May 2004 Posts: 34
|
Posted: Mon Jun 14, 2004 7:33 pm Post subject: |
|
|
jeffk
I tried dspam 3.0.0 (stable) but I cannot configure. It gives me errors; i.e., the program does not appear to disget with-delivery-agent = ; prefix= ; with-dspam-home.
Cecep_mr,
no go on the recompile. I think my issue is that when sending mail to outside recipients postifx(or cyrus?) cannot understand to forward to ouside people, but rather the email runs through cyrus/dspam again and the programs attempt to deliver to a local mailbox. OF course that does not work, since there is no such mailbox.
Accordingly, I need to determine (hopefully with some help ;) how to make postifx/cyrus forward mail to the outside instead of looping it back to me.
Sounds like main/master.cf config issue.
DAWG |
|
Back to top |
|
|
cecep_mr n00b
Joined: 12 Jun 2004 Posts: 13 Location: Bandung, Indonesia
|
Posted: Mon Jun 14, 2004 7:36 pm Post subject: dspam 3.0.0 STABLE, it works |
|
|
My doc has update to dspam 3.0.0 STABLE (yup, in Indonesian ).
http://comlabs.itb.ac.id/~cecep/HOWTO/mailfiltering_postfix_amavis_dspam.html
Change from previous doc:
Configure options:
Code: |
./configure \
--with-dspam-home=/var/dspam \
--with-dspam-home-owner=dspam \
--with-dspam-home-group=postdrop \
--with-dspam-owner=dspam \
--with-dspam-group=postdrop \
--with-dspam-mode=4510 \
--with-delivery-agent=/usr/sbin/sendmail \
--with-storage-driver=mysql_drv \
--with-mysql-includes=/usr/include/mysql \
--with-mysql-libraries=/usr/lib/mysql \
--disable-trusted-user-security \
--enable-large-scale \
--enable-virtual-users \
--enable-long-usernames \
--enable-opt-in \
--enable-spam-subject
|
Change in /etc/postfix/master.cf
Code: |
dspam unix - n n - - pipe
flags=Rhq user=dspam argv=/usr/local/bin/dspam --mode=teft --deliver=innocent,spam
--feature=chained,noise -i -f ${sender} -- %u --user ${recipient}
dspam-add unix - n n - - pipe
flags=Rhq user=dspam argv=/usr/local/bin/dspam --mode=teft --user ${user}@${nexthop}
--class=spam --source=error -i -f ${sender} -- %u --deliver=spam
dspam-fp unix - n n - - pipe
flags=Rhq user=dspam argv=/usr/local/bin/dspam --mode=teft --user ${user}@${nexthop}
--class=innocent --source=error -i -f ${sender} -- %u --deliver=innocent
|
And finally, code for setup new cgi-client (without virtualhost)
Code: |
#!/bin/sh
#
# script for setup dspam cgi with suexec wrapper
# (c)2004. Cecep Mahbub (cecep@comlabs.itb.ac.id)
#
# note: compile apache with --enable-suexec option. (enable by default in gentoo portage)
# config
HTDOCS="/var/www/localhost/htdocs"
SOURCE="/root/sources/dspam-3.0.0"
DSPAM_USER="dspam"
DSPAM_GROUP="users"
SUEXEC="/usr/sbin/suexec2"
# copy cgi files
cp -Rp $SOURCE/cgi $HTDOCS/dspam
# create suexec wrapper
cd $HTDOCS/dspam
for a in *.cgi; do
echo "#!/bin/sh" > `basename $a .cgi`.tmp
echo "exec $SUEXEC $DSPAM_USER $DSPAM_GROUP ./`basename $a .cgi`_orig.cgi" >> `basename $a .cgi`.tmp
done
for b in *.cgi; do
mv $b `basename $b .cgi`_orig.cgi
done
for c in *.tmp; do
mv $c `basename $c .tmp`.cgi
done
# fix permission and owner
chown -R $DSPAM_USER:$DSPAM_GROUP $HTDOCS/dspam
chmod 755 $HTDOCS/dspam
chmod 755 $HTDOCS/dspam/*.cgi
# create file .htaccess
cat << HTACCESS > .htaccess
Options ExecCGI
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/dspam.auth
Require valid-user
HTACCESS
|
Don't forget to add user for cgi client:
Code: |
htpasswd2 -c /etc/dspam.auth user@example.com
|
And edit /var/www/localhost/dspam/dspam_orig.cgi:
Code: |
$CONFIG{'LARGE_SCALE'} = 1; # --enable-large-scale
|
Last edited by cecep_mr on Mon Jun 14, 2004 10:31 pm; edited 2 times in total |
|
Back to top |
|
|
|