FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 04-21-2008, 07:15 PM
darren kirby
 
Default Qmail and Spamassassin won't integrate

Hello all,

I am quickly getting to the hair-pulling stage because I cannot accomplish the
simple setup of qmail and spamassassin. There is lots of docs out there, but
they all suggest completely different ways of doing things.

Here's what I have:
netqmail-1.05-r8
dovecot-1.0.13-r1
spamassassin-3.2.1-r1

These are all installed, and presumably working fine. That is: qmail is
accepting and delivering mail, spamd starts and runs with no errors, and I am
able to log in and get my mail using Dovecot and IMAP.

What I am trying to accomplish:

I just want qmail to run all incoming mail through spamassassin and add X-Spam
header for all spam it finds before it is delivered locally. With this I
shall be able to use .dovecot.sieve to place it in a spam folder for quick
review and deletion.

Here's a few attempts I have made to integrate spamassassin, and the results:

Attempt 1 (Docs: [0]):
* emerge 'safecat' to get 'maildir' binary.
* Put "| spamassassin -P | maildir ./Maildir/"
in "/var/qmail/control/defaultdelivery"

Result:
* mail is still delivered, but is not processed by spamassassin.
* It is my understanding that "X-Spam-Status" header should be added even if
the mail is not identified as spam.

Problems:
* Reading spamassassin docs leads me to believe that there is no "-P" option,
and that I should really be using 'spamc'. I tried replacing spamassassin
with spamc in "/var/qmail/control/defaultdelivery". No effect.

Attempt 2 (Docs: [1]):

* emerge 'mess822' (required by ifspamh)
* emerge 'ksh' (ifspamh is ksh script)
* Place 'ifspamh' in /usr/local/bin
* setup .qmail and .qmail-spam as per docs

Result:
* No mail delivery at all. No obvious errors in any logs, mail just dries up.

Attempt 3 (Docs: [2]):

* emerge 'qmail-scanner'

Result:
* emerge hangs forever while searching for plugins to add to
qmail-scanner-queue.pl. Some testing shows that the process is using no
resources, so: it's hanging doing nothing?!?

Problems:
* 'clamav' (a dependancy of qmail-scanner) emerge failed with something about
a gcc bug, and suggested I use a different compiler. I switched
to 'i686-pc-linux-gnu-3.4.6' from 'i686-pc-linux-gnu-4.1.1' and it compiles.
* Cannot get qmail-scanner to compile at all.
* Dead-end.

There is another method I have found, using simscan [3] but it seems to
require yet another third-party binary , and a patch to qmail, so I am not
really interested in trying, especially with all the failed attempts so far.

Conclusion:

Spamassassin and Qmail hate me.

Does anyone on this list have spamassassin integrated with qmail at the MTA
level? I would be very interested in which method you used, and your configs.

Is there something else I am missing?

Any other info you need please just ask.

[0] http://www.magma.com.ni/~jorge/spamassassin.html
[1] http://wiki.apache.org/spamassassin/IntegratedInQmailWithIfspamh
[2] http://wiki.apache.org/spamassassin/IntegratedInQmailWithQmailScanner

Thanks,
-d
--
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-21-2008, 10:10 PM
"Tim Garton"
 
Default Qmail and Spamassassin won't integrate

I run spamassassin with exim, so can't offer all that much help, but
as for attempt 1 you may try running:
spamc -R < {some file containing full source of a sample email}

to make sure spamassassin is running correctly. It should spit back a
score and a possibly a list of tests failed, depending on how
spamassassin is configured. if you don't get this, or get a score
like "0/0", something is wrong with your spamassassin setup.

Also, you don't want the "-P" option anymore, it is deprecated and is
the default behaviour of spamassassin now. And you definitely don't
want it with spamc, since it is an invalid option. And yes, you do
want to use "spamc" over "spamassassin" for performance reasons.


On Mon, Apr 21, 2008 at 12:15 PM, darren kirby <bulliver@badcomputer.org> wrote:
> Hello all,
>
> I am quickly getting to the hair-pulling stage because I cannot accomplish the
> simple setup of qmail and spamassassin. There is lots of docs out there, but
> they all suggest completely different ways of doing things.
>
> Here's what I have:
> netqmail-1.05-r8
> dovecot-1.0.13-r1
> spamassassin-3.2.1-r1
>
> These are all installed, and presumably working fine. That is: qmail is
> accepting and delivering mail, spamd starts and runs with no errors, and I am
> able to log in and get my mail using Dovecot and IMAP.
>
> What I am trying to accomplish:
>
> I just want qmail to run all incoming mail through spamassassin and add X-Spam
> header for all spam it finds before it is delivered locally. With this I
> shall be able to use .dovecot.sieve to place it in a spam folder for quick
> review and deletion.
>
> Here's a few attempts I have made to integrate spamassassin, and the results:
>
> Attempt 1 (Docs: [0]):
> * emerge 'safecat' to get 'maildir' binary.
> * Put "| spamassassin -P | maildir ./Maildir/"
> in "/var/qmail/control/defaultdelivery"
>
> Result:
> * mail is still delivered, but is not processed by spamassassin.
> * It is my understanding that "X-Spam-Status" header should be added even if
> the mail is not identified as spam.
>
> Problems:
> * Reading spamassassin docs leads me to believe that there is no "-P" option,
> and that I should really be using 'spamc'. I tried replacing spamassassin
> with spamc in "/var/qmail/control/defaultdelivery". No effect.
>
> Attempt 2 (Docs: [1]):
>
> * emerge 'mess822' (required by ifspamh)
> * emerge 'ksh' (ifspamh is ksh script)
> * Place 'ifspamh' in /usr/local/bin
> * setup .qmail and .qmail-spam as per docs
>
> Result:
> * No mail delivery at all. No obvious errors in any logs, mail just dries up.
>
> Attempt 3 (Docs: [2]):
>
> * emerge 'qmail-scanner'
>
> Result:
> * emerge hangs forever while searching for plugins to add to
> qmail-scanner-queue.pl. Some testing shows that the process is using no
> resources, so: it's hanging doing nothing?!?
>
> Problems:
> * 'clamav' (a dependancy of qmail-scanner) emerge failed with something about
> a gcc bug, and suggested I use a different compiler. I switched
> to 'i686-pc-linux-gnu-3.4.6' from 'i686-pc-linux-gnu-4.1.1' and it compiles.
> * Cannot get qmail-scanner to compile at all.
> * Dead-end.
>
> There is another method I have found, using simscan [3] but it seems to
> require yet another third-party binary , and a patch to qmail, so I am not
> really interested in trying, especially with all the failed attempts so far.
>
> Conclusion:
>
> Spamassassin and Qmail hate me.
>
> Does anyone on this list have spamassassin integrated with qmail at the MTA
> level? I would be very interested in which method you used, and your configs.
>
> Is there something else I am missing?
>
> Any other info you need please just ask.
>
> [0] http://www.magma.com.ni/~jorge/spamassassin.html
> [1] http://wiki.apache.org/spamassassin/IntegratedInQmailWithIfspamh
> [2] http://wiki.apache.org/spamassassin/IntegratedInQmailWithQmailScanner
>
> Thanks,
> -d
> --
> darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
> "...the number of UNIX installations has grown to 10, with more expected..."
> - Dennis Ritchie and Ken Thompson, June 1972
> --
> gentoo-user@lists.gentoo.org mailing list
>
>
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-21-2008, 11:13 PM
darren kirby
 
Default Qmail and Spamassassin won't integrate

quoth the Tim Garton:

Hi Tim,

> I run spamassassin with exim, so can't offer all that much help, but
> as for attempt 1 you may try running:
> spamc -R < {some file containing full source of a sample email}
>
> to make sure spamassassin is running correctly. It should spit back a
> score and a possibly a list of tests failed, depending on how
> spamassassin is configured. if you don't get this, or get a score
> like "0/0", something is wrong with your spamassassin setup.

Thanks for this. 'spamc -R < testmail' was failing (hanging forever)
while 'spamassassin < testmail' was working fine. This led me to run the
spamc command within strace, which showed the command blocked during
a 'connect' call to 127.0.0.7. Would you believe it was a firewall issue? I
forgot to allow conections to localhost in my iptables script.

> Also, you don't want the "-P" option anymore, it is deprecated and is
> the default behaviour of spamassassin now. And you definitely don't
> want it with spamc, since it is an invalid option. And yes, you do
> want to use "spamc" over "spamassassin" for performance reasons.

Thanks for the explanation.

After confirming spamc now works I played around some more. It seems my
~/.qmail file was overriding the system-wide spam check in 'defaultdelivery'.

I changed ~/.qmail from:

|/var/qmail/bin/preline -f /usr/libexec/dovecot/deliver

to:

|spamc |/var/qmail/bin/preline -f /usr/libexec/dovecot/deliver

...and everything seems to be cherry now. All incoming mail now has X-Spam
headers added.

-d
--
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-26-2008, 12:02 PM
Sean
 
Default Qmail and Spamassassin won't integrate

On Mon, Apr 21, 2008 at 05:13:21PM -0600, darren kirby wrote:
> quoth the Tim Garton:
>
> Hi Tim,
>
> > I run spamassassin with exim, so can't offer all that much help, but
> > as for attempt 1 you may try running:
> > spamc -R < {some file containing full source of a sample email}
> >
> > to make sure spamassassin is running correctly. It should spit back a
> > score and a possibly a list of tests failed, depending on how
> > spamassassin is configured. if you don't get this, or get a score
> > like "0/0", something is wrong with your spamassassin setup.
>
> Thanks for this. 'spamc -R < testmail' was failing (hanging forever)
> while 'spamassassin < testmail' was working fine. This led me to run the
> spamc command within strace, which showed the command blocked during
> a 'connect' call to 127.0.0.7. Would you believe it was a firewall issue? I
> forgot to allow conections to localhost in my iptables script.
>
> > Also, you don't want the "-P" option anymore, it is deprecated and is
> > the default behaviour of spamassassin now. And you definitely don't
> > want it with spamc, since it is an invalid option. And yes, you do
> > want to use "spamc" over "spamassassin" for performance reasons.
>
> Thanks for the explanation.
>
> After confirming spamc now works I played around some more. It seems my
> ~/.qmail file was overriding the system-wide spam check in 'defaultdelivery'.
>
> I changed ~/.qmail from:
>
> |/var/qmail/bin/preline -f /usr/libexec/dovecot/deliver
>
> to:
>
> |spamc |/var/qmail/bin/preline -f /usr/libexec/dovecot/deliver
>
> ...and everything seems to be cherry now. All incoming mail now has X-Spam
> headers added.
>

qmail-scanner (mail-filter/qmail-scanner) can take care of that too, as
well as running the email through clamav (assuming you have that
installed).

--
Sean

Guy in Chicken Suit: Enjoy your chicken sandwich.
Stewie Griffin: Enjoy your studio apartment.
 

Thread Tools




All times are GMT. The time now is 08:51 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org