Skip to content

Too long email address breaks sync #3608

@ronnyjohn

Description

@ronnyjohn

The initial sync encountered an error and i was stuck with the loading spinner in the app. The problematic mail was a spam mail that had a really long sender address:

OCA\Mail\Exception\ServiceException: Sync failed for 1:INBOX: An exception occurred while executing 'INSERT INTO `oc_mail_recipients` (`message_id`, `type`, `label`, `email`) VALUES(?, ?, ?, ?)' with params [145, 0, "Web.de", "celio@nk0032gy5i62diyc262borjqpr3ssgcs681x01z28lh0zx83fcf0a4ipo0wm07u717to950tn1z0v94s6ro6oh161112h70es40uxcqwbsxc6s82465v7749h125m2o538d9j1yhp125f04rfuz0b5ug78w27386vuj4tcyfb74d4mh30jaa764zzq38g7023k2lgo63zszjuj9iowij2ck3761c429t5215xtm15w3cdptxysd78ysjdpfe726bst4i8nynw8c73zt826j01rf9dedw08md2b9ibaim8tev5u6l2vhxzt53ulp623msrg8egz085b6s53yt1xafaueunsfd47bl17w18kxnjrs16j1tdek2o98ouix0h94220ai3xiwnl76q9xvc3058434d91rye57f506d7dd15td0aqv3xt1072frnjo171h2eisq92dz2ner9a65t4612wz2dp49s9l32yn13126109czer56qr95tv7322a163a1fv50c12v79bq2y22o1t2w1e20exkj04y9w56l8413g16mghrd9jokl63xrxdazk9c2d5k2k0k4fdmth6bih60cw006p0lexh08ul1b4t33j27iyigwbh791ldxm5vhxbn27s17h51itm491t5z92x6kor1g12qzef83he4031z8100u6115ooo61wu326h0yp4w1m60u79otw4xij15aw7d53zg56h0zy6fn2gu6bgxm4k10tk0n085gq5w2x631fkzd67t510ae7e219w1w4fqh8u7h2c61glgx181bmez24aqnwow00u55286z5b29kkjmslluw9m09y05f06927z5j76169kndp8b2d5v7abr5nm8xstb8y40f6ow1z9gqg32ems99q20qi9u8ny2y9ble73t8p8m2770280v42b4u8xal1f2cdkb963t5124yuho01u5ayw6n6i78w65oph3587ij6ccf2y3g1m46h0j7391n1k7s7s2em9lz65g9x3povba3x60aeva357hb87zfr9490t4i7ghu35wqo6qqhq36l452vi1zej02x5wt5s0meu4qvhw3z9w9gz7d8p30zab15910udjol0861g5fn1ogrje1051e5cni613v3w6760ath5k47zt0ku1lcww27w99cbos9h815m5ua80o9082i6xtdjk5d25pdbxi4hm590dqmpl49di64r0k9gv7e3kgffcr3jpfec20uk1jypo9dye7mahc37se0o5an4311227y0pq97wcv1y7vx41t1g099z99h1cr048snmxk4l52b809bvn0d0071w7k74xl4y44nzc4mf2l13301f1n3oi5tao1445990ap11n602a8jg5r2r261q750jrzxpx590hi8434kg3p3md61h29z6z1vt283pap55jnu54bw8onfxus1yx21cn912thc4nrwjrecozkep6hy2ek3vy5wy0cly25qd85t1715p87ls2bq06gbcym2ujxs4d06u20t0v99k73tjfgky3j2p0yh21ei32nw1xndm9712c5mq51593l8gbpk01a4qn0dx0ahw7ev4l7hb4u8onrv225nn54q5z11112i5y5022zvr7i1i0qu21u2k08816wp426q3102x1znyo1281m7bzj6v0zwi0ydw11b9mej6rj11r0uz5b0i57y68zb561st90nt250jimr0ypds82ln5b6najhires22060efk9owx3yoa3083e75elc70a9dfo2ypz8102cije5jjd0y4t0k1oq285sc39e200acb145nwi57l0v17hw5zmni5005b91xwbw73skb88id55qf0u41z4y6z110cnckb7q2tre2d9s7h06drs9t5hsk6plg856o8k02xf1o2v1gmo1v91ese3tmv18if5hco1qt4c239gr4v4f7jh4l4822uc9920kxer0k0f.goilp.club"]: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'email' at row 1

I saw that there are other reports of bugs which broke the sync, i.e. #3421 and #2968 .

Maybe there should be a better error handling in the sync. If one email import fails it currently breaks the whole sync. All that the user can do at this point (if he finds out what the problem is) is to use another mail client to find and delete the problematic mail. Then restart the sync and if it fails again, fix the next mail and so on...

Mail app

Mail app version: 1.4.1

Mailserver or service: gmx.net

Server configuration

Operating system: Debian 10

Web server: Apache

Database: MySQL

PHP version: 7.3

Nextcloud Version: 19.0.3

Client configuration

Browser: Vivaldi

Operating system: Manjaro

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions