procmail
[Top] [All Lists]

Re: strange error in my procmailrc

2015-03-23 20:56:08
"@lbutlr" <kremels(_at_)kreme(_dot_)com> writes:
when the procmailrc hands off mail for my personal account it logs an error:

User me(_at_)mail(_dot_)covisp(_dot_)net has a .procmailrc, processing...
date: illegal time format
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
            [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]

None of the other accounts with .procmailrcs log this error, but when I look 
in my .procmailrc for date:

$ grep date /home/me/.procmailrc 
DATE=`date '+%d-%b-%Y'`
MDATE=`date '+%Y-%m'`
YDATE=`date '%Y'`
LONGDATE=`date "+%y-%b-%d %I:%M:%S %z"`
LOG="`date`${NL}Checking Spam Status... "
  LOG="done. `date`$NL"
  LOG="Delivered `date`$NL"
LOG="Delivered `date`$NL"

None of these seem like they should be throwing any sort of
error. They all execute fine from the command line and date is in
/bin/ so I don't think it could be a path problem. Also, there are not
errors logged to my procmailk log file, only to the global log file/

It's a rather strange problem.  Of course, if you compare YDATE=`date
'%Y'` with the usage message that you see, you can tell that it has an
invalid argument.  But that's rather hard to spot if you don't know
where to look.

What I find odd is that if I execute that on my command line, date says
"date: invalid date '%Y'".  So I wonder if YDATE=`date '%Y'` really does
not report an error message when you execute it on your command line,
and if not, why.

Dale
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>