Jump to content

Recommended Posts

Posted

With help from the following thread How To Install Squirrelmail - The Ultimate Guide, including a powerful spam fighting setup I have tried to set up a script to learn spam.

 

Here is what I have done.

I have created a file name saspam.sh and placed it in public_html/cgi-bin with permissions 755

 

>#!/bin/sh
echo "Learning SPAM"
sa-learn --showdots --spam --mbox /home/username/mail/spam_missed
echo "Done"

 

I have created a php file named learnspam.php in public_html/learnspam with permissions 644. The learnspam folder is webprotected from cpanel.

 

><html>
<body>

<?php
$input = '/home/username/public_html/cgi-bin/saspam.sh';
$output = shell_exec("$input" . " 2>&1");
echo (nl2br("$output"));
?>

</body>
</html>

 

The mail folder spam_missed has permissions 755.

 

When I open the learnspam.php file I get the following:

 

>Learning SPAM
bayes expire_old_tokens: lock: 22313 cannot create tmp lockfile //.spamassassin/bayes.lock.server80.totalchoicehosting.com.22313 for //.spamassassin/bayes.lock: No such file or directory

unable to open /home/username/mail/spam_missed: Permission denied

Learned from 0 message(s) (0 message(s) examined).
Done

 

Can anyone help diagnose the problem.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...