Hello Len,

I've hacked the serialcmd.c file in your maildircmd-1.0.patch.
Changing 

  if (!stralloc_catulong0(&line,age,7)) die_nomem();
  env_put2("AGE",line.s);

  /* Initialize a substdio buffer. */
  substdio_fdbuf(&ssmess,read,fd,messbuf,sizeof messbuf);

into

  if (!stralloc_catulong0(&line,age,7)) die_nomem();
  env_put2("AGE",line.s);

  /* Put filename in env */ 
  env_put2("FILENAME",fnam.s);

  /* Initialize a substdio buffer. */
  substdio_fdbuf(&ssmess,read,fd,messbuf,sizeof messbuf);

makes maildircmd passing the filename of the currently
being processed message to the command it's running, using
the FILENAME environment variable. I think this is a
usefull additional feature. (For me it is :-)

BTW, command needs to combine PWD and FILENAME to 
contruct the full pathname of the file it's reading
on it's stdin. 

Could you consider adding this feature to maildircmd?

Kind Regards,


Joost van Baal

Reply via email to