Dave Stern wrote:
> I'm trying to get SA working by remote connections and don't see it
> consistantly working.
>
> Users kick off SA in their .procmailrc on our mail server which can't
> handle
> a more recent version of SA so we only have v2.64 installed locally.
> (Don't
> ask)
>
> What I'd like to do is have a call in their .procmailrc something like
> this
>
> :0fw: $HOME/spamassassin.lock
> | /opt/spamassassin/bin/spamc -d spamcheck.fqdn -t 10
>
> I have spamcheck.fqdn as a SRV record something like this:
>
> spamcheck       IN      SRV     1       1       783     samachine.fqdn.
>                 IN      SRV     2       1       783     mailmachine.fqdn.
>
> ie connect to port 783 on samachine and if it's not available, connect to
> same port on mailmachine and timeout within 10 seconds if neither works
Try this with multiple A records or CNAME records for the same name
instead of using SRV records.

(who on earth still uses SRV records for anything?)

Spamc will automatically resolve down to A records and if it has
multiple IPs, it try them in-order.

>From the spamc manpage:

**-d* /host[,host2]/*
    In TCP/IP mode, connect to spamd server on given host (default:
    localhost). Several hosts can be specified if separated by commas. 

    If /host/ resolves to multiple addresses, then spamc will fail-over
    to the other addresses, if the first one cannot be connected to. It
    will first try all addresses of one host before it tries the next
    one in the list.





>
> perhaps the timeout is too quick as I see no spamassassin headers in mail
> going thru even tho procmail logfiles say it executed the spamc line.
> I also tried variations on
>
> | /opt/spamassassin/bin/spamc -d 127.0.0.1,10 -d 128.8.120.159,10 -t 10

Erm.. what's the ,10 for in those -d fields? The normal format would be:

-d 127.0.0.1,128.8.120.159

(This also should do what you want)

>
> Has anyone done spam checking to multiple machines with some type of
> failover?
Many have, and the docs even say how. Many folks use this same and add
on the -H switch, which causes spamc to randomize what host it connects
to from the list, often used for crude but effective load balancing.

http://spamassassin.apache.org/full/3.1.x/dist/doc/spamc.html

Reply via email to