[SOLVED] Processqueue does not find all subscribers

Hi,
im using PHPList for many many years and did nowadays an update to 3.6.15.
System is running and Frontend is working.
Just now, i wanted to send a mailing out to a recipient list of 5 recipients. Its a testlist.
Sending out this mailing should be done by a cron job. I started the cronjob manually, and the system is not sending out the mailing to the subscribers.

/usr/bin/php -q /PATH/TO/admin/index.php -pprocessqueue -c /PATH/TO/config/config.php

All subscribers are active and not blacklisted.

phpList - phpList version 3.6.15 (c) 2000-2025 phpList Ltd, https://www.phplist.com
phpList - Recently sent : 4
phpList - Started [0.0004170000] (138)
phpList - Time now2025-03-19 15:40 [0.0000290000] (139)
phpList - Sending in batches of 9 messages [0.0000640000] (141)
phpList - This batch will be 8,996 emails, because in the last 3,600 seconds 4 emails were sent [0.0000690000] (144)
phpList -  select id from phplist1_message where status not in ("draft", "sent", "prepared", "suspended") and embargo  [0.0004840000] (145)
phpList - Processing has started, [0.0005320000] (148)
phpList - One campaign to process. [0.0000480000] (150)
phpList - sending of this campaign will stop, if it is still going in  182 days 11 hours 19 mins 30 seconds [0.0017810000] (173)
phpList - Processing campaign 870 [0.0862770000] (195)
phpList - Looking for subscribers [0.0027370000] (200)
phpList - looking for subscribers who can be excluded from this mailing [0.0009720000] (203)
phpList - Exclude query  select userid from phplist1_listuser where listid in (-1) [0.0005950000] (204)
phpList - found pre-queued subscribers 0
phpList - User select query select distinct u.id from phplist1_listuser as listuser
        inner join phplist_user_user as u ON u.id = listuser.userid
        inner join phplist1_listmessage as listmessage ON listuser.listid = listmessage.listid
        left join phplist1_usermessage as um ON (um.messageid = 870 and um.userid = listuser.userid)
        where
        listmessage.messageid = 870
        and listmessage.listid = listuser.listid
        and u.id = listuser.userid
        and um.userid IS NULL
        and u.confirmed and !u.blacklisted and !u.disabled
          [8.5461430000] (208)
phpList - Found them: 0 to process [0.1009420000] (212)
phpList - Processed 0 out of 0 subscribers [4.2073140000] (216)
phpList - No subscribers found to send to [0.0003770000] (218)
phpList - It took  13 seconds to send this message [0.0557690000] (235)
phpList - Script stage: 3 [0.0025260000] (239)
phpList - Finished, Nothing to do [0.0005550000] (240)
phpList - Finished, All done [0.0023350000] (245)

It sends just one mailing to me and the reports like mailing start, mailing end.

I took the sql state and struggled around with it:

select distinct u.id from phplist1_listuser as listuser
        inner join phplist_user_user as u ON u.id = listuser.userid
        inner join phplist1_listmessage as listmessage ON listuser.listid = listmessage.listid
        left join phplist1_usermessage as um ON (um.messageid = 870 and um.userid = listuser.userid)
        where
        listmessage.messageid = 870
        and listmessage.listid = listuser.listid
        and u.id = listuser.userid
        and um.userid IS NULL
        and u.confirmed and !u.blacklisted and !u.disabled

This returns me just 1 subscriber. Thats me!

If i manipulate and take out “and um.userid IS NULL”, MySQL returns me all 5 user!?!?

Afterwards i created a new mailing and process it via the web interface. I got the following protocol:

The following events occured while processing the message queue: 
[Wed 19 Mar 2025 16:30] [xxx.xxx.xxx.xxx] Verarbeitung gestartet 
[Wed 19 Mar 2025 16:30] [xxx.xxx.xxx.xxx] Aktuelle Zeit2025-03-19 16:30 
[Wed 19 Mar 2025 16:30] [xxx.xxx.xxx.xxx] Versende in Stapeln von 9 E-Mails 
[Wed 19 Mar 2025 16:30] [xxx.xxx.xxx.xxx] select id from phplist1_message where status not in ("draft", "sent", "prepared", "suspended") and embargo <= now() order by entered limit 999 
[Wed 19 Mar 2025 16:30] [xxx.xxx.xxx.xxx] Die Verarbeitung wurde gestartet, 
[Wed 19 Mar 2025 16:30] [xxx.xxx.xxx.xxx] Eine Nachricht bereit zum verarbeiten. 
[Wed 19 Mar 2025 16:30] [xxx.xxx.xxx.xxx] Bitte lassen Sie dieses Fenster geöffnet. phpList wird die Warteschlange bearbeiten, bis Ihre Nachrichten versendet sind. Dies kann eine Weile dauern 
[Wed 19 Mar 2025 16:30] [xxx.xxx.xxx.xxx] Einen Bericht über die Verarbeitung erhalten Sie per E-Mail 
[Wed 19 Mar 2025 16:30] [xxx.xxx.xxx.xxx] Versand dieser Nachricht wird beendet, wenn er in 182 Tage 11 Stunden 29 Minuten 02 Sekunden noch läuft 
[Wed 19 Mar 2025 16:30] [xxx.xxx.xxx.xxx] Verarbeite Nachricht 872 
[Wed 19 Mar 2025 16:30] [xxx.xxx.xxx.xxx] Suche Empfänger 
[Wed 19 Mar 2025 16:30] [xxx.xxx.xxx.xxx] Überprüfe auf Empfänger die von der Verarbeitung ausgeschlossen werden können 
[Wed 19 Mar 2025 16:30] [xxx.xxx.xxx.xxx] Exclude query select userid from phplist1_listuser where listid in (-1) 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] User select query select distinct u.id from phplist1_listuser as listuser inner join phplist_user_user as u ON u.id = listuser.userid inner join phplist1_listmessage as listmessage ON listuser.listid = listmessage.listid left join phplist1_usermessage as um ON (um.messageid = 872 and um.userid = listuser.userid) where listmessage.messageid = 872 and listmessage.listid = listuser.listid and u.id = listuser.userid and um.userid IS NULL and u.confirmed and !u.blacklisted and !u.disabled 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] Gefunden: 5 Empfänger 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] Sende 872 nach m***n@bla***er.de 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] Versand dauerte 0.0749010000 Sekunden um zu senden 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] Sende 872 nach d***r@t***ne.de 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] Versand dauerte 0.0540920000 Sekunden um zu senden 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] Sende 872 nach it@trend-service.de 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] Versand dauerte 0.0603690000 Sekunden um zu senden 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] Sende 872 nach d***r@g***il.com 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] Versand dauerte 0.0537890000 Sekunden um zu senden 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] Sende 872 nach W***er@g***il.com 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] Versand dauerte 0.0540420000 Sekunden um zu senden 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] 5 von 5 Abonnenten verarbeitet 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] Versand dauerte 13 Sekunden um diese Nachricht zu senden 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] Skript-Stufe: 5 
[Wed 19 Mar 2025 16:31] [xxx.xxx.xxx.xxx] 5 Nachrichten versandt in 13.47 Sekunden (1336 Nachrichten/Std.) Um diesen Bericht nicht mehr zu erhalten lesen Sie hier: https://resources.phplist.com/system/config/send_queue_processing_report 

So the web interface found all the subscribers and pretends to send email to them. But … it sends just an email to my. To one subscriber!
All others mentioned in the log was not mailed. The also dont appear in the mail.log of Postfix.

I dont know how i can fix that. Former, at the old version 3.3.9, everything was working like a charm.

Can someone please assist me a little? Im sure, its not a big thing, but i dont know where to start with my investigation.

Thanks alot

Bone

@bonecracker I would guess that you didn’t select the correct lists on the Lists tab for the campaign id 870.

Sure i did. I did it 3 times with different mailings.

I will create a new Mailing list today morning and add some subscribers manually. Maybe there was going something wrong with the update to 3.6.15.
And as i said, i use PHPList for many many years and developed former some modules for it for my own. So im very familiar with the code.

Can someone explain to me what “and um.userid IS NULL” at the sql query means? Thats an important point for me because with this part, no subscribers were returned. Without, all subscribers are returned.
On the other hand, the web interface says, that it will send emails to the proper subscribers, but it dont.

Thats so weird

Bone

There is an update in this case.
I created a new list and added subscribers. Afterwards i created a new mailing and processed via console.

What PHPList says is:

phpList - Found them: 5 to process [0.0987420000] (209)
phpList - Sending 873 to m**n@b**er.de [4.2402430000] (226)
phpList - It took 0.0669870000 seconds to send [0.0676310000] (250)
phpList - Sending 873 to d**r@t-**e.de [0.0028900000] (263)
phpList - It took 0.0553000000 seconds to send [0.0554930000] (275)
phpList - Sending 873 to d**ur@g**il.com [0.0031370000] (288)
phpList - It took 0.0511560000 seconds to send [0.0513590000] (300)
phpList - Sending 873 to W**er@g**l.com [0.0039000000] (313)
phpList - It took 0.0522550000 seconds to send [0.0525430000] (325)
phpList - Sending 873 to d**ur@t**ce.de [0.0031950000] (338)
phpList - It took 0.0562160000 seconds to send [0.0564340000] (350)
phpList - Processed 5 out of 5 subscribers [0.0023930000] (358)
phpList - It took  13 seconds to send this message [0.0624720000] (374)
phpList - Script stage: 5 [0.0018150000] (378)
phpList - 5 messages sent in 13.34 seconds (1349 msgs/hr) [0.0009910000] (381)
phpList - Finished this run [0.0012960000] (387)

So the System found 5 subscribers and pretend to send emails to them. BUT no email was send. Just to me. And this 5 times!!
Could it be that the system is sending mails for all 5 recipients to me?
It seems to be like this. Yesterday i was also wondering, why i get that much mails if i send out an email.
Is there any flag that says a test mail for every recipient should be sent to someone instead of the true recipient?
Postfix log is also just showing that those mails gets send to me.

Please i need help. If someone could assist me.

Thank you

Bone

Hi Guys,
its solved!
I was completely wrong to analyze code or sql states.
During the update process over more versions, i added my developer address to config.php

$developer_email =  'XY@Z.COM';

That was the cause. Removing this line is sending out mailings properly.
Hope, it helps someone.

Thank you all

Bone