Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imap lib server compabilities #54901

Closed
silversky mannequin opened this issue Dec 13, 2010 · 10 comments
Closed

imap lib server compabilities #54901

silversky mannequin opened this issue Dec 13, 2010 · 10 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@silversky
Copy link
Mannequin

silversky mannequin commented Dec 13, 2010

BPO 10692
Nosy @ericvsmith, @bitdancer
Files
  • debug.txt: debug information + traceback + telnet log
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2010-12-16.08:20:08.792>
    created_at = <Date 2010-12-13.12:11:42.899>
    labels = ['invalid', 'type-bug', 'library']
    title = 'imap lib server compabilities'
    updated_at = <Date 2010-12-16.13:07:30.910>
    user = 'https://bugs.python.org/silversky'

    bugs.python.org fields:

    activity = <Date 2010-12-16.13:07:30.910>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-12-16.08:20:08.792>
    closer = 'silversky'
    components = ['Library (Lib)']
    creation = <Date 2010-12-13.12:11:42.899>
    creator = 'silversky'
    dependencies = []
    files = ['20028']
    hgrepos = []
    issue_num = 10692
    keywords = []
    message_count = 10.0
    messages = ['123871', '123878', '123919', '123921', '123922', '123927', '123939', '124012', '124112', '124125']
    nosy_count = 3.0
    nosy_names = ['eric.smith', 'r.david.murray', 'silversky']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue10692'
    versions = ['Python 2.7']

    @silversky
    Copy link
    Mannequin Author

    silversky mannequin commented Dec 13, 2010

    When i trying to connect to courier-imap server i got error:
    "server not IMAP4 compliant"
    But as i see in the debug information and server responses there is error in the source code of library.
    imaplib.py version: 2.58
    courier-imap server version: 0.91-ubuntu1
    os version: ubunto 10.04(lucid)
    You can see debug information and telnet session in attached file.
    Best regards, Yevgeniy.

    @silversky silversky mannequin added performance Performance or resource usage stdlib Python modules in the Lib dir labels Dec 13, 2010
    @bitdancer
    Copy link
    Member

    Where does the non-telnet part of your trace come from? How did you produce it? Does this error still occur using 2.7? (Python 2.6 is in security fix only mode at this point.)

    @bitdancer bitdancer added type-bug An unexpected behavior, bug, or error and removed performance Performance or resource usage labels Dec 13, 2010
    @silversky
    Copy link
    Mannequin Author

    silversky mannequin commented Dec 14, 2010

    Where does the non-telnet part of your trace come from? How did you produce it?
    When i got this error i set Debug = 5 in imaplib.py
    and run next code:
    import imaplib
    M = imaplib.IMAP4_SSL('localhost')
    M.login('username', 'password')
    M.logout()

    Does this error still occur using 2.7?
    Yes

    As i see in debug information: CAPABILITIES: ('0', 'ACL', 'ACL2=UNION')
    but in the telnet session i see next answer:

    • CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS LOGINDISABLED
      Because of this i think that we have maybe some kind of error in the source code of library.
      p.s. sorry for my English )

    @bitdancer
    Copy link
    Member

    Well, in that case your telnet session doesn't tell us all that much, since you are using IMAP4_SSL in the Python but regular non-SSL in the telnet session. Are you sure it is even the same server running on the SSL port?

    @bitdancer
    Copy link
    Member

    By the way, an SSL login runs just fine for me against my Courier-IMAP server. Does regular IMAP work for you?

    @silversky
    Copy link
    Mannequin Author

    silversky mannequin commented Dec 14, 2010

    By the way, an SSL login runs just fine for me against my Courier-IMAP server. Does regular IMAP work for you?
    No it dose not.
    When i run:
    M = myimaplib.IMAP4(host)
    M.login(username, password)
    I got "error: STARTTLS required"

    @bitdancer
    Copy link
    Member

    Starttls support was only added in Python 3.2. Apparently your server is set to disallow non-SSL connections.

    Have you confirmed that the same server is listening on port 993 as is listening on port 143? The debug info from imaplib makes it look like different capability information is being returned, though the banner does look the same.

    Please run the regular IMAP4 test with debug on, I think it may be getting past the capabilities query before it produces the starttls error, and if so it would be interesting to compare the two debug traces.

    @silversky
    Copy link
    Mannequin Author

    silversky mannequin commented Dec 15, 2010

    Have you confirmed that the same server is listening on port 993 as is listening on port 143?
    I found that is mistake in courier-imap(-ssl) configuration.
    I have some troubles with it configuring(may by incorrect certificates).
    When i make right configuration i will test again python code and writе here results.

    @silversky
    Copy link
    Mannequin Author

    silversky mannequin commented Dec 16, 2010

    I found than it is server configuration problem.
    When i add variable IMAP_COPABILITY to /etc/courier/imapd-ssl all troubles are gone. Variable did not exported from /etc/courier/imapd, but documentation sad that it imports automatically.
    Thank you very much for your attention and help.

    @silversky silversky mannequin closed this as completed Dec 16, 2010
    @bitdancer
    Copy link
    Member

    You are welcome. Glad you were able to solve it.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant