[hashcash] hashcash-sendmail fix and comments (Re: Re: Mutt and hashcash)

On Sun, Mar 07, 2004 at 07:42:02PM -0600, Kyle Hasselbacher wrote:
> >and the parsing code with grep( /^--$/ .. 0, @args ) wasn't working
> >out.  I didn't understand what that grep is supposed to do, so I
> >changed to:

OK, now I figured out what the grep( /^--$/ .. 0, @args ) idiom means,
I found the fix:

replace the 0 with undef:

grep( /^--$/ .. undef, @args )

I suppose it could be perl version specific problem even.  I have
5.8.3 on fedora-core1.  I can only suppose that as /^--$/ is matching
a string that the 2nd arg is also converted to a string and "0" is
probably true as a string (in some versions of perl)??

Another thing I am doing (because not root on ssh / mutt mail reading
host and processes get killed after a while):

In .login (using tcsh) I put:

if ( `ps -x | grep hashcash-daemon | grep -v grep` == "" ) then
    hashcash-daemon &
endif

To start a hashcash-daemon if there is not one running.

Perhaps another way to do this would be an argument to
hashcash-sendmail which could cause it to start a daemon.  (It could
for example keep track using a file with the process id, which is
removed by hashcash-daemon when it receives kill signal).

btw you might want a lower default?  I've put ^:20:19 in
.hashcash/bitconf.  26 bits is a fair bit of grunt on a multi-user
system where you are not root.

Adam

Other related posts: