This repository was archived by the owner on Jun 7, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
core/src/main/java/com/elasticinbox/core/cassandra
lmtp/src/main/java/com/elasticinbox/lmtp/filter Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,14 @@ public LabelMap getAllWithMetadata(final Mailbox mailbox)
8484
8585 for (int labelId : counters .keySet ())
8686 {
87- labels .get (labelId ).setCounters (counters .get (labelId ));
87+ if (labels .containsId (labelId ) && counters .containsKey (labelId )) {
88+ labels .get (labelId ).setCounters (counters .get (labelId ));
89+ } else if (labels .containsId (labelId ) && !counters .containsKey (labelId )) {
90+ // assume zeros for all counters if not yet initialised
91+ labels .get (labelId ).setCounters (new LabelCounters ());
92+ } else if (!labels .containsId (labelId ) && counters .containsKey (labelId )) {
93+ logger .warn ("Found counters for label {}, but label does not exist." , labelId );
94+ }
8895 }
8996
9097 return labels ;
Original file line number Diff line number Diff line change @@ -56,10 +56,18 @@ public Message filter(Message message)
5656 || from .matches ("(.+)\\ @pages\\ .facebookmail\\ .com" )
5757 || from .matches ("bezotveta\\ @odnoklassniki\\ .ru" )
5858 || from .matches ("admin\\ @vkontakte\\ .ru" )
59- || from .matches ("(.+)\\ -(.+)\\ @postmaster\\ .twitter\\ .com" )
59+ || from .matches ("admin\\ @notify\\ .vk\\ .com" )
60+ || from .matches ("(.+)\\ @postmaster\\ .twitter\\ .com" )
61+ || from .matches ("(.+)\\ @bounce\\ .twitter\\ .com" )
62+ || from .matches ("info\\ @twitter\\ .com" )
63+ || from .matches ("notify\\ @twitter\\ .com" )
64+ || from .matches ("(.+)\\ @email\\ .foursquare\\ .com" )
65+ || from .matches ("(.+)\\ @email\\ .pinterest\\ .com" )
6066 || from .matches ("(.+)\\ @bounce\\ .linkedin\\ .com" )
6167 || from .matches ("(.+)\\ @linkedin\\ .com" )
6268 || from .matches ("noreply\\ -(.+)\\ @plus\\ .google\\ .com" )
69+ || from .matches ("notifications\\ @meetmemail\\ .com" )
70+ || from .matches ("notification\\ +(.+)\\ @netlogmail\\ .com" )
6371 || from .matches ("notifications\\ +(.+)\\ @zyngamail\\ .com" ))
6472 {
6573 logger .debug ("Applying filter for NOTIFICATIONS" );
You can’t perform that action at this time.
0 commit comments