- Beiträge: 10
- Dank erhalten: 2
Bounce Processing false negatives
I am installing LS and just got to test the bounce processing.
I can see the bounce email arrive to the pop account for bouce emails, however when I do process bounces the popup reads:
1 unread messages were scanned, none were marked as bounce by the system.You can now close this modal box.
what does: "None were marked as bounce by the system" means?
Is it that postfix is not generating a valid return email?
Is it that LimeSurvey did not detect it as a bounce email?
What could be going on?
How can I debug it?
- Beiträge: 9172
- Karma: 400
- Dank erhalten: 1546
Bounce system track only unread message, maybe you read it before ?
Else, after bounce was done : look at header (show+complete+mail+header in your search tool), bounce system use it to track donw the token and the survey id.
Some server broke totally this header.
If you are sure it broken : copy/paste the header here.
The problem is that I expected the bounces to show in the Central Participant Database (where I picked the users from).
I took me a while to find the list of responder of my survey, where it is reflected.
Another problem is that the bounce processing system is not marked my bounce message as read, then after the first time, it keeps saying that 1 message has been processed but it is not a bounce.
I guess it was just a bit confusing, but I think it is working.
the concept is very simple:
1. it open the inbox of the "bounce email address" (the email you provided for that task)
3. it get the unread mails:
4. it choose the mails related to LimeSurvey (with a survey id and a token id in the header )
5. For those mail, it checks if the status is "bounced"
Of course, not all the mail providers reject the email with a "bounced" status. Some of them just reject them silently. There is nothing you can do about that.
- Beiträge: 9172
- Karma: 400
- Dank erhalten: 1546
Then ONLY email by limesurvey are set as read. Spam for example are not set as READ (or deleted) by LimeSurvey.
Else : false positive can be done by another reason :
- “out-of-office message” because in fact : it's a bounce …
It's the reason you can choose to not delete the email, but control the real final message.
I'm running Version 3.0.1+171228 and trying to debug where bounce processing is not recognizing some bounces. I just issued my first real survey, but during testing I had the same issue.
LS is able to log in and read the IMAP emails, but does not report bounces as bounced. So there is some problem with my emails not being in a format LS expects.
During my testing there was one time that processed one bounce email, so I figured I had gotten the setting correct and moved on. However, now I have "live" bounces and it does not work.
Here is a sample header and beginning of the attached email:
Received: (qmail 23062 invoked for bounce); 8 Jan 2018 12:32:14 -0000
Date: 8 Jan 2018 12:32:14 -0000
Subject: failure notice
Hi. This is the qmail-send program at laurel-point.net.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
22.214.171.124 does not like recipient.
Remote host said: 550 5.1.1 User Unknown
Giving up on 126.96.36.199.
--- Below this line is a copy of the message.
Received: (qmail 23014 invoked by uid 33); 8 Jan 2018 12:31:56 -0000
Subject: TJ SNOW is requesting your input
Date: Mon, 8 Jan 2018 07:31:56 -0500
X-Mailer: PHPMailer 5.2.22 ( github.com/PHPMailer/PHPMailer )
X-Surveymailer: LimeSurvey - TJ SNOW Emailer (LimeSurvey.org)
This is a multi-part message in MIME format.
Content-Type: text/plain; charset=us-ascii
You have been invited to participate...
I will do more troubleshooting, and report what I discover.
Thanks for posting the links above to the correct areas of the code. That is a big timesaver when starting from scratch to try to figure things out.
OK... I've got it figured out.
there is the line
$header = explode("\r\n", imap_body($mbox, $sMessageID, FT_UID & FT_PEEK)); // Don't mark messages as read
It should instead be:
$header = explode("\r\n", imap_body($mbox, $sMessageID, FT_UID | FT_PEEK)); // Don't mark messages as read
That difference in listing the multiple FT Flags was making LS not get anything for the message body, which meant it was never getting a match.
Bug reported at bugs.limesurvey.org/view.php?id=13145
While discussing bounce processing, I have a two quick questions and maybe someone is able to provide insight:
1. I see in the code there is a "bounceremove" variable that would move processed move processed and matched messages to the trash. But I don't see anywhere that variable can get set on the survey level or the main config level. What am I missing?
2. Has there been any discussion that instead of deleting or leaving in the inbox unread, that messages be moved to a "processed" folder? To me, it is easy to mark a message as read by mistake when checking that inbox by mistake. So if I mark one as unread by mistake, then processed deleted in LS, and then grab all the unread and move them to deleted, I just missed processing one. By having the LS process move messages to another folder, this is avoided.