Um... I'm sorry, this is not a bug.
I'm running courier-imap on Solaris 7 with VxFS. The IMAP_EMPTYTRASH doesn't work.
I have mounted with "largefile" option.
I think VxFS (or VxFS with "largefile" option) is not compatible with courier-imap..
See:
maildir/maildirpurgetmp.c (courier-imap 1.4.2):
------------------snip snip---------------------
static void dopurge(const char *m, unsigned nage)
{
time_t current_time;
DIR *dirp;
struct dirent *de;
time (¤t_time);
dirp=opendir(m);
while (dirp && (de=readdir(dirp)) != 0)
{
char *z;
struct stat stat_buf;
if (de->d_name[0] == '.') continue;
z=malloc(strlen(m)+strlen(de->d_name)+2);
if (!z) continue;
strcat(strcat(strcpy(z, m), "/"), de->d_name);
if (stat(z, &stat_buf) == 0
- && stat_buf.st_ctime < current_time - nage)
+ && stat_buf.st_mtime < current_time - nage)
unlink(z);
free(z);
}
if (dirp) closedir(dirp);
}
-------------- snip snip -----------------------
Why? I'don't know. But I think the stat() (c function) has a problem with VxFS with largefile, the stat_buf.st_ctime get the current time, if you put the stat_buf.st_mtime you get the "creation time".
What do you think?
Federico Edelman writes:
> Hi!
> I'm trying IMAP_EMTPYTRASH. I put in environment variable:
>
> IMAP_EMPTRYTRASH=Trash:7
>
> My courier-imap is 1.3.10.
>
> The message on Trash never has been deleted.
>
> I change the source code of:
>
> Imap/imapd.c
>
> ------------------- snip snip --------------------------------------
>
> void emptytrash()
> {
> char *dir, *all_settings, *next_folder, *folder, *p;
> unsigned l;
>
> all_settings=getenv("IMAP_EMPTYTRASH");
>
> if (!all_settings)
> return;
>
> all_settings=strdup(all_settings);
> if (!all_settings)
> return;
>
> - if (strchr(all_settings, ':') == 0 &&
> + if (strchr(all_settings, ':') == 0 ||
> strchr(all_settings, ',') == 0)
> {
> l=atoi(all_settings);
>
> if (l <= 0)
> l=1;
>
>
> ------------------- snip snip --------------------------------------
>
> make, make install ... and the messages has been deleted.
>
>
> Is this a bug?
No.
--
Sam
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
