Check list length before accessing the first two elements of 'dispositions'. The list may have only a single element ('inline') or may be empty in mailformed emails.
paperless-
paperless