ENiGMA Log Investigation: No NetMail route

A Repeating Error

Recently I noticed a particularar log entry repeatedly showing up in Xibalba BBS’s ENiGMA½ logs:

1
2
WARN ENiGMA½: Error exporting message: Object does not exist: No NetMail route for 2:11/211
error: Object does not exist: No NetMail route for 2:11/211

Looking at the previous log entry, I can see that it happens during scheduled exports:

1
INFO ENiGMA½: Performing scheduled message scan/export... (module="FTN BSO")

Taking a look at the code, the system is logging from getNetMailRouteInfoFromAddress(), which is called from exportNetMailMessagesToUplinks(). Essentially what happens is an “external” (i.e.: to be exported) message fails to export, logs, then nothing else happens. The NetMail remains to eat up space and log the next time around.

But which message is this? Unfortunately, the current log doesn’t tell us. 🥲

Time to do a little digging…

Database Sleuthing

Since I don’t (yet) know much about the the message causing this, time to gather some info. ENiGMA marks a few metadata values about external messages. A FTN destined NetMail will have a remote_to_user value. In this case, set to 2:11/211. I’m only seeing a single log, so there should hopefully be one match. For this I’ll use sqlite-utils and jq:

1
2
3
4
5
6
7
8
9
> sqlite-utils query db/message.sqlite3 'select * from message_meta where meta_name="remote_to_user" and meta_value="2:11/211"' | jq
[
{
"message_id": 544380,
"meta_category": "System",
"meta_name": "remote_to_user",
"meta_value": "2:11/211"
}
]

Awesome, there it is: A single message with the ID of 544380. This has been happening for a while, and I don’t in fact, have a route to this destination address, so I’ll just delete the message. But first, I want to gather a bit of info about it so I can let the user know their message never sent. For this, I’ll use the tools above again:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
> sqlite-utils query ./db/message.sqlite3 'select * from message where message_id=544380' | jq
[
{
"message_id": 544380,
"area_tag": "private_mail",
"message_uuid": "a87d24ab-8be3-59d4-a6fb-420a39edfa68",
"reply_to_message_id": 0,
"to_user_name": "***REDACTED***",
"from_user_name": "***REDACTED***",
"subject": "von xi 2:11/211",
"message": "test\r\n\r\n",
"modified_timestamp": "2023-07-27T01:31:10.870-06:00",
"view_count": 0
}
]

Finally, rid of the bugger:

1
> sqlite3 db/message.sqlite3 'delete from message where message_id=544380'

For the future, look to Unroutable NetMail persists forever on the issue tracker :)