Re: strange error in my procmailrc
[email protected] (Dale R. Worley) Mon, 23 Mar 2015 21:55:39 -0400
| Newsgroups | gmane.mail.procmail |
|---|---|
| Message-ID | <[email protected]> |
"@lbutlr" <[email protected]> writes: > when the procmailrc hands off mail for my personal account it logs an error: > > User [email protected] 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