Menu

spamc not working from program

2007-04-06
2013-04-15
  • onlinesolutions

    onlinesolutions - 2007-04-06

    I am trying to get SpamC/SpamD working on my mail server (Ability Mail Server).
    I downloaded and installed SpamAssassin for Windows (3.1.7). I am able to run
    SpamAssassin.exe < tests just fine but it takes 10 to 16 seconds per run. I have
    spamd installed as a service. I am able to run spamc from a command line and
    it runs faster and successfully updates the spamd.log I setup, so it appears
    to run there.

    For example, the following appears to run fine.
    spamc < sample-spam.txt > sample-spam-output.txt

    So I have setup spamc calls from my mail server, and it doesn't seem to work.
    I have a parameter tester that I wrote for debugging these kinds of problems.
    I tried calling spamc using my program, and it returns 0 no matter what and
    doesn't update the spamd.log. If I call spamassassin.exe from my program,
    it does successfully scan the message and return. Of course, the delay is still
    there.

    Can any one help me debug this thing?
    What does it take to call spamc from another executable?
    I am including the URL to my paramter tester in case it help, and it may
    help on other projects anyway. It is a free program.

    http://www.onlinesolutions.com/files/documents/ParamTester.exe

    Thanks for your help,
    Scott

     
    • Thomas Bøjstrup Johansen

      >I am able to run SpamAssassin.exe < tests just
      >fine but it takes 10 to 16 seconds per run.

      Sounds abit slow, can be having some timeout error and it is most likely RBL, DCC or Rezor

      try run this command:
      spamassassin -D < MailToScan.msg > MailOutput.msg 2> Debug.log

      and then look in the debug.log for errors.

      >So I have setup spamc calls from my mail server, and it
      >doesn't seem to work. I have a parameter tester that I
      >wrote for debugging these kinds of problems. I tried
      >calling spamc using my program, and it returns 0 no
      >matter what and doesn't update the spamd.log.

      The way linux use pipe of content into the .exe file and the output is pipe out to another file does not allways work well on windows platform and i run into the same isue when trying to run spamc as a plugin for the mta call mailsweeper.

      try make a .bat like this

      content of Myspamc.bat file
      --------------------------------
      spamc.exe < %1 > %2
      --------------------------------

      and then use the .bat file inside your MTA by calling it like this

      Myspamc.bat NameOfMail.msg MailOutput.msg

      This small trick got it working for me but not very well so i end up make my own spamc client there was design to work better under mailsweeper

      If it can help you on the way you can try look at the howto i have made about it.
      http://www.tooms.dk/articles_tutorials/howto_use_spamassassin_as_a_mailsweeper_plugin/

       
    • Eugene Pivovarov

      Do you have the same problem with spamcc.exe, too?

       

Log in to post a comment.