From ff7c4df85fd87d79e0f2dc1e002a21f0af444c18 Mon Sep 17 00:00:00 2001 From: Nick Bebout Date: Sat, 12 Mar 2011 02:44:29 +0000 Subject: [PATCH] 1.190 --- CREDITS | 8 ++++++++ ChangeLog | 16 ++++++++++++---- Makefile | 20 +++++++++++++++----- README | 6 +++--- TODO | 3 +++ VERSION | 2 +- freshmeat_submition.inp | 6 +++--- freshmeat_submition.out | 6 +++--- imapsync | 18 +++++++++++------- learn/uppercase_header | 19 +++++++++++++++++++ 10 files changed, 78 insertions(+), 26 deletions(-) create mode 100755 learn/uppercase_header diff --git a/CREDITS b/CREDITS index 7ad7fb7..924285d 100644 --- a/CREDITS +++ b/CREDITS @@ -2,6 +2,14 @@ I thank very much all of these people. +Tom Allison +Had problem with dovecot and dbmail +Message-Id Message-ID. So imapsync is +now case insensitive with header keywords. + +David Abrahams +Had problem with flags, suggested flag output. + RISKO Gergely Maintain imapsync debian package. diff --git a/ChangeLog b/ChangeLog index a3ff35f..e83a562 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,17 +1,25 @@ RCS file: RCS/imapsync,v Working file: imapsync -head: 1.188 +head: 1.190 branch: locks: strict - gilles: 1.188 + gilles: 1.190 access list: symbolic names: keyword substitution: kv -total revisions: 188; selected revisions: 188 +total revisions: 190; selected revisions: 190 description: ---------------------------- -revision 1.188 locked by: gilles; +revision 1.190 locked by: gilles; +date: 2006/11/11 00:13:15; author: gilles; state: Exp; lines: +10 -6 +Be case inseitive with header keywords. +---------------------------- +revision 1.189 +date: 2006/11/04 16:47:38; author: gilles; state: Exp; lines: +6 -6 +typo CommuniGatePro +---------------------------- +revision 1.188 date: 2006/10/30 01:18:37; author: gilles; state: Exp; lines: +22 -17 Fixed typos about transfer* ---------------------------- diff --git a/Makefile b/Makefile index 488d64d..e273697 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -# $Id: Makefile,v 1.13 2006/10/30 03:05:12 gilles Exp gilles $ +# $Id: Makefile,v 1.14 2006/10/30 04:28:03 gilles Exp gilles $ TARGET=imapsync @@ -43,7 +43,7 @@ VERSION: $(TARGET) Makefile .PHONY: clean clean_tilde clean_test -clean: clean_tilde clean_test +clean: clean_tilde clean_test clean_man clean_test: rm -f .test @@ -51,12 +51,22 @@ clean_test: clean_tilde: rm -f *~ -.PHONY: install dist +.PHONY: install dist man -install: testp - cp $(TARGET) $(DESTDIR)/usr/bin/$(TARGET) +man: $(TARGET).1 + +clean_man: + rm -f $(TARGET).1 + +$(TARGET).1: $(TARGET) + pod2man $(TARGET) > $(TARGET).1 + +install: testp $(TARGET).1 + install -D $(TARGET) $(DESTDIR)/usr/bin/$(TARGET) + install -D $(TARGET).1 $(DESTDIR)/usr/share/man/man1/$(TARGET).1 chmod 755 $(DESTDIR)/usr/bin/$(TARGET) + DIST_NAME=$(TARGET)-$(VERSION) DIST_FILE=$(DIST_NAME).tgz DEB_FILE=$(DIST_NAME).deb diff --git a/README b/README index a0e38aa..b1e6171 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ NAME Synchronise mailboxes between two imap servers. Good at IMAP migration. More than 25 different IMAP server softwares supported with success. - $Revision: 1.188 $ + $Revision: 1.190 $ INSTALL imapsync works fine under any Unix OS. @@ -192,7 +192,7 @@ IMAP SERVERS names are in alphabetic order) : - BincImap 1.2.3 (GPL) (http://www.bincimap.org/) - - CommunicatePro server (Redhat 8.0) + - CommuniGatePro server (Redhat 8.0) - Courier IMAP 1.5.1, 2.2.0, 2.1.1, 2.2.1 (GPL) (http://www.courier-mta.org/) - Critical Path (7.0.020) @@ -293,5 +293,5 @@ AUTHOR teaching free open and gratis softwares. Don't hesitate to pay him for that services. - $Id: imapsync,v 1.188 2006/10/30 01:18:37 gilles Exp gilles $ + $Id: imapsync,v 1.190 2006/11/11 00:13:15 gilles Exp gilles $ diff --git a/TODO b/TODO index 7daa865..0877433 100644 --- a/TODO +++ b/TODO @@ -2,6 +2,9 @@ TODO file for imapsync ---------------------- +Add "output to reflect everything that imapsync was doing". +Not everything but flag synchronization will be nice" + Add and option to sync to & from files. Use examine() instead of select() in --dry mode. diff --git a/VERSION b/VERSION index 1b8c3b7..20f5666 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.188 +1.190 diff --git a/freshmeat_submition.inp b/freshmeat_submition.inp index 07843a6..9d18a48 100644 --- a/freshmeat_submition.inp +++ b/freshmeat_submition.inp @@ -2,16 +2,16 @@ # #RELEASE_FOCUS="Initial freshmeat announcement" #RELEASE_FOCUS="Documentation" -RELEASE_FOCUS="Code cleanup" +#RELEASE_FOCUS="Code cleanup" #RELEASE_FOCUS="Minor feature enhancements" #RELEASE_FOCUS="Major feature enhancements" -#RELEASE_FOCUS="Minor bugfixes" +RELEASE_FOCUS="Minor bugfixes" #RELEASE_FOCUS="Major bugfixes" #RELEASE_FOCUS="Minor security fixes" #RELEASE_FOCUS="Major security fixes" #TEXT_BODY="Syntax cleanup" #TEXT_BODY="Updated documentation" -TEXT_BODY="Updated documentation and tests" +TEXT_BODY="Bug fix: be case insensitive with header keywords." diff --git a/freshmeat_submition.out b/freshmeat_submition.out index 874e84c..ba9a0eb 100644 --- a/freshmeat_submition.out +++ b/freshmeat_submition.out @@ -1,9 +1,9 @@ Project: imapsync -Version: 1.182 -Release-Focus: Documentation +Version: 1.188 +Release-Focus: Code cleanup Hide: Y Home-Page-URL: http://www.linux-france.org/prj/imapsync/ Gzipped-Tar-URL: http://www.linux-france.org/prj/imapsync/dist/ -Updated documentation +Updated documentation and tests diff --git a/imapsync b/imapsync index fb810bb..10e3576 100755 --- a/imapsync +++ b/imapsync @@ -7,7 +7,7 @@ tool. Synchronise mailboxes between two imap servers. Good at IMAP migration. More than 25 different IMAP server softwares supported with success. -$Revision: 1.188 $ +$Revision: 1.190 $ =head1 INSTALL @@ -221,7 +221,7 @@ Success stories reported with the following imap servers (softwares names are in alphabetic order) : - BincImap 1.2.3 (GPL) (http://www.bincimap.org/) - - CommunicatePro server (Redhat 8.0) + - CommuniGatePro server (Redhat 8.0) - Courier IMAP 1.5.1, 2.2.0, 2.1.1, 2.2.1 (GPL) (http://www.courier-mta.org/) - Critical Path (7.0.020) @@ -343,7 +343,7 @@ Gilles LAMIRAL earn his living writing, installing, configuring and teaching free open and gratis softwares. Don't hesitate to pay him for that services. -$Id: imapsync,v 1.188 2006/10/30 01:18:37 gilles Exp gilles $ +$Id: imapsync,v 1.190 2006/11/11 00:13:15 gilles Exp gilles $ =cut @@ -400,7 +400,7 @@ my( use vars qw ($opt_G); # missing code for this will be option. -$rcs = ' $Id: imapsync,v 1.188 2006/10/30 01:18:37 gilles Exp gilles $ '; +$rcs = ' $Id: imapsync,v 1.190 2006/11/11 00:13:15 gilles Exp gilles $ '; $rcs =~ m/,v (\d+\.\d+)/; $VERSION = ($1) ? $1 : "UNKNOWN"; @@ -437,8 +437,8 @@ $error=0; my $banner = join("", '$RCSfile: imapsync,v $ ', - '$Revision: 1.188 $ ', - '$Date: 2006/10/30 01:18:37 $ ', + '$Revision: 1.190 $ ', + '$Date: 2006/11/11 00:13:15 $ ', "\n", "Mail::IMAPClient version used here is ", $VERSION_IMAPClient,"\n" @@ -1333,8 +1333,12 @@ sub parse_header_msg1 { foreach my $val (sort @{$head->{$h}}) { # no 8-bit data in headers ! $val =~ s/[\x80-\xff]/X/g; + # remove the first blanks (dbmail bug ?) - $val =~ s/^\s+//; + # and uppercase header keywords + # (dbmail and dovecot) + $val =~ s/^\s*(.+?):(.+)$/\U$1\E:$2/; + # show stuff in debug mode $debug and print "${s}H $h:", $val, "\n"; if ($skipheader and $h =~ m/$skipheader/) { diff --git a/learn/uppercase_header b/learn/uppercase_header new file mode 100755 index 0000000..9a4ce2a --- /dev/null +++ b/learn/uppercase_header @@ -0,0 +1,19 @@ +#!/usr/bin/perl + + +@val = ( +"aBaBaBBaa: aBaBaB: aBaBaB", +" message-ad : ", +"Message-Id blabla", +" aaaa : aaaaa BBBB", +" aaaa : aaa:aa BBBB", +"", +); + + +foreach $val (@val) { + $val = $val; + print "[$val]", "\n"; + $val =~ s/^\s*(.+?):(.+)$/\U$1\E:$2/; + print "[$val]", "\n\n"; +}