Open-Up / workshop-ifi-27-07-2018

Guiding IFI students on their way to their first free software contributions....
0 stars 3 forks source link

Multiple accounts for a fetch mail entry are not taken into account #4

Open chibenwa opened 6 years ago

chibenwa commented 6 years ago

We can simply test, reproduce and correct this bug:

https://issues.apache.org/jira/browse/JAMES-2372

As reported on Gitter by @viuha8 , the fetch mail account entries are ignored and the first one is duplicated.

A temporary work around is to create one section per email account (leading to wasting resources as it launches several fetchmail deamons).

This buggy behaviour seems to be due to a bad, out of loop variable incrementation:

I believe the issue lies down in server/protocols/fetchmail/src/main/java/org/apache/james/fetchmail/FetchMail.java l. 425 -> 455 A i variable is used in order to iterate the entries but this i variable is never incremented (as it is incremented outside of the loop).

We need to write simple configuration tests, then fix this issue.