CODA and VPOPMAIL

2001-03-08 Thread Andrea Cerrito

(sorry if this message will exist twice)

Hi to all,

I'm trying to test a future production system using qmail + vpopmail +
codafs.

I know there is a patch for qmail to run on codafs, using Maildirs (function
link(from,to) isn't allowed on codafs), and I think I've to do the same on
vpopmail.
Here is the patch for qmail (qmail-local)

= begin
*** qmail-local.c.orig Tue Mar 14 10:21:56 2000
--- qmail-local.c Tue Mar  7 11:49:35 2000
***
*** 127,134 
--- 127,138 
   if (fsync(fd) == -1) goto fail;
   if (close(fd) == -1) goto fail; /* NFS dorks */

+ #ifdef NFS_HACK
   if (link(fntmptph,fnnewtph) == -1) goto fail;
 /* if it was error_exist, almost certainly successful; i hate NFS */
+ #else
+  if (rename(fntmptph,fnnewtph) == -1) goto fail;
+ #endif
   tryunlinktmp(); _exit(0);
   fail: tryunlinktmp(); _exit(1);

= end

This patch allow another (even not so sure) method of switching files
between dirs. I saw that vpopmail code is using the same technique as qmail,
and infact, after patching qmail, I have that problem only to virtual
accounts (#4.3.4).

Do you think sufficient changing all link(from,to) into rename(from,to)
functions in all .c of vpopmail?
Is there an official patch to vpopmail to work on codafs?

Thank you

---
Cordiali saluti / Best regards
Andrea Cerrito
^^
Net.Admin @ Centro MultiMediale di Terni SpA
P.zzale Bosco 3A
05100 Terni IT
Tel. 0744 / 5441330
Fax. 0744 / 5441372




Re: CODA and VPOPMAIL and link/rename

2001-03-08 Thread Ken Jones

This is really interesting. So CODA has problems with the link/unlink
function but works okay with the rename function. Hmm.. why not
change all the link's in vpopmail to renames?

Is there any major performance problem or other gotcha's we could
run into if we switched the links to renames? If not, let's make
the change.

While we are at it. There is an fsync in vdelivermail.c. I don't
really see a reason and it would just increase the disk I/O load.

Ken


Andrea Cerrito wrote:
 
 (sorry if this message will exist twice)
 
 Hi to all,
 
 I'm trying to test a future production system using qmail + vpopmail +
 codafs.
 
 I know there is a patch for qmail to run on codafs, using Maildirs (function
 link(from,to) isn't allowed on codafs), and I think I've to do the same on
 vpopmail.
 Here is the patch for qmail (qmail-local)
 
 = begin
 *** qmail-local.c.orig Tue Mar 14 10:21:56 2000
 --- qmail-local.c Tue Mar  7 11:49:35 2000
 ***
 *** 127,134 
 --- 127,138 
if (fsync(fd) == -1) goto fail;
if (close(fd) == -1) goto fail; /* NFS dorks */
 
 + #ifdef NFS_HACK
if (link(fntmptph,fnnewtph) == -1) goto fail;
  /* if it was error_exist, almost certainly successful; i hate NFS */
 + #else
 +  if (rename(fntmptph,fnnewtph) == -1) goto fail;
 + #endif
tryunlinktmp(); _exit(0);
fail: tryunlinktmp(); _exit(1);
 
 = end
 
 This patch allow another (even not so sure) method of switching files
 between dirs. I saw that vpopmail code is using the same technique as qmail,
 and infact, after patching qmail, I have that problem only to virtual
 accounts (#4.3.4).
 
 Do you think sufficient changing all link(from,to) into rename(from,to)
 functions in all .c of vpopmail?
 Is there an official patch to vpopmail to work on codafs?
 
 Thank you
 
 ---
 Cordiali saluti / Best regards
 Andrea Cerrito
 ^^
 Net.Admin @ Centro MultiMediale di Terni SpA
 P.zzale Bosco 3A
 05100 Terni IT
 Tel. 0744 / 5441330
 Fax. 0744 / 5441372