Edit:
Problem was with a specific sender: SAP NetWeaver, it wasn't sending a properly structured email so the osTickets code couldn't decipher it..
--------------------------------------------------------------
Mail Sending: phpMail
Mail Fetching/Receiving: POP and Gmail
PHP version: PHP 5.2.6-1+lenny16 with Suhosin-Patch 0.9.6.2
Operating System: Debian Lenny 5.0.8
Currently we are importing attachments just fine.. (well, the odd html one fails, but that is a different weirder issue)
Some PDF's come through fine.. by some I mean 99%.. there is just one system that sends us email'd PDF's with no message and a single attachment and it fails.
Message headers, space, attachment.. Bloody SAP! The sender comes through in capitals.. twice. like that, and the filename has spaces in it.
Weirdly though, THIS WORKED.. it truly did.. then it started to fail, and I can't figure it out.
I'm attempting to add some logging to the ticket-parser so I can see where it fails when an attachment doesn't get processed or denied.. currently there is no real error/message etc.
What can I do? How do I troubleshoot this single sender?
I've added the code from: https://github.com/osTicket/osTicket-1.7/pull/607/files(https://github.com/osTicket/osTicket-1.7/pull/607/files), however it doesn't seem to have fixed it for this.. hasn't introduced any other errors either, so thats ok.
example, with stuff that might identify the sender/receiver redacted:
Delivered-To: orders@mydomain.me
Received: by 10.114.173.203 with SMTP id bm11csp38002ldc;
Sun, 21 Jul 2013 18 -0700 (PDT)
X-Received: by 10.224.64.68 with SMTP id d4mr5181406qai.73.1374457409908;
Sun, 21 Jul 2013 18 -0700 (PDT)
Return-Path: <user@domain.com>
Received: from mail1.bemta8.messagelabs.com (mail1.bemta8.messagelabs.com. )
by mx.google.com with ESMTPS id w11si9723273qeu.9.2013.07.21.18.43.29
for <orders@mydomain.me>
(version=TLSv1 cipher=RC4-SHA bits=128/128);
Sun, 21 Jul 2013 18 -0700 (PDT)
Received-SPF: neutral (google.com: IP is neither permitted nor denied by best guess record for domain of user@domain.com) client-ip=IP;
Authentication-Results: mx.google.com;
spf=neutral (google.com: IP is neither permitted nor denied by best guess record for domain of user@domain.com) smtp.mail=user@domain.com
Return-Path: <user@domain.com>
Received: from by server-10.bemta-8.messagelabs.com id 40/9F-06587-04E8CE15; Mon, 22 Jul 2013 01 +0000
X-Env-Sender: user@domain.com
X-Msg-Ref: server-14.tower-220.messagelabs.com!1374457277!3275355!72
X-Originating-IP:
X-StarScan-Received:
X-StarScan-Version: 6.9.9; banners=domain.com,-,-
X-VirusChecked: Checked
Received: (qmail 12910 invoked from network); 22 Jul 2013 01 -0000
Received: from unknown (HELO a.sul.local) (IP)
by server-14.tower-220.messagelabs.com with AES128-SHA encrypted SMTP; 22 Jul 2013 01 -0000
Received: from a.sul.local (10.0.50.79) by b.sul.local
(10.20.20.30) with Microsoft SMTP Server id 8.3.83.0; Mon, 22 Jul 2013
11 +1000
Date: Mon, 22 Jul 2013 11 +1000
From: USERNAME USERNAME <username@domain.com.au>
Subject: Subject
To: <orders@mycompany.me>
Message-ID: <redacted>
MIME-Version: 1.0
Importance: Normal
X-Priority: 3 (Normal)
X-Mailer: SAP NetWeaver 7.03
Content-Type: application/pdf; name="filename oddly with spaces.pdf"
Content-Transfer-Encoding: base64
Content-Description: Subject
.... BASE64 DATA ....
...
...==
EOF