A tool to automatically receive SMS-es from SIM card of a AT-command enabled GSM modem running over your UART (or USB, as long as it's reachable as a serial device, it's fair game), write them to a file and then delete them from the SIM card, since the SIM card doesn't have infinite space.
Run it without any modifiers to delete the SMS-es, run it with any modifier, preferably --dont-delete not to delete them from the SIM card.