$bounce_unsubscribe_threshold not working

I discover the variable $bounce_unsubscribe_threshold wich are set to 5 in my config
But
user still marked as confirmed even with 25 bounce?

Same here. nothing is changed!

Many should i give more detail.

So this are my configuration

$bounce_mailbox_purge = 1;
$bounce_mailbox_purge_unprocessed = 0;
$bounce_unsubscribe_threshold = 5;
define('USE_ADVANCED_BOUNCEHANDLING', 1);

And some contact got 25 message/25 bounce and still confirm

The setting does work so I guess that you are misunderstanding what phplist is actually doing.

The bounce processing looks for consecutive campaigns sent to the subscriber that have bounced. Having the same campaign bounce more than once will usually be detected as duplicate bounces.
Having one campaign not bounce will break that sequence of consecutive bounces.

1 Like

@duncanc I understand that was matter of consecutive bounced but that’s not the point.
Even after 25 consecutive bounce user still confirm.
I create user which bounce everytime, and still confirm

After checking code I understood that processbounces.php was looking user from phplist_user_message_bounce

But my table phplist_user_message_bounce is almost empty,

And if I understood, as I am using advanced rule, where most of rule are
deletebounce or
blacklistuseranddeletebounce or
unconfirmuseranddeletebounce
in any case bounce are delete,
so phplist_user_message_bounce are ~ empty, So system cannot track treshold bounce?

@amsa I don’t understand what you are doing. If a subscriber was made unconfirmed or blacklisted by a bounce rule how can they then have been sent further emails that also bounced?

The consecutive bounces processing applies only to those bounces that are not deleted by a bounce rule.

Of course I am not talking about a subscribers which have been unconfirmed or blacklist.

Let’s try to give you an example.

As “mailbox full” is not a hard bounce we cannot unsubscribe or blacklist, it could be only temporary

So today i got a advanced rule.
“mailbox full” --> "deletebounce"
So it cannot be process by consecutive bounces processor.

Maybe i misunderstood advanced rule,
So for what kind of bounce “deletebounce” is useful? have you an example?

1 Like

hi @duncanc i don’t know if you see my answer.

Can you help me?
because I think I got problem in my configuration.

Consecutive bounce process is useful to remove contact with X consecutive soft bounce.
If a mailbox bounce once “mailbox full” is temporary error, but if the bounce come every time the mailbox must be remove from list

as you said

The consecutive bounces processing applies only to those bounces that are not deleted by a bounce rule.

I guess I shouldn’t delete those kind of bounce

So for what kind of bounce the rule “deletebounce” is useful? have you an example?
Further more, if I don’t delete unprocess (soft bounce) the database will grow so fast!?

@amsa On the View Bounces page you can delete bounces that are older than 2 months.

You can use the delete bounce rule to remove any bounce that you really want to ignore. Some servers send a “unable to deliver so far but we will keep trying” type of email, that isn’t a bounce as such.

2 Likes

thank you very so ducanc,

Thanks to your help I notice that I misused Bounce rules for years.
My rules date from several years ago and come from the old forum, where someone share his rules?

Whatever it is, I will completely rework my rules,
Too bad the documentation is not more explicit.

In fact the best is
Hard bounce --> blacklistuseranddeletebounce

  • User unknown
  • Unknown Recipient
  • Recipient unknown
  • not listed in public Name
  • mailbox unavailable
  • account has been disabled
  • Invalid recipient
  • invalid address
  • invalid user
  • innactive user

infomational --> deletebounce

  • unable to deliver so far but we will keep trying
  • Temporary local problem
  • please try later
  • Connection not authorised
  • Network is unreachable
  • server rejected
  • Error_connection_broken
  • connection broken
  • DNS_Server_error
  • name server reports that it is having technical problems

soft bounce --> no rule to be catch by consecutive bounce, or delete after 2month

  • out of the office
  • I will be back
  • I am away
  • as soon as I return
  • on vacation
  • we will reply
  • En vacances
  • box full
1 Like

@duncanc For me the $bounce_unsubs… function is not working either, I have set the threshold to be 1, tested it with the messages received to bounce mailbox and it still does not unsubscribe subscriber thus it shows more than one bounce at subscribers profile. These bounces were definitely consecutive.

@Vytautasber did you also set BLACKLIST_EMAIL_ON_BOUNCE ?

Yes, the same. The bounce is calculated but no action by phplist is done.

after resetting as @duncanc says its work.

1 Like

Mine is a slightly different problem.
I am getting the “Bounce processing info” emails informing me of the email addresses that are being unconfirmed, with

“Below are users who have been marked unconfirmed. The number in () is the number of consecutive bounces.”

But all the braces show “(5)”, instead of the 3 that I am expecting.
So I go to view my /var/www/vhosts/example.com/httpdocs/lists/config/config.php in case it had reverted to the default of 5, and I see that my setting of 3 is still there:
$bounce_unsubscribe_threshold = 3;

I would like a quicker more aggressive bounce-to-unconfirm than waiting for 5 consecutive bounces… but the setting is not having any effect.

Am I right that config files with other names such as config_extended.php and config-default.php will not have any effect? Because the “5” setting is in config_extended.php.

@kaon There is another config setting that you need to use. See this bug report https://mantis.phplist.org/view.php?id=18941

Ok found in admin/init.php:

if (!defined('BLACKLIST_EMAIL_ON_BOUNCE')) {
define('BLACKLIST_EMAIL_ON_BOUNCE', 5);
}
if ($bounce_unsubscribe_threshold < BLACKLIST_EMAIL_ON_BOUNCE) {
$bounce_unsubscribe_threshold = BLACKLIST_EMAIL_ON_BOUNCE;
}

I suppose it has been blacklisting and unconfirming those with 5 consecutive bounces. And I could change that 5 into a 3, and it would BL+unconfirm those with 3 consecutive bounces.

What if I want to unconfirm those with 3 consecutive bounces, but not blacklist them? The classic behavior.

Perhaps the programmer intended for the ‘<’ comparator to have been ‘>’.

1 Like

This is very useful, thanks for sharing. It relates to this mantis issue: https://mantis.phplist.org/view.php?id=18418

Are you interested in adding these rules to phpList 3 by default, perhaps so they can be included as candidates in a fresh install, or even enabled by default?