revpriest / listman

An email-list manager for NextCloud
GNU General Public License v3.0
18 stars 2 forks source link

"Could not fetch lists" and "Could not create the list" #24

Open stokemctoke opened 2 months ago

stokemctoke commented 2 months ago

I had listman installed and I almost had it working, as was getting signups from website listing passed onto listman as they should - but emails still were not sending from listman while using the same settings as smtp for nextcloud. I had a list of 12 unsent emails that were no longer there, so I deleted them from mariadb and reinstalled. Now I can't get any lists saved and none can get retrieved. What tables do I need to add to mariadb and should all permissions for nextcloud/apps/listman user:group be www-data:www-data or listman:www-data?

Thanks for any advice as I really want to get this working.

Nextcloud: 27.1.9

Listman: 27.1.4

PHP: Version: 8.2.18 Memory limit: 1 GB Max execution time: 3600 Upload max size: 100 GB Extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, intl, exif, msgpack, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, memcached, Zend OPcache

Mysql: Version: 10.6.16 Size: 504.5 MB

Operating System: Linux 5.15.0-102-generic x86_64 CPU: AMD EPYC 7282 16-Core Processor (8 cores) Memory: 23.46 GB

revpriest commented 2 months ago

Tricky to know what might be wrong out there, especially if you've been mucking about in the database.

Here's the tables I have, guess first step is making sure they all exist properly:

MariaDB [nc]> show create table oc_listman_list;
| oc_listman_list | CREATE TABLE `oc_listman_list` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(200) NOT NULL,
  `desc` longtext NOT NULL,
  `fromname` varchar(200) NOT NULL,
  `fromemail` varchar(100) NOT NULL,
  `buttontext` varchar(32) NOT NULL,
  `buttonlink` varchar(200) NOT NULL,
  `footer` varchar(500) NOT NULL,
  `randid` varchar(16) NOT NULL,
  `redir` varchar(250) NOT NULL,
  `user_id` varchar(200) NOT NULL,
  `shareurl` longtext DEFAULT NULL,
  `suburl` longtext DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `listman_list_randid_index` (`randid`),
  KEY `listman_list_user_id_index` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED 

MariaDB [nc]> show create table oc_listman_member;
| oc_listman_member | CREATE TABLE `oc_listman_member` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `list_id` int(11) NOT NULL,
  `name` varchar(200) NOT NULL,
  `email` varchar(100) NOT NULL,
  `state` int(11) NOT NULL DEFAULT 0,
  `conf` varchar(32) NOT NULL,
  `conf_expire` datetime NOT NULL,
  `lastsend` datetime DEFAULT NULL,
  `user_id` varchar(200) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `listman_member_user_id_index` (`user_id`),
  KEY `listman_member_list_id_index` (`list_id`)
) ENGINE=InnoDB AUTO_INCREMENT=213 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED |

MariaDB [nc]> show create table oc_listman_message;
| oc_listman_message | CREATE TABLE `oc_listman_message` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `randid` varchar(16) NOT NULL,
  `list_id` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `subject` varchar(200) NOT NULL,
  `body` longtext NOT NULL,
  `user_id` varchar(200) NOT NULL,
  `sendrate` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `listman_message_list_id_index` (`list_id`),
  KEY `listman_message_randid_index` (`randid`),
  KEY `listman_message_user_id_index` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED |

MariaDB [nc]> show create table oc_listman_react;
| oc_listman_react | CREATE TABLE `oc_listman_react` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `message_id` int(11) NOT NULL,
  `symbol` varchar(255) NOT NULL,
  `count` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `listman_react_index` (`message_id`)
) ENGINE=InnoDB AUTO_INCREMENT=360 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED |

MariaDB [nc]> show create table oc_listman_sendjob;
| oc_listman_sendjob | CREATE TABLE `oc_listman_sendjob` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `message_id` int(11) NOT NULL,
  `member_id` int(11) NOT NULL,
  `state` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `IDX_BBF5FDEE537A13297597D3FE` (`message_id`,`member_id`),
  KEY `listman_sjmessid_index` (`message_id`),
  KEY `listman_sjmemid_index` (`member_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1524 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED |

MariaDB [nc]> show create table oc_listman_settings;
| oc_listman_settings | CREATE TABLE `oc_listman_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `settingname` varchar(255) NOT NULL,
  `settingvalue` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `listman_setting_name_i` (`settingname`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED |

The settings table may need entries for:

| host        |
| latestWarn  |
| maxdaily    |
| pass        |
| port        |
| senttoday   |
| smtpSecure  |
| today       |
| user        |

I guess it may crash if any of those are missing.

Actual sending of the emails is done in the nextcloud cron, if you're sure the cron is running and there's mail queued to be send out then looking a the latestWarn row from the settings table may give some clues as to any errors coming from the SMTP servers, say.

stokemctoke commented 2 months ago

Thank you very much. This is everything and more that I wanted to know. Gives me a huge help and a decent place to start.

Going in, wish me luck.

Excellent software - despite my tinkering inability to get it running the way I want hehe.