$this->checkMailingBounces(1);
}
+ /**
+ * Test the job processing function can handle invalid characters.
+ */
+ public function testBounceProcessingInvalidCharacter() {
+ $this->setUpMailing();
+ $mail = 'test_invalid_character.eml';
+
+ copy(__DIR__ . '/data/bounces/' . $mail, __DIR__ . '/data/mail/' . $mail);
+ $this->callAPISuccess('job', 'fetch_bounces', array());
+ $this->assertFalse(file_exists(__DIR__ . '/data/mail/' . $mail));
+ $this->checkMailingBounces(1);
+ }
+
/**
* Tests that a multipart related email does not cause pain & misery & fatal errors.
*
--- /dev/null
+Delivered-To: my@example.com
+Received: by 10.2.13.84 with SMTP id 1234567890;
+ Wed, 19 Dec 2018 10:01:11 +0100 (CET)
+Return-Path: <>
+From: Postmaster@example.com
+To: b.2.1.aaaaaaaaaaaaaaaa@example.com
+Subject: Delivery Status Notification (Failure)
+Message-ID: <abc.def.fhi@example.com>
+Date: Wed, 19 Dec 2018 10:01:07 +0100
+MIME-Version: 1.0
+Content-Type: multipart/report; report-type=delivery-status; boundary="==IFJRGLKFGIR18927894UHRUHIHD"
+
+--==IFJRGLKFGIR18927894UHRUHIHD
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: quoted-printable
+
+Your message
+
+ Subject: test
+
+was not delivered to:
+
+ my@example.com
+
+because:
+
+ Benutzer my (my@example.com) nicht im Domino-Verzeichnis aufgef=FChrt
+
+
+--==IFJRGLKFGIR18927894UHRUHIHD
+Content-Type: message/delivery-status
+
+Reporting-MTA: dns;srv.example.com
+
+Final-Recipient: rfc822;my@example.com
+Action: failed
+Status: 5.0.0
+Diagnostic-Code: X-Notes; Benutzer my (my@example.com) nicht im Domino-Verzeichnis aufgef\81hrt
+
+--==IFJRGLKFGIR18927894UHRUHIHD