Vincent,
> Out of curiosity, I copy and paste the
> above bash function into the clamav's .bashrc which
> is the account to run amavisd...
Why not to .bashrc of the account you are running a command from,
in this case ~root/.bashrc ?
> I also copy and paste it into a bash program named timestamp
> and ran command below:
> su clamav -c 'spamassassin -t -D <test.msg' 2>&1 | ./timestamp
> No any debug lines show up. Which part I missed?
If you copied the whole set, including the 'function timestamp() {...}',
then executing ./timestamp does nothing, it just defined a function
in a shell subprocess, and then throws it away.
> If I run the above command as
> su clamav -c 'spamassassin -t -D <test.msg' 2>&1 | perl -MPOSIX
> -MTime::HiRes -n -e ' BEGIN {$|=1; $dp=0; $t0=Time::HiRes::time};
> $t=Time::HiRes::time; $dt=$t-$t0; printf("%s%06.3f %4.3f %4.3f %s",
> POSIX::strftime("%H:%M:",localtime($t)), $t-int($t/60)*60,
> $dt, $dt-$dp, $_); $dp=$dt' $*
> which worked
Either add the whole 'function timestamp() {...}' to .bashrc of
the account under which you need it, e.g. root (and not to forget
to 'source' it to make it available to a current shell process);
or prepare a shell script, with just a perl command, no 'function'
around it.
Mark
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/