mail2most icon indicating copy to clipboard operation
mail2most copied to clipboard

bandwidth eating

Open Mohamed-sobhi95 opened this issue 2 years ago • 4 comments

Describe the bug i installed the plugin on my vps with bandwidth 6TB/month before it i used maximum 1TB/month but after it the plugin eats all my 6TB bandwidth in 2 weeks

Mohamed-sobhi95 avatar Feb 01 '24 14:02 Mohamed-sobhi95

Hello @Mohamed-sobhi95 you can control the bandwidth by setting TimeInterval within the General Settings to a higher value. This should drastically decrease the bandwidth used. e.g: instead of 10 seconds you can set it to 600 (10 minutes).

[General]
  # File contains the default file location where mail2most stores its data
  File = "data.json"
  # RunAsService true:
  # check regularly using TimeInterval for new emails
  # false:
  # just check once when u start - requires to restart mail2most for checking again
  RunAsService = true 
  # global time interval for checking mails in seconds
  TimeInterval = 10 

c-seeger avatar Feb 06 '24 08:02 c-seeger

I can confirm that the bandwidth usage is way beyond what I would expect. Mail2most was pulling about 7MB/s constantly while the IMAP inbox had only occasional new email. The bandwidth consumption should be reasonable with the default settings.

From a cursory read of the code, it seems that it re-downloads all the message bodies and attachments every time it attempts to update. The IMAP protocol makes it easy to only download the new messages (via uid and uidvalidity) so that's what I would expect this tool to do.

wetneb avatar Oct 12 '24 13:10 wetneb

I've rewritten this as a Mattermost plugin which also solves this bandwidth issue: https://codeberg.org/mailmirror/mailmirror

wetneb avatar Oct 21 '24 06:10 wetneb

I'll try to implement this feature in mail2most in the next days.

gerald2545 avatar Mar 31 '25 09:03 gerald2545