[axxs-sysadmin] Spamassassin stuff
Sonia Hamilton
sonia at snowfrog.net
Tue Apr 8 16:20:21 PDT 2008
In the find statement do something hackish like:
-exec ~/foo.sh '{}' ';'
Then ~/foo.sh would be sth like:
#!/bin/bash
myfile=$1
cp $myfile /tmp
cat LINE_TO_ADD > $myfile
cat /tmp/${myfile} >> $myfile
rm /tmp/${myfile}
Test this first in a test directory of files - the full path may need to
be mangled somewhere, in which case you could strip it out using
$myfile=${myfile%%*/} etc.
Sonia.
On Tue, 2008-04-08 at 19:04 +1000, dave at netaxxs.com.au wrote:
> Need to prepend the command not append ;) otherwise it wont work and send to spamassassin first! Append is easy ;)
>
>
> ----- Message from intothemist at gmail.com -----
>
>
> > hey
> > try
> > find /var/qmail/mailnames/ -name ".qmail" -exec ls -ltr {} \;
> >
> > {} is expanded to be each filename found
> > "\;" is escaping the ";" to end the bash cmd lind (starts after "-exec")
> >
> > so ..
> >
> > ?find /var/qmail/mailnames/ -name ".qmail" -exec cat LINE_TO_ADD >> {}
> > \;
> >
> > ">>" is append
> >
> > On Mon, Apr 7, 2008 at 6:59 PM, Dave Fregon <dave at netaxxs.com.au> wrote:
> >> Added too /etc/sysconfig/spamassassin
> >>
> >> SPAMDOPTIONS="/usr/bin/spamd --username=popuser --daemonize
> >> --nouser-config --helper-home-dir=/var/qmail --max-children 5
> >> --create-prefs
> >> --virtual-config-dir=/var/qmail/mailnames/%d/%l/.spamassassin
> >> --pidfile=/var/run/spamd/spamd_full.pid
> >> --socketpath=/tmp/spamd_full.sock"
> >>
> >> prepended to /var/qmail/mailnames/axxs.org/axxs/.qmail (for example)
> >>
> >> | /usr/local/psa/bin/psa-spamc accept
> >>
> >> but then I got :
> >>
> >> Can't locate Mail/SPF/Query.pm in @INC
> >>
> >> in the logs, so grabbed Mail::SPF::Query from cpan and deps and installed
> >>
> >> everything seems go now checking logs for the axxs AT axxs.org
> >> account .. but this needs to be prepended to everyones .qmail file
> >> not overwriting everything.
> >>
> >> anyone know how to do this with sed or something similar?
> >>
> >> --
> >> Dave Fregon
> >>
> >> NetAxxs Workers Collective
> >> Ph: +613 5721 7777
> >> Mob: 0434 000 234
> >> 25A Ely Street
> >> Wangaratta 3677
> >> Australia
> >>
> >> _______________________________________________
> >> axxs-sysadmin mailing list
> >> axxs-sysadmin at lists.indymedia.org
> >> http://lists.indymedia.org/mailman/listinfo/axxs-sysadmin
> >>
> >
> >
> >
> > --
> > Andy Nicholson
> >
> > +44 774 733 4891 [ .uk ]
> >
> > +61 406 306 715 [ .au ]
> > _______________________________________________
> > axxs-sysadmin mailing list
> > axxs-sysadmin at lists.indymedia.org
> > http://lists.indymedia.org/mailman/listinfo/axxs-sysadmin
> >
> _______________________________________________
> axxs-sysadmin mailing list
> axxs-sysadmin at lists.indymedia.org
> http://lists.indymedia.org/mailman/listinfo/axxs-sysadmin
--
Thanks,
Sonia Hamilton
http://soniahamilton.wordpress.com
http://www.linkedin.com/in/soniahamilton
More information about the axxs-sysadmin
mailing list