SMS: I decant my phone’s database into my IMAP mailbox. I love being able to search across all my conversations and access then on any device that can access my email.
I’m using an iPhone. I pull the SMS database from an iTunes backup, query it with command-line SQLite, and write out files into my Maildir (which is served to clients over IMAP). It’s a bit tediously manual. (Back when I had a jailbroken iPhone I could just rsync the database and do everything automatically.)
I haven’t reverse engineered the schema for MMS so I lose photos. I don’t much care but that would be something to do for completeness— adding the photos to the messages as MIME attachments.