Re: bayes table crashed

2010-06-16 Thread Henrik K
On Tue, Jun 15, 2010 at 12:48:37PM -0600, LuKreme wrote:
 When trying to dump the local MySQL databases I get:
 
 mysqldump: Got error: 145: Table './bayes/bayes_token' is marked as crashed 
 and should be repaired when using LOCK TABLES
 
 Anything I need to be aware of?

Never use MyISAM tables for Bayes.

Other than that, this is completely a MySQL topic. Repair your table.



Re: List of cell phone company hosts

2010-06-16 Thread Matus UHLAR - fantomas
please configure your mailer to wrap lines below 80 characters per line.
72 to 75 is usually OK.

 On Jun 11, 2010, at 7:23 PM, Marc Perkel wrote:
  Also - I'd like to make a list of host names where email from celll
  phones comes from. Does anyone have a list of domain name or host names
  where cell phone email is sent from?

What's the point? I';ve had similar idea because mails sent through SMS and
MMS gateways of Slovak cell phone operators were detected as spam because of
their lame encodings etc.

On 14.06.10 15:33, J.D. Falk wrote:
 The US FCC maintains a do not email list of domains of email/sms
 gateways, which might be a start.  (Sorry, I'm on a plane and can't look
 up the URL just now.)
 
 Thing is, my cell phone submits messages via the same authenticated relays
 as my laptop, and that's increasingly more common than the fugly old
 gateway architecture.  Maybe there's another way to achieve whatever it is
 you're trying to do?

submits in what way? Are you talking about accessing your mailbox from your
cellphone, special mailbox only for cellphone where you forward your e-mail
to get notifications about it, or SMS2mail gateway fby which you can send
e-mail from any phone that supports sending of SMS?

-- 
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
To Boot or not to Boot, that's the question. [WD1270 Caviar]


Re: RTF casino spams

2010-06-16 Thread RW
On Wed, 16 Jun 2010 12:11:26 +0200
Marcus li...@localguru.de wrote:

 Helo,
 
 could someone send me a working rule against these empty emails with
 RTF attchments, which contains links to online casinos?
 
Karsten Bräckelmann posted a useful rule for rtf spams

http://www.mail-archive.com/users@spamassassin.apache.org/msg73382.html


SpamAssassin Integration

2010-06-16 Thread Gnanam

Hi,

I want to integrate SpamAssassin in my web-based application to test spam
score of the email content that our application User's wish to send in
mail composing page itself - even before sending.  When I say mail composing
page here, it is not an email client like Outlook, Outlook Express, etc. but
rather it is a regular/normal web-based form with HTML editor.

How do I integrate SpamAssassin for my Use Case explained above?  Relevant
documentation links on the same are appreciated.

Regards,
Gnanam
-- 
View this message in context: 
http://old.nabble.com/SpamAssassin-Integration-tp28903365p28903365.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.



Re: RTF casino spams

2010-06-16 Thread Jari Fredriksson
On 16.6.2010 14:54, RW wrote:
 On Wed, 16 Jun 2010 12:11:26 +0200
 Marcus li...@localguru.de wrote:
 
 Helo,

 could someone send me a working rule against these empty emails with
 RTF attchments, which contains links to online casinos?

 Karsten Bräckelmann posted a useful rule for rtf spams
 
 http://www.mail-archive.com/users@spamassassin.apache.org/msg73382.html

I just wish the author of ExtractText plugin had the time to get the
plugin to work with 3.1.1.

Also I think some of the binaries the plugin calls are broken. It was
pdf2text I think did not accept the arguments the plugin is passing to
it, no matter that that they are documented. It fails with the output
file name - for stdout.

Also the plugin parameters for unrtf look suspcious for me.

unrtf -t ExtractText.tags --nopict just-testing.rtf

The argument for -t should be text/html etc. according to docs.
ExtractText.tags or some other file name is not documented to work.

Somehow it still not report any error codes when used like that, but the
ExtractText plugin says and error code was returned. No idea why is
that. unrtf outputs html with those parameters, and exit code is 0.

I miss ExtractText. Would be cool to get the text for bayes and uribl.

-- 
http://www.iki.fi/jarif/
I use PGP. If there is an incompatibility problem with your mail
client, please contact me.

No violence, gentlemen -- no violence, I beg of you!  Consider the
furniture!
-- Sherlock Holmes



signature.asc
Description: OpenPGP digital signature


Re: SpamAssassin Integration

2010-06-16 Thread Jari Fredriksson
On 16.6.2010 17:18, Gnanam wrote:
 
 Hi,
 
 I want to integrate SpamAssassin in my web-based application to test spam
 score of the email content that our application User's wish to send in
 mail composing page itself - even before sending.  When I say mail composing
 page here, it is not an email client like Outlook, Outlook Express, etc. but
 rather it is a regular/normal web-based form with HTML editor.
 
 How do I integrate SpamAssassin for my Use Case explained above?  Relevant
 documentation links on the same are appreciated.
 

You need to prepare a valid looking email message from the text the web
app produces. It needs all the required headers before the actual body
of text to work. You may need to study SMTP RFC's to get it right, the
simple looking headers like Date: and Received: need to be carefully
crafted after the standards.

The just use ProcessBuilder in your Java app to connect to spamc and
pass the message for it, and read the results.

-- 
http://www.iki.fi/jarif/
I use PGP. If there is an incompatibility problem with your mail
client, please contact me.

Exercise caution in your daily affairs.



signature.asc
Description: OpenPGP digital signature


Re: SpamAssassin Integration

2010-06-16 Thread Charles Gregory

On Wed, 16 Jun 2010, Gnanam wrote:

I want to integrate SpamAssassin in my web-based application to test spam
score of the email content...


If this is your own custom web software, then it is as simple as adding a 
call to spamassassin (or spamc) in the same area of the script that 
validates things like the format of e-mail addresses. You can keep it 
simple and just report spamassassin's exit code, or you could parse the 
results from SA and pass them back to your user, so that they know what 
rules were triggered, and how to correct their e-mail.


If your web interface is pre-packaged piece of software, then it likely 
sends mail via your local SMTP server by calling 'sendmail' or an 
equivalent function that mimics that command. As long as the web client 
handles SMTP rejections and notifies users of problems sending, you 
should be able to run spamassassin normally in the context of your 
outgoing mail server.


- Charles


Re: bayes table crashed

2010-06-16 Thread Alex
Hi,

 mysqldump: Got error: 145: Table './bayes/bayes_token' is marked as crashed 
 and should be repaired when using LOCK TABLES

 Anything I need to be aware of?

 Never use MyISAM tables for Bayes.

I am working on migrating bayes here to MySQL, and have found this document:

http://www200.pair.com/mecham/spam/debian-spamassassin-sql.html

Has anyone followed this document before? Can someone review it
briefly for me and give me an idea if it is the best approach to do
the migration?

Thanks,
Alex


Re: SpamAssassin Integration

2010-06-16 Thread Frank Heydlauf
Hi,

On Wed, Jun 16, 2010 at 07:18:57AM -0700, Gnanam wrote:
 
 I want to integrate SpamAssassin in my web-based application to test spam
 score of the email content that our application User's wish to send in
 mail composing page itself - even before sending.  When I say mail composing
 page here, it is not an email client like Outlook, Outlook Express, etc. but
 rather it is a regular/normal web-based form with HTML editor.

Would this really help? 
Could you tell us a bit more about your problem itself?

The reason I ask is: the mailbody is a very small part of what is
commonly used for antispam measures. Header is added afterwards,
IP is not yet known, HELO is not known, no reputation, no RBLs, no
phyzor/razor/...  
It's not easy to get a SA score 5 if anything else is OK (IP
reputation/RBLs, DNS, Header, HELO, ...) - just try yourself
(spamassassin -t testmail).
So - in my eyes - body-testing will give you little benefit - at
least as long you are not developing a spam toolkit.

-- 
Regards
Frank


Re: SA not filtering on distribution lists??!

2010-06-16 Thread Ted Mittelstaedt

Well I have a bit more info on this now.

The problem goes away IF I put the aliases as usernames into
the password file

For example:

tedm - in password file
eatme - not in password file

/etc/mail/aliases

eatme: tedm

problem happens.


tedm - in password file
eatme - ALSO in password file

/etc/mail/aliases

eatme: tedm

problem DOES NOT happen.

I am suspecting something in how spamd is passing data to spamass-milter
though the socket.

spamd complains in the log when the userID doesen't exist:

spamd: handle_user unable to find user: eatme

even though the userID is in the alias file.  Whenever I see that
complaint then I see the following a bit later in the log:

ail sm-mta[88401]: o5GIG91G088401: Milter delete: header X-Spam-Status: 
No, score=0.7 required=
ail sm-mta[88401]: o5GIG91G088401: Milter delete: header 
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2


and while the message is delivered, it is lacking any evidence that it
has been checked with Spamassassin, (no headers) even though 
/var/log/maillog clearly showed that it was.


I have another mailserver configured with
the same version of spamassassin, AND spamass-milter that does NOT do
this.  However, the problem server is FreeBSD 6.2 and the other server
is FreeBSD 7.3 plus newer versions of all the perl modules that are used
by SA, as well as sendmail version 8.14.4 on the newer server, so the
milter libraries are newer.

Ted

On 6/15/2010 12:11 PM, Ted Mittelstaedt wrote:

spamass-milter

Ted

On 6/15/2010 11:55 AM, Jari Fredriksson wrote:

On 15.6.2010 21:31, Ted Mittelstaedt wrote:

Hi All,

OK I thought I knew SA but I have a strange one here that is
probably due to a configuration directive set wrong, but I don't
know what it is.

System is running sendmail and SA 3.2.5

mails sent to user e-mail addresses get checked, and get the
X-Spam-Status header placed in them.

Mails sent to a e-mail distribution list (ie: sa...@example.com)
do not get checked.

any suggestions?


SpamAssassin does no make any difference about sa...@example.com and
other addresses. It scans all mail passed to it.

If some mail is not passed to SpamAssassin, the decision to not scan is
made in software that is responsible starting SpamAssassin (in form or
spamc or spamassassin executables, or Mail::SpamAssassin perl library
code).

What is initiating SpamAssassin in your setup?



Re: SA not filtering on distribution lists??!

2010-06-16 Thread Martin Gregorie
On Wed, 2010-06-16 at 12:14 -0700, Ted Mittelstaedt wrote:
 Well I have a bit more info on this now.
 
 The problem goes away IF I put the aliases as usernames into
 the password file
 
What you've demonstrated is that this is an MTA problem whose
implications depend critically on when and how the MTA uses the aliases
file in conjunction with the collection of known valid mail destinations
to determine whether mail is deliverable. In particular, can matter
whether this is before or after calling the milter/invoking SA.

 For example:
 
 tedm - in password file
 eatme - not in password file
 
 /etc/mail/aliases
 
 eatme: tedm
 
 problem happens.
 
 tedm - in password file
 eatme - ALSO in password file
 
 /etc/mail/aliases
 
 eatme: tedm
 
 problem DOES NOT happen.
 
It appears from this that your MTA calls the milter BEFORE using aliases
to determine the message's destination. Other MTAs may get a different
result by calling the milter after the aliases translation chain has
been completed.

 I am suspecting something in how spamd is passing data to spamass-milter
 though the socket.
 
It matters a lot whether this is done before or after the message is
passed to SA via the milter. IOW, if the deliverability check is done
before the milter is called, SA will never see undeliverable mail. 

Its nothing to do with the way spamc/spamd work - they can only handle
messages that are passed to them and don't have any ability to skip a
message except on size grounds.

 spamd complains in the log when the userID doesen't exist:
 
 spamd: handle_user unable to find user: eatme
 
This sounds like a combined MTA/milter thing. If the MTA passes the
message to SA before it has used aliases to determine where the message
is to be delivered *AND* your milter is running SA under the destination
user then of course you'll see SA fail to process the message. This is
not for some internal SA quirk, but because the OS prevents it from
running under a non-existent user or one that won't grant it permission
to execute.
 
 even though the userID is in the alias file.  Whenever I see that
 complaint then I see the following a bit later in the log:
 
 ail sm-mta[88401]: o5GIG91G088401: Milter delete: header X-Spam-Status: 
 No, score=0.7 required=
 ail sm-mta[88401]: o5GIG91G088401: Milter delete: header 
 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2
 
 and while the message is delivered, it is lacking any evidence that it
 has been checked with Spamassassin, (no headers) even though 
 /var/log/maillog clearly showed that it was.
 
What you're seeing is the milter cleaning up after spamd was unable to
run as the requested user.


Martin




Re: SA not filtering on distribution lists??!

2010-06-16 Thread Ted Mittelstaedt



On 6/16/2010 1:15 PM, Martin Gregorie wrote:

On Wed, 2010-06-16 at 12:14 -0700, Ted Mittelstaedt wrote:

Well I have a bit more info on this now.

The problem goes away IF I put the aliases as usernames into
the password file


What you've demonstrated is that this is an MTA problem whose
implications depend critically on when and how the MTA uses the aliases
file in conjunction with the collection of known valid mail destinations
to determine whether mail is deliverable. In particular, can matter
whether this is before or after calling the milter/invoking SA.


For example:

tedm - in password file
eatme - not in password file

/etc/mail/aliases

eatme: tedm

problem happens.

tedm - in password file
eatme - ALSO in password file

/etc/mail/aliases

eatme: tedm

problem DOES NOT happen.


It appears from this that your MTA calls the milter BEFORE using aliases
to determine the message's destination. Other MTAs may get a different
result by calling the milter after the aliases translation chain has
been completed.


I am suspecting something in how spamd is passing data to spamass-milter
though the socket.


It matters a lot whether this is done before or after the message is
passed to SA via the milter. IOW, if the deliverability check is done
before the milter is called, SA will never see undeliverable mail.

Its nothing to do with the way spamc/spamd work - they can only handle
messages that are passed to them and don't have any ability to skip a
message except on size grounds.


spamd complains in the log when the userID doesen't exist:

spamd: handle_user unable to find user: eatme


This sounds like a combined MTA/milter thing. If the MTA passes the
message to SA before it has used aliases to determine where the message
is to be delivered *AND* your milter is running SA under the destination
user then of course you'll see SA fail to process the message. This is
not for some internal SA quirk, but because the OS prevents it from
running under a non-existent user or one that won't grant it permission
to execute.



OK after rereading the docs for spamass-milter and your explanation
I think the light dawned.

Here's the invocation of spamass-milter on the working server:

/usr/local/sbin/spamass-milter -f -p /var/run/spamass-milter.sock

And here is the invocation on the non-working server:

/usr/local/sbin/spamass-milter -f -u root -p /var/run/spamass-milter.sock

When I first setup spamass-milter I read the man page where it said:


 -u defaultuser
 Pass the username part of the first recipient to spamc 
with the
 -u flag.  This allows user preferences files to be used. 
If the

 message is addressed to multiple recipients, the username
 defaultuser is passed instead.

 Note that spamass-milter does not know whether an email is 
incom-

 ing or outgoing, so a message from us...@localdomain.com to
 us...@yahoo.com will make spamass-milter pass -u user2 to
 spamc.

I interpreted the -u root as a forced username, meaning any messages
passed to spamc would contain root as their username, the idea being
that since many recipient userID wouldn't exist (as the case with both 
an outbound user and an alias entry) it would provide a default user 
ID for the scoring, as well as insure that everything runs under the

root userID

But instead this is a polymorphic option basically meaning the exact
opposite.

From the looks of it, normally WITHOUT this userID, spamass-milter runs
everything under the root userID.  This is what you want if the 
mailserver is being used as both an incoming and outgoing mailserver.


With this option, if the message recipient username portion happens
to match a userID on the mailserver, then spamass-milter apparently
runs spamc under that UID and uses that users score file/bays file, etc.
This is great if the server is a destination server not used for
outbound relays.

Of course, you have the problem of aliases - but you either do what I
did which is create a UID for each alias entry or you just don't use
aliases at all.

What is dumb, though is that spamass-milter is basically locked to
sendmail  (since no other MTA implements a milter interface, although
I think that one other one out there is beginning to) and sendmail
does alias expansions and comma expansions AFTER the milter is run - 
thus you would never get a situation of multiple recipients being

passed to the milter unless the mail originated from the localhost
server itself (very unlikely since even clients like Pine which are
intended to run on the server, pass the mail via smtp to the localhost)

Arr!  Damn man pages!

Ted


even though the userID is in the alias file.  Whenever I see that
complaint then I see the following a bit later in the log:

ail sm-mta[88401]: o5GIG91G088401: Milter delete: header X-Spam-Status:
No, score=0.7 required=
ail sm-mta[88401]: o5GIG91G088401: Milter delete: header

Re: SA not filtering on distribution lists??!

2010-06-16 Thread Martin Gregorie
On Wed, 2010-06-16 at 15:27 -0700, Ted Mittelstaedt wrote:
 
 OK after rereading the docs for spamass-milter and your explanation
 I think the light dawned.
 
Yep, your view looks right. I can't say more because once I got a look
at sendmail configuration and saw the huge chunks missing from the
O'Reilly Sendmail book I headed straight for Postfix.
 
 Of course, you have the problem of aliases - but you either do what I
 did which is create a UID for each alias entry or you just don't use
 aliases at all.
 
They're useful: I redirect all root's mail to my usual mailbox and sweep
up a bit of other stuff such as cron mail and mandatory mail and web
usernames, so in a normal day I don't need to visit root at all.

 What is dumb, though is that spamass-milter is basically locked to
 sendmail  (since no other MTA implements a milter interface, although
 I think that one other one out there is beginning to) and sendmail
 does alias expansions and comma expansions AFTER the milter is run - 
 thus you would never get a situation of multiple recipients being
 passed to the milter unless the mail originated from the localhost

To me the real problem is that, by calling spamass-milter before
applying alias translation you are prevented from using aliases to allow
users like postmaster, abuse and webmaster to be nonexistent by
redirecting them to root or a single dedicated user and still be able to
use spamass-milter's -u option for per-user SA rules. Thats also a
situation where per-user SA preferences could be rather useful.

 server itself (very unlikely since even clients like Pine which are
 intended to run on the server, pass the mail via smtp to the localhost)
 
Que? Surely an inbound message addressed
To: j...@example.com, m...@example.com, s...@example.com 
would cause spamd to be run under the user specified with -u. However, I
agree that -u wasn't a good option to use since it usually means use
this user.


Martin



Re: SpamAssassin Integration

2010-06-16 Thread Gnanam


If this is your own custom web software, then it is as simple as adding a 
 call to spamassassin (or spamc) in the same area of the script that 
 validates things like the format of e-mail addresses.

I want to do spam score test for only the email content part of the email
message.  In that case, is it possible to call spamassassin or spamc?  Based
on spamc documentation here
http://spamassassin.apache.org/full/3.1.x/doc/spamc.html, it accepts only
email message as it command-line argument.  Is it possible to pass .html,
.txt extension file types, since I want to get spam score of the email
content part only and not the entire email message itself?



 If your web interface is pre-packaged piece of software, then it likely 
 sends mail via your local SMTP server by calling 'sendmail' or an 
 equivalent function that mimics that command. As long as the web client 
 handles SMTP rejections and notifies users of problems sending, you 
 should be able to run spamassassin normally in the context of your 
 outgoing mail server.
Mine is our own custom web software except that we've signed-up with a
third-party SMTP service provider to send emails, so this SMTP server is
completely managed and maintained by this third-party.  Yes, as you rightly
said, spamassassin is already running/integrated with this third-party SMTP
mail service provider.  What we want to achieve in our application is that
before actually sending mails, Users themselves can run spam score test on
one portion of their email message, that is their email content part.
-- 
View this message in context: 
http://old.nabble.com/SpamAssassin-Integration-tp28903365p28910672.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.