coddingtonbear / django-mailbox

Import mail from POP3, IMAP, local email mailboxes or directly from Postfix or Exim4 into your Django application automatically.
MIT License
357 stars 166 forks source link

ConnectionRefusedError: [Errno 111] Connection refused #236

Closed tranVyTDT closed 4 years ago

tranVyTDT commented 4 years ago

i follow the document, i try to do the get new mail in admin page but nothing happen , then i try to use python3 manage.py getmail. then i get the error below. can any one help me with this problem, i searched and get no error like this. my mail server is ired mail on AWS,

INFO:django_mailbox.management.commands.getmail:Gathering messages for test name 001 Traceback (most recent call last): File "manage.py", line 21, in <module> main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "/mnt/e/invoice_managerment/lib/python3.6/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line utility.execute() File "/mnt/e/invoice_managerment/lib/python3.6/site-packages/django/core/management/__init__.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/mnt/e/invoice_managerment/lib/python3.6/site-packages/django/core/management/base.py", line 330, in run_from_argv self.execute(*args, **cmd_options) File "/mnt/e/invoice_managerment/lib/python3.6/site-packages/django/core/management/base.py", line 371, in execute output = self.handle(*args, **options) File "/mnt/e/invoice_managerment/lib/python3.6/site-packages/django_mailbox/management/commands/getmail.py", line 25, in handle for message in messages: File "/mnt/e/invoice_managerment/lib/python3.6/site-packages/django_mailbox/models.py", line 412, in get_new_mail connection = self.get_connection() File "/mnt/e/invoice_managerment/lib/python3.6/site-packages/django_mailbox/models.py", line 201, in get_connection conn.connect(self.username, self.password) File "/mnt/e/invoice_managerment/lib/python3.6/site-packages/django_mailbox/transports/imap.py", line 49, in connect self.server = self.transport(self.hostname, self.port) File "/usr/lib/python3.6/imaplib.py", line 1288, in __init__ IMAP4.__init__(self, host, port) File "/usr/lib/python3.6/imaplib.py", line 198, in __init__ self.open(host, port) File "/usr/lib/python3.6/imaplib.py", line 1301, in open IMAP4.open(self, host, port) File "/usr/lib/python3.6/imaplib.py", line 299, in open self.sock = self._create_socket() File "/usr/lib/python3.6/imaplib.py", line 1291, in _create_socket sock = IMAP4._create_socket(self) File "/usr/lib/python3.6/imaplib.py", line 289, in _create_socket return socket.create_connection((host, self.port)) File "/usr/lib/python3.6/socket.py", line 724, in create_connection raise err File "/usr/lib/python3.6/socket.py", line 713, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

tranVyTDT commented 4 years ago

it is my bad, i input a wrong host