{"action":"created","issue":{"url":"https://api.github.com/repos/lefcha/imapfilter/issues/94","labels_url":"https://api.github.com/repos/lefcha/imapfilter/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/lefcha/imapfilter/issues/94/comments","events_url":"https://api.github.com/repos/lefcha/imapfilter/issues/94/events","html_url":"https://github.com/lefcha/imapfilter/issues/94","id":87118528,"number":94,"title":"2.5.6 -> 2.5.7 broke TLS imap for specific server","user":{"login":"rhavenn","id":7809761,"avatar_url":"https://avatars.githubusercontent.com/u/7809761?v=3","gravatar_id":"","url":"https://api.github.com/users/rhavenn","html_url":"https://github.com/rhavenn","followers_url":"https://api.github.com/users/rhavenn/followers","following_url":"https://api.github.com/users/rhavenn/following{/other_user}","gists_url":"https://api.github.com/users/rhavenn/gists{/gist_id}","starred_url":"https://api.github.com/users/rhavenn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhavenn/subscriptions","organizations_url":"https://api.github.com/users/rhavenn/orgs","repos_url":"https://api.github.com/users/rhavenn/repos","events_url":"https://api.github.com/users/rhavenn/events{/privacy}","received_events_url":"https://api.github.com/users/rhavenn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-06-10T21:48:40Z","updated_at":"2015-06-25T19:46:14Z","closed_at":null,"body":"FreeBSD recently upgraded their package for imapfilter from 2.5.6 -> 2.5.7 . One of the servers I connect to via IMAP breaks. Downgrading my packages to 2.5.6 fixes the issue with zero other changes. Perhaps something in the server headers?\r\n\r\nI use securetls = true and ssl is set to tls1 . tls1.1 and 1.2 aren't supported, it seems, by the server.\r\n\r\nI call imapfilter with:\r\n````\r\n/usr/local/bin/imapfilter -c ~/Mail/.imapfilter.config\r\n```\r\n\r\nand this produces:\r\n```\r\nimapfilter: login request to account@domain@secure.emailsrvr.com failed\r\nstack traceback:\r\n\t[C]: in ?\r\n\t[C]: in function 'error'\r\n\t/usr/local/share/imapfilter/account.lua:68: in function '_check_result'\r\n\t/usr/local/share/imapfilter/account.lua:84: in function '_login_user'\r\n\t/usr/local/share/imapfilter/account.lua:46: in function 'IMAP'\r\n\t/home/rhavenn/Mail/.imapfilter.config:28: in main chunk\r\n```\r\n\r\nI have not tried without SSL, but can if it would help. I pull my password via:\r\n```\r\nfunction get_imap_password(file)\r\n        local home = os.getenv(\"HOME\")\r\n        local file = home .. \"/mail/\" .. file\r\n        local str = io.open(file):read()\r\n        return str;\r\nend\r\n```\r\n\r\nand use that via:\r\n```\r\nlocal account = IMAP {\r\n        server = 'secure.emailsrvr.com',\r\n        username = 'account',\r\n        password = get_imap_password(\".imap.config\"),\r\n        ssl = 'tls1',\r\n}\r\n```\r\n\r\nin case it's something, possibly, with the email password parser.\r\n"},"comment":{"url":"https://api.github.com/repos/lefcha/imapfilter/issues/comments/115374112","html_url":"https://github.com/lefcha/imapfilter/issues/94#issuecomment-115374112","issue_url":"https://api.github.com/repos/lefcha/imapfilter/issues/94","id":115374112,"user":{"login":"lefcha","id":640819,"avatar_url":"https://avatars.githubusercontent.com/u/640819?v=3","gravatar_id":"","url":"https://api.github.com/users/lefcha","html_url":"https://github.com/lefcha","followers_url":"https://api.github.com/users/lefcha/followers","following_url":"https://api.github.com/users/lefcha/following{/other_user}","gists_url":"https://api.github.com/users/lefcha/gists{/gist_id}","starred_url":"https://api.github.com/users/lefcha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lefcha/subscriptions","organizations_url":"https://api.github.com/users/lefcha/orgs","repos_url":"https://api.github.com/users/lefcha/repos","events_url":"https://api.github.com/users/lefcha/events{/privacy}","received_events_url":"https://api.github.com/users/lefcha/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T19:46:14Z","updated_at":"2015-06-25T19:46:14Z","body":"@Papafox I have answered your comment in the commit, and probably you're right that the verification should be taken more seriously when there's a failure, but at the same time users would like to filter their mail, and with this change they are given the choice to have a look at the certificate and decide themselves if they should accept it or not, and put it in the local imapfilter certificates file.\r\n\r\nI'm not sure if imapfilter should just be less strict with the cause of this error (`secure.emailsrvr.com` seems to cause a `X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN` error), or if this means that the server has a problem that should be solved by its admins, or that the system has a problem with its truststore...\r\n\r\nA solution to this could be to be as strict with verification errors as before, but warn the user about the failure, and let him decide if the connection should continue, but this should probably not be asked every time imapfilter is executed, because the server might always have a problem with its certificate.."}}