seunomosowon / TA-mailclient

This technology adapter add-on fetches emails for Splunk to index from mailboxes using either POP3 or IMAP, with or without SSL.
Apache License 2.0
9 stars 9 forks source link

AttributeError: 'NoneType' object #24

Closed edro15 closed 3 years ago

edro15 commented 3 years ago

OS details

  Operating System: CentOS Linux 7 (Core)
  Kernel: Linux 3.10.0-1127.13.1.el7.x86_64
  Architecture: x86-64

When parameter attach_message_primary = True in inputs.conf the following error is thrown:

Traceback (most recent call last):
  File "/opt/splunk/etc/apps/TA-mailclient/bin/mail.py", line 381, in stream_events
    self._stream_events(inputs, ew)
  File "/opt/splunk/etc/apps/TA-mailclient/bin/mail.py", line 438, in _stream_events
    self.stream_imap_emails()
  File "/opt/splunk/etc/apps/TA-mailclient/bin/mail.py", line 289, in stream_imap_emails
    self.attach_message_primary,
  File "/opt/splunk/etc/apps/TA-mailclient/bin/../lib/file_parser/email_mime.py", line 45, in parse_email
    mailheaders = Parser().parsestr(message.as_string(), True)
AttributeError: 'NoneType' object has no attribute 'as_string'
seunomosowon commented 3 years ago

Issue fixed in last release