Timestamp problem when running --debug-sa

shuttlebox shuttlebox at gmail.com
Mon Apr 7 15:30:05 IST 2008


I tried the new timestamp feature in --debug-sa introduced in 4.67 and
it complained about awk not supporting strftime, I kind of expected
that since Solaris comes with a legacy awk in /bin. I installed gawk
and it's in my path as can be seen below:

# which awk
/bin/awk
# which gawk
/opt/csw/bin/gawk

I then changed the two awk calls in SA.pm to gawk but still got this:

# MailScanner --debug --debug-sa
In Debugging mode, not forking...
Trying to setlogsock(udp)
sh: gawk: not found

*****
If 'awk' (with support for the function strftime) was
available on your $PATH then all the SpamAssassin debug
output would have the current time added to the start of
every line, making debugging far easier.
*****

I assume MailScanner uses some short custom path even though it claims
that it would work if I had gawk in my path which I do. If I hardcode
the complete path to my gawk (opt/csw/bin/gawk) I get the correct
result:

# MailScanner --debug --debug-sa
In Debugging mode, not forking...
Trying to setlogsock(udp)
16:17:44 SpamAssassin temp dir =
/var/spool/MailScanner/incoming/SpamAssassin-Temp

On a single system this could simply be solved by symlinking old awk
to new gawk but I would like a "clean" solution for my Solaris
packages, I will of course have to add gawk as a dependency to
MailScanner but should I just change the paths in SA.pm for my package
(that will have to be done for every release) or should MS look for
awk/gawk in more places or should we have a new config option for the
location of awk?

I'm fine with me changing the paths for every release, I have a
totally automated build script, but I'm a little surprised that no one
else has had problems. I guess most have GNU tools as the default...

-- 
/peter


More information about the MailScanner mailing list