Giter VIP home page Giter VIP logo

Comments (2)

gilleslamiral avatar gilleslamiral commented on May 24, 2024

Hello Patwork,

Thanks for your feedback!

Imapsync already changes tabulations to spaces to generate the signatures used to compare messages
on both sides. So it might be something else.

The best is to isolate a unique "buggy" message in a folder and run imapsync on this folder
with --debug option, even --debugcontent if the message is small.

See also http://imapsync.lamiral.info/FAQ.d/FAQ.Duplicates.txt
for more details about that.

What's done on headers to fix that king of problem is in the subroutine header_line_normalize()

sub header_line_normalize {
my( $header_key, $header_val ) = @_ ;

     # no 8-bit data in headers !
     $header_val =~ s/[\x80-\xff]/X/xog;

     # change tabulations to space (Gmail bug on with "Received:" on multilines)
     $header_val =~ s/\t/\ /xgo ;

     # remove the first blanks ( dbmail bug? )
     $header_val =~ s/^\s*//xo;

     # remove the last blanks ( Gmail bug )
     $header_val =~ s/\s*$//xo;

     # remove successive blanks ( Mailenable does it )
     $header_val =~ s/\s+/ /xgo;

     # remove Message-Id value domain part ( Mailenable changes it )
     if ( ( $messageidnodomain ) and ( 'MESSAGE-ID' eq uc( $header_key ) ) ) { $header_val =~ s/^([^@]+).*$/$1/xo ; }

     # and uppercase header line
     # (dbmail and dovecot)

     my $header_line = uc("$header_key: $header_val") ;

return( $header_line ) ;

}

I've come across a problem with some messages being downloaded every time I run imapsync.
After adding --debug and checking logs I think there's an issue with parsing multiline fields in headers.

Example mail below. Raw header is identical on Host1 and Host2, but generated signatures are different.
Notice that only Host1 is using BODY[PEEK.HEADER]. IPs and emails are xxx-ed for privacy reasons.

Host1 banner: * OK xxx IdeaImapServer v0.80.1 ready

Never saw this one before!
Thanks.

And this is raw header, 100% identical on both hosts if fetched with BODY[PEEK.HEADER]. What is interesting, first "Received" field has spaces and second has tabulators:
I hope this is sufficient information to fix this problem.

Au revoir, 09 51 84 42 42
Gilles Lamiral. France, Baulon (35580) 06 20 79 76 06

from imapsync.

gilleslamiral avatar gilleslamiral commented on May 24, 2024

No news. Closing.

from imapsync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.