Comments (4)
Hi there! Thanks for reporting this. I added a -t
option to set the global socket timeout that may fix this, try it out and re-open the issue if it doesn't (although I'm afraid that if your server is resetting the connection, the mailbox may indeed be too large, and you're probably best off splitting it into multiple smaller folders).
Re-connection is trickier, because if you're using the script as part of something bigger you may well want to handle re-connection yourself. Regardless, I hope this fixes it for you -- Happy New Year!
from imapbackup.
Hello, I fail to run script using the new -t
option: The moment I add the -t
option I get the Usage: erroneous message:
All the following commands prints the Usage: message:
python imapbackup.py --server=imap.example.com:993 [email protected] -t 180
python imapbackup.py --server=imap.example.com:993 [email protected] --timeout=180
python imapbackup.py -t 180 --server=imap.example.com:993 [email protected]
python imapbackup.py --timeout=180 --server=imap.example.com:993 [email protected]
python imapbackup.py -t 180 --server=imap.example.com:993 [email protected]
python imapbackup.py ---timeout=180 --server=imap.example.com:993 [email protected]
Here is the Usage: message I get:
Usage: imapbackup [OPTIONS] -s HOST -u USERNAME [-p PASSWORD]
-a --append-to-mboxes Append new messages to mbox files. (default)
-y --yes-overwrite-mboxes Overwite existing mbox files instead of appending.
-n --compress=none Use one plain mbox file for each folder. (default)
-z --compress=gzip Use mbox.gz files. Appending may be very slow.
-b --compress=bzip2 Use mbox.bz2 files. Appending not supported: use -y.
-f --=folder Specifify which folders use. Comma separated list.
-e --ssl Use SSL. Port defaults to 993.
-k KEY --key=KEY PEM private key file for SSL. Specify cert, too.
-c CERT --cert=CERT PEM certificate chain for SSL. Specify key, too.
Python's SSL module doesn't check the cert chain.
-s HOST --server=HOST Address of server, port optional, eg. mail.com:143
-u USER --user=USER Username to log into server
-p PASS --pass=PASS Prompts for password if not specified.
-t SECS --timeout=SECS Sets socket timeout to SECS seconds.
--thunderbird Create Mozilla Thunderbird compatible mailbox
--nospinner Disable spinner (makes output log-friendly)
NOTE: mbox files are created in the current working directory.
If I remove the -t
/--timeout=
part the commands starts just fine.
I might get something wrong...
Version: Python v2.7.12
(Edit: simplified the command examples to remove optional options that does not change the results)
from imapbackup.
from imapbackup.
Yep: works now.
But I noticed the -t
seems to be mandatory (even before e1ad2d3), running the command without it returns (after the password prompt):
Traceback (most recent call last):
File "imapbackup.py", line 713, in <module>
main()
File "imapbackup.py", line 600, in main
server = connect_and_login(config)
File "imapbackup.py", line 547, in connect_and_login
if config['timeout']:
KeyError: 'timeout
I guess it is missing from the part that fills config
variable with default values, see PR #4
from imapbackup.
Related Issues (20)
- warning issue? HOT 1
- imapbackup.py doesn't run on Fedora 32 (Python 3.8.3) HOT 4
- error on backing up HOT 2
- Can't run on python 3.9.5 windows HOT 6
- mailbox.org: `Error in IMAP command LIST` HOT 5
- Can't have space in `--folders` name? HOT 9
- Non utf8 content in raw email
- Proper UTF-8 header encoding HOT 2
- UTF8 issue with folders? HOT 2
- missing error output for unknown options HOT 2
- changes from forks HOT 15
- Option to ignore a list of folders? HOT 3
- UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2: ordinal not in range(128) HOT 7
- Maildir support? HOT 6
- Any support for IMAP flags? HOT 7
- UnicodeEncodeError: 'ascii' codec can't encode character '\xa3' HOT 3
- icloud: AttributeError: 'int' object has no attribute 'strip' HOT 5
- Authentication Fails with Complicated Password String HOT 3
- Handling of "Umlaute"/ special characters in folder names may be broken HOT 3
- ERROR: command: FETCH => socket error: EOF HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imapbackup.