Help with install and config
Hi, I have a couple of questions. I just installed SpamAssassin on one of our servers through: $ perl -MCPAN -e shell > install (the mod for Razor) which automatically installed SpamAssassin. After which I ran the test as suggested on the FAQ: $ spamassassin -tD < ./sample-spam.txt and I get pages of debugging and all seems to come out OK. But I send that message in an actual e-mail, and I look at the header, and there's no SpamAssassin additions to the header. What might be going on here? I can't find anything on the site/FAQ that goes beyond the installation than that test it mentions. Another question I have is on configuration. I ran $ man Mail::SpamAssassin::Conf and that's all real interesting, but I don't know Perl at all. How do I actually make the configuration changes, like the score level and how it tags the e-mail? Am I missing it in the MAN? I tried $ perl Mail::SpamAssassin::Conf but that does nothing. (Those of you who know Perl are probably saying DUH!) I guess one more question: I installed it on one of our smaller servers, less critical. Fedora Core 3. If we get this working OK, we're going to install it on our actual production server which is a ES2 with Sendmail. Is there any chance that installing SpamAssassin could screw up Sendmail at all, and in any way prevent mail from operating on the server? Or is worst-case scenario just mail won't get tagged with SpamAssassin scores? Thanks for any feedback!
Re: Help with install and config
Liam-PrintingAutomation wrote: Another question I have is on configuration. I ran $ man Mail::SpamAssassin::Conf and that's all real interesting, but I don't know Perl at all. How do I actually make the configuration changes, like the score level and how it tags the e-mail? Am I missing it in the MAN? I tried $ perl Mail::SpamAssassin::Conf but that does nothing. (Those of you who know Perl are probably saying DUH!) Nevermind that question, I found: /etc/mail/spamassassin/local.cf which appears to have all the settings I can think of needing to change. But I'm still wondering why the e-mails coming in still aren't getting checked through SpamAssassin, and curious as to how badly a bad install could hurt the mail reception process. Thanks!
Re: Help with install and config
Menno van Bennekom wrote: Well you need to call spamassassin (or spamc, that's a better option) somehow. You'll need amavis, mail-scanner, procmail or some other method of calling SA. Can't be much more help than that I'm afraid as I don't run sendmail. Ah, OK. I'll look into those things and see what I can find. Thanks for the tips! Liam Thanks all who replied. Karl P. helped me out with pointing out that procmailrc needed to be in /etc/ and more importantly, because I'm not finding this piece of info on the Web site anywhere, it needs to be CHMOD'ed to 755. I wouldn't have guessed that. Thanks again Liam
Re: Help with install and config
Bob McClure Jr wrote: On Wed, Oct 19, 2005 at 10:52:40AM -0500, Liam-PrintingAutomation wrote: Thanks all who replied. Karl P. helped me out with pointing out that procmailrc needed to be in /etc/ and more importantly, because I'm not finding this piece of info on the Web site anywhere, it needs to be CHMOD'ed to 755. I wouldn't have guessed that. For good reason. It should be 644. No reason to have it executable. That's odd. It wasn't working until I 755'ed it. Still works now that I 644'ed it. Maybe it was 400 before or something. OK, in any case, permissions are also key, and I hadn't seen that in any FAQ or link. Thanks for the clarification! Liam
trusted networks in the local.cf?
These are some stupid questions, but I can't find answers for them doing a Google search. I can't seem to find any example local.cf's that have more than one trusted networks. In the default local.cf, there's this section: # Set which networks or hosts are considered 'trusted' by your mail # server (i.e. not spammers) # # trusted_networks 212.17.35. How do you have more than one trusted network? Each on its own line, or comma seperated? Like: trusted_networks 212.17.35.,127.0.0.1 or trusted_networks 212.17.35. trusted_networks 127.0.0.1 Also, when using IP's, can you use a full IP, or do you have to leave the last octet off (after the period) like in the example? Can you use domain names? Like: trusted_networks domain_name.com Thanks for any feedback! Liam
Block all incoming mail from domain except certain users?
I'm noticing we're getting a lot of spam coming through with a from address of our own domain. This gives spamassassin an automatic -100 on the score pretty much guaranteeing that it'll not get flagged as spam. Since we have a limited number of people using that domain, is there a way to tell spamassassin to block or at least give a really bad score ot any email with a FROM as coming from our domain but is not a user (left of @ sign) that isn't one of these X addresses? Thanks for any advice! Liam
Re: Block all incoming mail from domain except certain users?
mouss wrote: > Liam-PrintingAutomation a écrit : > >> I'm noticing we're getting a lot of spam coming through with a from >> address of our own domain. This gives spamassassin an automatic -100 on >> the score pretty much guaranteeing that it'll not get flagged as spam. >> >> > > Please repost you mail "correctly". do not hijack unrelated threads: do > not reply to an urelated message. compaose a new message instead. > > Sorry. I didn't realize I was hijacking anything since I completely replaced the subject line and used all new text body. I had no idea that doing that was somehow not creating a "new" message for all intents and purposes. Sorry. Liam
SA running, but not working
Newbie question: I'm using Sendmail on an ES4 server that was built buy our server's host. It originally was set up with Procmail, but because of migration problems from an old server we had to switch it to Sendmail. Anyway, Spamassassin was pre-installed. I just started the service running, but none of our mail is being tagged with a X-Spam header. I've looked for Spamassassin configuration files, and all I could find was /etc/mail/spamassassin/local.cf and all I can do in there is change the threshhold and subject line tag. Is there comething somewhere I need to check/change to get it to work with Sendmail? Just a point in the right direction would be nice. =) Thanks, Liam
Re: SA running, but not working
Matt Kettler wrote: Liam-PrintingAutomation wrote: Newbie question: I'm using Sendmail on an ES4 server that was built buy our server's host. It originally was set up with Procmail, but because of migration problems from an old server we had to switch it to Sendmail. Eh? Sendmail isn't a replacement for procmail. Sendmail is a MTA (mail transfer agent) that handles network transfers of mail. Procmail is a MDA (mail delivery agent) that handles putting the mail into mailboxes on the local machine. Most people that use procmail use sendmail as their MTA. Er, my bad. POSTFIX is what the server was originally set up with, not Procmail. I got those names confused. =/ Sorry. Anyway, Spamassassin was pre-installed. I just started the service running, but none of our mail is being tagged with a X-Spam header. Ok.. you need to do more than that.. you need to modify your some part of your mail chain to feed messages to SA. As it is, SA is available on your system, and has the spamd deamon running and ready to be fed mail, but nobody is feeding it. So you have two basic options: 1) tell sendmail to use procmail as a MDA, and add a spamc call to your procmail config. 2) add a milter to sendmail like spamass-milter or mimedefang, and have those funnel mail into spamassassin at the MTA level. OK, I'll see if it's already using Procmail since I now realize the difference, and try the first option. Otherwise, based on your suggestion, I found: http://wiki.apache.org/spamassassin/IntegratedInMta and that looks like it has all the info I'll need. Thanks for the clue-by-four! -Liam
SA just stopped working
I installed spamassassin not long ago on our server, and it worked great! Then sometime in the last couple of weeks it appears to have just stopped working. No incoming e-mails are being tagged with spamassassin headers anymore. I restarted sendmail (eh, I know that wouldn't really do anything, but hey, why not,) and I have in /etc/mail/spamassassin the files init.pre, spamassassin-default.rc, spamassassin-spamc.rc. In init.pre I have: loadplugin Mail::SpamAssassin::Plugin::URIDNSBL loadplugin Mail::SpamAssassin::Plugin::Hashcash loadplugin Mail::SpamAssassin::Plugin::SPF and in the other two files, both have: # send mail through spamassassin :0fw | /usr/bin/spamassassin Between the time it worked and I discovered it no longer working, I didn't make any config changes, or any server changes for that matter. What else should I look at to see if I can get it back up and going? Thanks! Liam
Re: SA just stopped working
Theo Van Dinter wrote: On Wed, Mar 22, 2006 at 09:12:14AM -0800, Mike Jackson wrote: cat msg_to_test.txt | spamassassin -D --lint 2>&1 | more Then look at the output to see if there's anything wrong. Just to note, there's no point in sending a message to spamassassin if you're doing --lint (it generates its own message). Just run "spamassassin -D --lint". Wow, that spits out a lot of data! Not sure what all (any) of it means, but nothing jumps out at me as an error. Any ideas? Thanks! -Liam [EMAIL PROTECTED] spamassassin]# spamassassin -D --lint 2>&1 debug: SpamAssassin version 3.0.5 debug: Score set 0 chosen. debug: running in taint mode? yes debug: Running in taint mode, removing unsafe env vars, and resetting PATH debug: PATH included '/usr/kerberos/sbin', keeping. debug: PATH included '/usr/kerberos/bin', keeping. debug: PATH included '/usr/local/sbin', keeping. debug: PATH included '/usr/local/bin', keeping. debug: PATH included '/sbin', keeping. debug: PATH included '/bin', keeping. debug: PATH included '/usr/sbin', keeping. debug: PATH included '/usr/bin', keeping. debug: PATH included '/usr/X11R6/bin', keeping. debug: PATH included '/root/bin', keeping. debug: Final PATH set to: /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin debug: diag: module installed: DBI, version 1.40 debug: diag: module installed: DB_File, version 1.809 debug: diag: module installed: Digest::SHA1, version 2.07 debug: diag: module installed: IO::Socket::UNIX, version 1.21 debug: diag: module installed: MIME::Base64, version 3.01 debug: diag: module installed: Net::DNS, version 0.48 debug: diag: module installed: Net::LDAP, version 0.31 debug: diag: module not installed: Razor2::Client::Agent ('require' failed) debug: diag: module installed: Storable, version 2.13 debug: diag: module installed: URI, version 1.30 debug: ignore: using a test message to lint rules debug: using "/etc/mail/spamassassin/init.pre" for site rules init.pre debug: config: read file /etc/mail/spamassassin/init.pre debug: using "/usr/share/spamassassin" for default rules dir debug: config: read file /usr/share/spamassassin/10_misc.cf debug: config: read file /usr/share/spamassassin/20_anti_ratware.cf debug: config: read file /usr/share/spamassassin/20_body_tests.cf debug: config: read file /usr/share/spamassassin/20_compensate.cf debug: config: read file /usr/share/spamassassin/20_dnsbl_tests.cf debug: config: read file /usr/share/spamassassin/20_drugs.cf debug: config: read file /usr/share/spamassassin/20_fake_helo_tests.cf debug: config: read file /usr/share/spamassassin/20_head_tests.cf debug: config: read file /usr/share/spamassassin/20_html_tests.cf debug: config: read file /usr/share/spamassassin/20_meta_tests.cf debug: config: read file /usr/share/spamassassin/20_phrases.cf debug: config: read file /usr/share/spamassassin/20_porn.cf debug: config: read file /usr/share/spamassassin/20_ratware.cf debug: config: read file /usr/share/spamassassin/20_uri_tests.cf debug: config: read file /usr/share/spamassassin/23_bayes.cf debug: config: read file /usr/share/spamassassin/25_body_tests_es.cf debug: config: read file /usr/share/spamassassin/25_hashcash.cf debug: config: read file /usr/share/spamassassin/25_spf.cf debug: config: read file /usr/share/spamassassin/25_uribl.cf debug: config: read file /usr/share/spamassassin/30_text_de.cf debug: config: read file /usr/share/spamassassin/30_text_fr.cf debug: config: read file /usr/share/spamassassin/30_text_nl.cf debug: config: read file /usr/share/spamassassin/30_text_pl.cf debug: config: read file /usr/share/spamassassin/50_scores.cf debug: config: read file /usr/share/spamassassin/60_whitelist.cf debug: using "/etc/mail/spamassassin" for site rules dir debug: config: read file /etc/mail/spamassassin/local.cf debug: using "/root/.spamassassin" for user state dir debug: using "/root/.spamassassin/user_prefs" for user prefs file debug: config: read file /root/.spamassassin/user_prefs debug: plugin: loading Mail::SpamAssassin::Plugin::URIDNSBL from @INC debug: plugin: registered Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x95c7a00) debug: plugin: loading Mail::SpamAssassin::Plugin::Hashcash from @INC debug: plugin: registered Mail::SpamAssassin::Plugin::Hashcash=HASH(0x9f10954) debug: plugin: loading Mail::SpamAssassin::Plugin::SPF from @INC debug: plugin: registered Mail::SpamAssassin::Plugin::SPF=HASH(0x9eec9d0) debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x95c7a00) implements 'parse_config' debug: plugin: Mail::SpamAssassin::Plugin::Hashcash=HASH(0x9f10954) implements 'parse_config' debug: using "/root/.spamassassin" for user state dir debug: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks debug: Score set 1 chosen. debug: MIME PARSER START debug: main message type: text/plain debug: parsing normal part debug: added part, type: text/plain debug: MIME P
Re: SA just stopped working
jdow wrote: From: "Liam-PrintingAutomation" <[EMAIL PROTECTED]> I installed spamassassin not long ago on our server, and it worked great! Then sometime in the last couple of weeks it appears to have just stopped working. No incoming e-mails are being tagged with spamassassin headers anymore. I restarted sendmail (eh, I know that wouldn't really do anything, but hey, why not,) and I have in /etc/mail/spamassassin the files init.pre, spamassassin-default.rc, spamassassin-spamc.rc. In init.pre I have: loadplugin Mail::SpamAssassin::Plugin::URIDNSBL loadplugin Mail::SpamAssassin::Plugin::Hashcash loadplugin Mail::SpamAssassin::Plugin::SPF and in the other two files, both have: # send mail through spamassassin :0fw | /usr/bin/spamassassin That is a procmail recipe not a SpamAssassin anything. Of course, neither of the other two files you list is an anything for any installation of which I am aware. If you restarted or reinstalled sendmail did you make sure it still uses procmail? {^_^} I uhm, er, have no idea How do I find out? I can't find anything in the Sendmail settings to indicate. I use Webmin for server management, and since you mentioned Procmail I took a look at the Webmin GUI for that, and found this: Set variable DROPPRIVS to yes Feed to progam /usr/bin/spamc Always execute action So, Procmail is supposed to feed to Spamassassin. So the question remains, is it using Procmail. How do I know? If not, what else COULD it be using on the server? And how could it have mysteriously changed at some point without my doing anything? =/ Thanks for the reply! -Liam
Re: SA just stopped working
mouss wrote: Liam-PrintingAutomation a écrit : I uhm, er, have no idea How do I find out? I can't find anything in the Sendmail settings to indicate. I use Webmin for server management, and since you mentioned Procmail I took a look at the Webmin GUI for that, and found this: Set variable DROPPRIVS to yes Feed to progam /usr/bin/spamc Always execute action So, Procmail is supposed to feed to Spamassassin. So the question remains, is it using Procmail. How do I know? If not, what else COULD it be using on the server? And how could it have mysteriously changed at some point without my doing anything? =/ given what you posted, you sa seems to be ok. you now need to make sure your sendmail is actually calling procmail. try putting an error in your procmail and see if that shouts. I'm sorry, I really don't understand what you mean. How do I put an error in Procmail? Thanks, Liam
Re: SA just stopped working
Peter H. Lemieux wrote: mouss wrote: Liam-PrintingAutomation wrote: given what you posted, you sa seems to be ok. you now need to make sure your sendmail is actually calling procmail. try putting an error in your You can tell procmail to log its actions by adding the following to the top of a procmailrc: LOGFILE=/path/to/logfile VERBOSE=yes If this a .procmailrc in a user's home directory, point the log to a location to which that user has write privileges, e.g., /home/user/procmailog. If it's in /etc/procmailrc, it's probably better to write it to some place like /var/log/procmail. OK, I added that to the top of /etc/procmailrc and it started logging: [EMAIL PROTECTED] log]# cat procmail procmail: [6329] Mon Mar 27 09:04:55 2006 procmail: Assigning "DROPPRIVS=yes" procmail: Assuming identity of the recipient, VERBOSE=off From [EMAIL PROTECTED] Mon Mar 27 09:04:55 2006 Subject: $399 Dell desktop with 15" flat panel deal. Folder: /var/mail/sue 32565 procmail: [6358] Mon Mar 27 09:05:52 2006 procmail: Assigning "DROPPRIVS=yes" procmail: Assuming identity of the recipient, VERBOSE=off From (anemailaddress)@FunniestStuff.net Mon Mar 27 09:05:52 2006 Subject: Barbell accident. Folder: /var/mail/merrilee 6130 procmail: [6373] Mon Mar 27 09:06:14 2006 procmail: Assigning "DROPPRIVS=yes" procmail: Assuming identity of the recipient, VERBOSE=off From [EMAIL PROTECTED] Mon Mar 27 09:06:14 2006 Subject: Re: [IPCop-user] "Destination Host Unreachable" on Orange Folder: /var/mail/liam 7497 [EMAIL PROTECTED] log]# That's interesting! Don't know exactly what use I can make of it, but it proves that procmail is being used, no? So, I don't understand. Procmailrc is being used and calling spamassassin: [EMAIL PROTECTED] log]# cat /etc/procmailrc LOGFILE=/var/log/procmail VERBOSE=yes DROPPRIVS=yes :0fw | /usr/bin/spamc [EMAIL PROTECTED] log]# and yet, the headers of the received e-mails don't show any Spamassassin additions. Not knowing exactly what it proves, I did what that earlier post suggested to try: [EMAIL PROTECTED] log]# echo blahblah > /tmp/bug [EMAIL PROTECTED] log]# cat /tmp/bug blahblah [EMAIL PROTECTED] log]# and [EMAIL PROTECTED] log]# logger -p mail.error -t bug bug [EMAIL PROTECTED] log]# tail maillog [..] Mar 27 09:14:50 s75712 bug: bug [..] That's kinda cool. So that appears to show that logging is working. What else can I look into? Thanks for the replies!! -Liam
Re: SA just stopped working
mouss wrote: Matt Kettler wrote: mouss wrote: Liam-PrintingAutomation wrote: [EMAIL PROTECTED] log]# cat procmail ok... cat some file procmail: [6329] Mon Mar 27 09:04:55 2006 procmail: Assigning "DROPPRIVS=yes" procmail: Assuming identity of the recipient, VERBOSE=off From [EMAIL PROTECTED] Mon Mar 27 09:04:55 2006 Subject: $399 Dell desktop with 15" flat panel deal. Folder: /var/mail/sue do you really have this by doing 'cat procmail'? Yes.. Note that he's in the log directory when doing this. Liam probably has a /var/log/procmail file that he's cat'ing. Lots of people reconfigure their syslog to better separate output, maybe it would work on your platform too :) I'm sorry, but this is the first time I'v seen a 'cat procmail'. now I'm sorry. I didn't know this was a linux centric list;-p Ah, sorry. I failed to mention what kind of server in my original post. =) My bad. -Liam
Re: SA just stopped working
mouss wrote: Liam-PrintingAutomation wrote: Ah, sorry. I failed to mention what kind of server in my original post. =) My bad. we can keep this game going a long time. my meaning was simply that people should make an effort to explain what they are talking about. I too can ask why my SA doesn't obey my C:\Program~1\Spam~1\badhdr.cf file. I am far from being perfect (and I have no desire to be so, because I know I can't). I just would like to see people posting without thinking that we're all running their platform. Uhm, wow. Not to get the thread too sidetracked, but seriously, I made a mistake an I apologize. I sincerely didn't mean to assume anything. I failed to mention what kind of server I was running, and as I said, "my bad." When I post to newsgroups I nearly always mention from the get-go something like "I'm running X application on a Fedora Core 4 Linux" or "RedHat AS 4.1" or whatever. I simply forgot when I started this thread. I seriously didn't mean to assume anything. I as much as anyone realize you shouldn't assume platforms. I have a Windows XP Pro, a Fedora Core 4, and a Windows 98 SE at home, I work on a Slackware 10.2 and Fedora Core 3 at work, and have servers running Fedora Core 2, and RedHat As 4.1, and we have a workstation running Mac OS X. Sorry if I opened up a can of worms. When I said "Ah, sorry," and "my bad," I meant it! -Liam
Re: SA just stopped working
Matt Kettler wrote: Liam-PrintingAutomation wrote: exactly what use I can make of it, but it proves that procmail is being used, no? So, I don't understand. Procmailrc is being used and calling spamassassin: [EMAIL PROTECTED] log]# cat /etc/procmailrc LOGFILE=/var/log/procmail VERBOSE=yes DROPPRIVS=yes :0fw | /usr/bin/spamc Question (which may have been covered earlier, and if it has, my bad)... Is spamd running? A most excellent question! =) How do I find out? Well goshdangit! I KNOW I have tried restarting the "spamassassin" service (which I hadn't before connected to being "spamd",) but I just checked again at it appears it wasn't running: [EMAIL PROTECTED] log]# /etc/rc.d/init.d/spamassassin status spamd is stopped So, I restarted it and tried a test message, and it came through tagged with spamassassin headers. I looked back at my posts, and I don't see where I mentioned I checked before or tried restarting spamassassin (like I did for sendmail, acknowledging that I know it shouldn't matter,) and I don't see that I'd checked it. My apologies; it's unforgivable that I didn't make a better effort to see if it was running or not before I posted by problem. I've wasted your time and electrons with my idiocy. =/ God I'm an idiot. Sorry again. =/ I guess the question for me to figure out now, is why did the service stop running! =/ Thanks, and sorry again. =( -Liam
Re: Help with install and config
Rick Macdougall wrote: Liam-PrintingAutomation wrote: Liam-PrintingAutomation wrote: Another question I have is on configuration. I ran $ man Mail::SpamAssassin::Conf and that's all real interesting, but I don't know Perl at all. How do I actually make the configuration changes, like the score level and how it tags the e-mail? Am I missing it in the MAN? I tried $ perl Mail::SpamAssassin::Conf but that does nothing. (Those of you who know Perl are probably saying DUH!) Nevermind that question, I found: /etc/mail/spamassassin/local.cf which appears to have all the settings I can think of needing to change. But I'm still wondering why the e-mails coming in still aren't getting checked through SpamAssassin, and curious as to how badly a bad install could hurt the mail reception process. Thanks! Hi, How are you calling spamassassin (or spamc)? What mail server software are you using ? More details required please. spamassassin, not spamc. Sorry, I thought I'd mentioned it earlier. We're using Sendmail. Actually, we are using Sendmail on the ES2 server SpamAssassin will be going on, but I'm only 90% sure we're using Sendmail on the FedoraCore3 server I'm testing it on. I'm not at work now, so I can't check, but we're using the FC3 "out of the box," so I guess it's using Sendmail. Sorry. Liam
Re: Help with install and config
Theo Van Dinter wrote: On Tue, Oct 18, 2005 at 07:14:46PM -0500, Liam-PrintingAutomation,Inc. wrote: How are you calling spamassassin (or spamc)? What mail server software are you using ? we're using the FC3 "out of the box," so I guess it's using Sendmail. So the question still remains -- how are you having sendmail call spamassassin? Well, that IS the question, then isn't it. Because I don't know. Evidently I'm not. I need to know how to. I don't seem to be finding anything on the site, so I must be missing it. I installed spamassassin, ran the test, found the config file, and that's it. If I need to do something else, I can't find it. A hint, a clue, a URL, is all I'm asking. Thanks! Liam
Re: Help with install and config
Rick Macdougall wrote: Hi, Well you need to call spamassassin (or spamc, that's a better option) somehow. You'll need amavis, mail-scanner, procmail or some other method of calling SA. Can't be much more help than that I'm afraid as I don't run sendmail. Ah, OK. I'll look into those things and see what I can find. Thanks for the tips! Liam