Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jjohn (22)

jjohn
  (email not shown publicly)
http://taskboy.com/
AOL IM: taskboy3000 (Add Buddy, Send Message)

Perl hack/Linux buff/OSS junkie.

Journal of jjohn (22)

Sunday September 15, 2002
06:15 PM

SpamAssassin installed

[ #7744 ]

Finally got around to installing SpamAssassin. The installation went smoothly, but I did have a vehement argument with sendmail about the honor of procmail. For those that only touch sendmail at install, here are some tips:

  • chmod 600 .forward . Sendmail doesn't like to execute world/group writable .forward files.
  • Simplify the .forward file. The following incantation for the .forward file is suggested in the SpamAssassin INSTALL file:

    "|IFS=' ' && exec /usr/bin/procmail -f- || exit 75 #user"

    To reduce the number of cargo-cults out there, this line attempts to set an environment variable (the Input Field Separator) to a space and then exec procmail. The argument -f tells procmail to regenerate the leading 'From' mail header. The following '-' means that procmail only updates the timestamp on the 'From' line. If procmail bombs out, a mysterious exit code 75 is returned. Perhaps sendmail will do something with processes that return 75. In any case, this line ends in a comment that isn't used by procmail nor sendmail. It's for you! You don't need this rather obtuse line. Instead the following will suffice:

    |/usr/bin/procmail

    Now that's a line even I can understand.
  • Vouch for procmail. When you encounter the following error message sent in an email from postmaster:

    "|/usr/bin/procmail"
        (reason: service unavailable)
        (expanded from: jjohn)

    Make sure that the sendmail restricted shell (smrsh) knows that procmail is a trusted program. This is done by putting a symlink to procmail in a directory smrsh knows about. On my RedHat system, that directory is /etc/smrsh. Local conditions may vary.

After my little wrasselin' match with sendmail, I'm reaping the rewards. SpamAssassin appears to have been worth the effort to install.

What are you waiting for?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • From memory, that ending comment in the original .forward invocation was intended to guard against an overzealous sendmail optimization. The funky idea being that if two recipients of a given message had identical .forward files then why not just save the trouble of running through both of them and instead use the first encountered. Ugg.

    I'd guess it's ancient history being fossilised into an idiom, but I'm pretty sure that's the origin. (ie, the #username causes diffs of everyone's .forward files to be
  • Raise your hand if procmail has ever failed to work for you because you modified your IFS variable!

    --
    J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers