[ingo] Procmail vacation script -- ctime vs mtime

Jan Schneider jan at horde.org
Tue Jan 25 21:14:55 UTC 2011


Zitat von Zachary Kotlarek <zach at kotlarek.com>:

>
> On Jan 24, 2011, at 11:11 AM, Jan Schneider wrote:
>
>> Zitat von Zachary Kotlarek <zach at kotlarek.com>:
>>
>>>
>>> On Jan 22, 2011, at 11:43 AM, Jan Schneider wrote:
>>>
>>>> This piece of code seem to have been working fine for the last 7  
>>>> years for everyone else, so I'm a but reluctant to change it,  
>>>> especially since I don't use procmail.
>>>>
>>>> This is the patch that added it:  
>>>> http://git.horde.org/diff.php/ingo/lib/Script/procmail.php?rev=1.51&rt=horde&r1=1.44&r2=1.45
>>>
>>>
>>> In many cases it does work; absent inode modifications ctime and  
>>> mtime are always the same. But when they are different I don't  
>>> know why you'd prefer the ctime.
>>>
>>> I emailed the contributor noted in the original patch (or at least  
>>> tried -- as you noted it's quite old). Maybe they can explain the  
>>> intent.
>
>
>
> I talked to Micha. We seem to agree on what both the ctime and mtime  
> versions of the script would do, we just disagree on what the  
> "right" behavior is. I guess one man's bug is another man's feature.
>
> Here's the example Micha presented:
> You create a backup that includes the vacation address cache and  
> restore it sometime later, preserving the mtime as tar/etc. will do  
> given sufficient permissions. With the ctime version (the one  
> currently in ingo) procmail will ignore this restored mtime and  
> instead use the time of the backup restoration as the "last change"  
> to the address cache. Under the mtime version I proposed it would  
> use the last-modified time recorded in the archive from before the  
> backup, even if it had been weeks before the backup was restored.
>
> I assumed no one would want the ctime behavior, but apparently  
> that's not true; given that no one else has complained for 7 years  
> I'm willing to accept that I'm the odd-man-out and just patch my  
> local version. It's not like I'll have a hard time tracking that  
> one-character change against the master repo.
>
> 	Zach
>
>

Thanks.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the ingo mailing list