Hi all,

I've just committed the is_header functionality. The committed patch will use the is_header field in the messageblks table only during insertion. Since we have to make sure all headerblks are marked as such before we can use this for retrieval, some transitional phase is required.

Perhaps we can fix dbmail-util to set all is_header flags on the correct rows, or we can provide a simple sql/bash/awk script to do the same.

I've successfully used myself:

#> mysql --skip-column-names -B -e "select dbmail_messageblk_idnr from messageblks group by physmessage_id" dbmail |awk 'BEGIN { printf("\nupdate dbmail_messageblks set is_header=1 where messageblk_idnr in ("); } { if(NR % 200 == 0) { printf("\nupdate dbmail_messageblks set is_header=1 where messageblk_idnr in ("); i=0; } else { printf("%s,",$1); }}'|sed 's/,$/);/' | mysql dbmail


Which is quite fast, even for many, many messageblks.


This patch has been running on my production machines for several months now and was part of the experimental debian packages.


--
  ________________________________________________________________
  Paul Stevens                                         [EMAIL PROTECTED]
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands_______________________________________www.nfg.nl

Reply via email to