Problem with modoboa-postfix-autoreply
Closed this issue · 4 comments
In random cases, the mail server sends the message about the undelivered mail to the recipient with autoreply set.
Below the message content.
Name | Installed version | Last version | Description
Modoboa | 1.9.0 | 1.9.0 | The core part of Modoboa
Amavis frontend | 1.1.3 | 1.1.3 | Simple amavis management frontend
Contacts | 0.4.0 | 0.4.0 | Address book
PDF credentials | 1.2.1 | 1.2.1 | Generate PDF documents containing users' credentials
Postfix autoreply | 1.2.1 | 1.2.1 | Auto-reply (vacation) functionality using Postfix
Sieve filters | 1.1.1 | 1.1.1 | Plugin to easily create server-side filters
Statistics | 1.2.2 | 1.2.2 | Graphical statistics about emails traffic using RRDtool
Webmail | 1.2.1 | 1.2.1 | Simple IMAP webmail
Regards,
Christopher
This is the mail system at host mail.test.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.The mail system
<"test@test.com"@autoreply.test.com> (expanded from <test@test.com>): Command died with status 1: "/srv/modoboa/env/bin/python". Command output: Traceback (most recent call last): File "/srv/modoboa/instance/manage.py", line 22, in <module> execute_from_command_line(sys.argv) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line utility.execute() File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 294, in run_from_argv self.execute(*args, **cmd_options) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 345, in execute output = self.handle(*args, **options) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa_postfix_autoreply/management/commands/autoreply.py", line 169, in handle send_autoreply(sender, mbox, armessage, original_msg) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa_postfix_autoreply/management/commands/autoreply.py", line 78, in send_autoreply msg.send() File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/mail/message.py", line 342, in send return self.get_connection(fail_silently).send_messages([self]) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 107, in send_messages sent = self._send(message) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 121, in _send message = email_message.message() File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/mail/message.py", line 307, in message msg['Subject'] = self.subject File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/mail/message.py", line 232, in __setitem__ name, val = forbid_multi_line_headers(name, val, self.encoding) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/mail/message.py", line 92, in forbid_multi_line_headers raise BadHeaderError("Header values can't contain newlines (got %r for header %r)" % (val, name)) django.core.mail.message.BadHeaderError: Header values can't contain newlines (got u'Auto: Urlop Re: =?UTF-8?Q?FIRMA_HANDLOWO-US=c5=81UGOWA_MIROS=c5=81AW_=c5=81OCHOWICZ?=\n =?UTF-8?Q?=2cAdres=2c64-820_Szamocin=2c_Marcinkowskiego_104A=2cNIP=2c766000?=\n =?UTF-8?Q?9749?=' for header u'Subject')
Hello,
I have noticed this as well, but there were some changes as to how the Subject is generated since 1.2.1, so this problem with longer Subjects might be resolved in 1.2.2.
Regards.
got this on modoboa 1.15.0 with postfix autoreply 1.6.0
<"xxxxxxxxxx@xxxxx.xx"@autoreply.xxxxxxxxxx@xxxxx.xx>
(expanded from xxxxxxxxxx@xxxxx.xx): Command died with
status 1: "/srv/modoboa/env/bin/python". Command output: Traceback (most
recent call last): File "/srv/modoboa/instance/manage.py", line 22, in
execute_from_command_line(sys.argv) File
"/srv/modoboa/env/lib/python3.6/site-packages/django/core/management/init.py",
line 381, in execute_from_command_line utility.execute() File
"/srv/modoboa/env/lib/python3.6/site-packages/django/core/management/init.py",
line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv) File
"/srv/modoboa/env/lib/python3.6/site-packages/django/core/management/base.py",
line 323, in run_from_argv self.execute(*args, **cmd_options) File
"/srv/modoboa/env/lib/python3.6/site-packages/django/core/management/base.py",
line 364, in execute output = self.handle(*args, **options) File
"/srv/modoboa/env/lib/python3.6/site-packages/modoboa_postfix_autoreply/management/commands/autoreply.py",
line 214, in handle send_autoreply(sender, mbox, armessage,
original_msg) File
"/srv/modoboa/env/lib/python3.6/site-packages/modoboa_postfix_autoreply/management/commands/autoreply.py",
line 107, in send_autoreply msg.send() File
"/srv/modoboa/env/lib/python3.6/site-packages/django/core/mail/message.py",
line 291, in send return
self.get_connection(fail_silently).send_messages([self]) File
"/srv/modoboa/env/lib/python3.6/site-packages/django/core/mail/backends/smtp.py",
line 110, in send_messages sent = self._send(message) File
"/srv/modoboa/env/lib/python3.6/site-packages/django/core/mail/backends/smtp.py",
line 124, in _send message = email_message.message() File
"/srv/modoboa/env/lib/python3.6/site-packages/django/core/mail/message.py",
line 275, in message msg[name] = value File
"/srv/modoboa/env/lib/python3.6/site-packages/django/core/mail/message.py",
line 169, in setitem name, val = forbid_multi_line_headers(name,
val, self.encoding) File
"/srv/modoboa/env/lib/python3.6/site-packages/django/core/mail/message.py",
line 60, in forbid_multi_line_headers raise BadHeaderError("Header
values can't contain newlines (got %r for header %r)" % (val, name))
django.core.mail.message.BadHeaderError: Header values can't contain
newlines (got '\n
xxxxxxxxxx@xxxxx.xx'
for header 'In-Reply-To')
This still seems to be a problem with Modoboa-1.17.0 and Postfix-autoreply-1.6.1, at least this happens reguarly at one of our modoboa servers (still running Debian "Stretch").
@tonioo Is this supposed to be fixed?
<"user.xy@xxxxxxxxxxx.de"@autoreply.xxxxxxxxxxx.de> (expanded
from <user.xy@xxxxxxxxxxx.de>): Command died with status 1:
"/var/modoboa/env/bin/python". Command output: Traceback (most recent call
last): File "/var/modoboa/instance/manage.py", line 22, in <module>
execute_from_command_line(sys.argv) File
"/var/modoboa/env/lib/python3.5/site-packages/django/core/management/__init__.py",
line 381, in execute_from_command_line utility.execute() File
"/var/modoboa/env/lib/python3.5/site-packages/django/core/management/__init__.py",
line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv) File
"/var/modoboa/env/lib/python3.5/site-packages/django/core/management/base.py",
line 323, in run_from_argv self.execute(*args, **cmd_options) File
"/var/modoboa/env/lib/python3.5/site-packages/django/core/management/base.py",
line 364, in execute output = self.handle(*args, **options) File
"/var/modoboa/env/lib/python3.5/site-packages/modoboa_postfix_autoreply/management/commands/autoreply.py",
line 214, in handle send_autoreply(sender, mbox, armessage,
original_msg) File
"/var/modoboa/env/lib/python3.5/site-packages/modoboa_postfix_autoreply/management/commands/autoreply.py",
line 107, in send_autoreply msg.send() File
"/var/modoboa/env/lib/python3.5/site-packages/django/core/mail/message.py",
line 306, in send return
self.get_connection(fail_silently).send_messages([self]) File
"/var/modoboa/env/lib/python3.5/site-packages/django/core/mail/backends/smtp.py",
line 110, in send_messages sent = self._send(message) File
"/var/modoboa/env/lib/python3.5/site-packages/django/core/mail/backends/smtp.py",
line 124, in _send message = email_message.message() File
"/var/modoboa/env/lib/python3.5/site-packages/django/core/mail/message.py",
line 290, in message msg[name] = value File
"/var/modoboa/env/lib/python3.5/site-packages/django/core/mail/message.py",
line 184, in __setitem__ name, val = forbid_multi_line_headers(name,
val, self.encoding) File
"/var/modoboa/env/lib/python3.5/site-packages/django/core/mail/message.py",
line 62, in forbid_multi_line_headers raise BadHeaderError("Header
values can't contain newlines (got %r for header %r)" % (val, name))
django.core.mail.message.BadHeaderError: Header values can't contain
newlines (got '\n
<VE1PR01MB5693AECE85312E417EED432D8AFD9@VE1PR01MB5693.eurprd01.prod.exchangelabs.com>'
for header 'In-Reply-To')