Warning when GMime is parsing broken email addresses

Matthieu Lemerre racin at free.fr
Fri May 13 15:33:31 PDT 2011


On Wed, 27 Apr 2011 21:59:09 +0200, Pieter Praet <pieter at praet.org> wrote:
> On Wed, 27 Apr 2011 18:30:09 +0200, Xavier Maillard <xavier at maillard.im> wrote:
> > On Mon, 25 Apr 2011 15:23:41 -0700, Carl Worth <cworth at cworth.org> wrote:
> > > On Wed, 17 Nov 2010 23:20:26 +0100, Matthieu Lemerre <racin at free.fr> wrote:
> > > > Maybe it would also be interesting to add a warning/assertion to check
> > > > that all email adresses added to the database are correct email
> > > > addresses? I.e. check that the `addr' variable in _index_address_mailbox
> > > > always has a @. This check is in fact already done using the function
> > > > strchr, but a bad value is explicitly ignored...
> > > 
> > > Since GMime is fixed upstream (as of version 2.4.18) another option
> > > would be to simply make the notmuch build system require a sufficiently
> > > new version of GMime in order to build.
> > > 
> > > What do you think?
> 
> I'd say both.
> 
> Unfortunately, regressions are not uncommon, and regardless, it'd be
> nice to be notified when what we stuff in the db is not sane.
> 
> It would however be a good idea IMHO to check email address more
> thorougly [1] than simply verifying whether an "@" is present.

I agree with that, unless it is undesirable to add a dependency to a
regex library to notmuch? If so, the @ check could still be done (and is
_already_ present).

I don't see the warnings either, but maybe with proper differentiation
between stdout and stderr, I could arrange to print stderr and see the
warning messages in emacs when I explicitely launch my mail
synchronization script.

Matthieu


More information about the notmuch mailing list