Skip to content

Commit

Permalink
Merge pull request #118 from icgood/log
Browse files Browse the repository at this point in the history
Add missing log on dnsbl disconnect
  • Loading branch information
icgood committed May 21, 2021
2 parents c4db1c1 + 79fb4b2 commit e9f3098
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## The MIT License (MIT)

Copyright (c) 2020 Ian Good
Copyright (c) 2021 Ian Good

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# -- Project information -----------------------------------------------------

project = 'pymap'
copyright = '2020, Ian Good'
copyright = '2021, Ian Good'
author = 'Ian Good'

# The short X.Y version
Expand Down
10 changes: 8 additions & 2 deletions pymap/imap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,12 @@ async def run(self, state: ConnectionState) -> None:
"""
await self._read_proxy_protocol()
self._print('%s +++| %s', str(socket_info.get()))
try:
await self._run_state(state)
finally:
self._print('%s ---| %s', b'<disconnected>')

async def _run_state(self, state: ConnectionState) -> None:
bad_commands = 0
try:
greeting = await self._exec(state.do_greeting())
Expand Down Expand Up @@ -420,9 +426,9 @@ async def run(self, state: ConnectionState) -> None:
except ConnectionError:
break
except SSLError as exc:
self._print('%s <->| %s', f'<TLS: {exc.reason}>')
self._print('%s <->| <TLS failure: %s>',
exc.reason)
return
finally:
await state.do_cleanup()
current_command.reset(prev_cmd)
self._print('%s ---| %s', b'<disconnected>')
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 Ian C. Good
# Copyright (c) 2021 Ian C. Good
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -28,7 +28,7 @@
license = f.read()

setup(name='pymap',
version='0.25.0',
version='0.25.1',
author='Ian Good',
author_email='ian@icgood.net',
description='Lightweight, asynchronous IMAP serving in Python.',
Expand All @@ -50,7 +50,7 @@
packages=find_packages(),
install_requires=[
'pysasl ~= 0.8.0',
'proxy-protocol ~= 0.7.0'],
'proxy-protocol ~= 0.7.2'],
extras_require={
'admin': ['pymap-admin ~= 0.7.0', 'googleapis-common-protos'],
'macaroon': ['pymacaroons'],
Expand Down

0 comments on commit e9f3098

Please sign in to comment.