OfflineIMAP/offlineimap

Big email is downloaded despite exceeding size specified in maxsize option

Open

#635 建立於 2019年11月7日

在 GitHub 查看
 (2 留言) (0 反應) (1 負責人)Python (1,765 star) (373 fork)batch import
buggood first issueneed contributor!

描述

General informations

uname -a && lsb_release -dr
Linux lemon 5.2.0-3-amd64 #1 SMP Debian 5.2.17-1 (2019-09-26) x86_64 GNU/Linux
Description:    Debian GNU/Linux bullseye/sid
Release:        testing
  • offlineimap version (offlineimap -V): offlineimap v7.2.3, imaplib2 v2.57 (system), Python v2.7.17, OpenSSL 1.1.1d 10 Sep 2019
  • Python version: v2.7.17
  • server name or domain: outlook.office365.com
  • CLI options: offlineimap -c ~/dot/offlineimap/rc

Configuration file offlineimaprc


# vim: set ft=conf
[general]
ui = Blinkenlights
metadata = ~/.offlineimap
accounts = foo, bar, baz, biz
maxsyncaccounts = 5
socktimeout = 10
pythonfile = ~/dot/offlineimap/helpers.py

[mbnames]
enabled = yes
filename = ~/dot/mutt/mailboxes
header = "mailboxes "
peritem = "+%(accountname)s/%(foldername)s"
sep = " "
footer = "\n"


[Account foo]
localrepository = foo-Local
remoterepository = foo-Remote
autorefresh = 2
quick = 20
postsynchook = ~/dot/offlineimap/post-sync-hook.sh foo
# Ignore messages bigger than 2 MB
maxsize = 2000000

[Repository foo-Local]
type = Maildir
localfolders = ~/mail/foo

[Repository foo-Remote]
type = IMAP
holdconnectionopen = yes
keepalive = 60
realdelete = yes
maxconnections = 2
remotehost = outlook.office365.com
readonly = False
createfolders = False
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
auth_mechanisms = LOGIN
folderfilter = lambda folder: folder in ['foo']
nametrans = lambda f: translate_folder_foo(f)

Steps to reproduce the error

I send a mail with an attachment of 3.5MB from another email account to account "foo". I'd expect offlineimap to ignore that message as the limit is 2MB, but it gets downloaded as usual.

Did I not configure it right?

貢獻者指南

Big email is downloaded despite exceeding size specified in maxsize option · OfflineIMAP/offlineimap#635 | Good First Issue