Migrating Mail-In-A-Box to a New VPS

A few years ago, I started running my own mail server using Mail-In-A-Box. Four years or so actually, if the age of my old server was accurate. I have several different email addresses, mostly to better segment out content. I have done this with Reddit, and Twitter, and TT-RSS, and probably other things. In my Mail-In-A-Box I run email for 3 domains, two of mine, one for my wife’s. Overtime I may eventually migrate all of my email to it, at this point, I am a little worried about being blacklisted, so I mostly use it for secondary, receive only, email aggregation.

For a while I’ve been putting off migrating the system to a new VPS. It’s been running on Ubuntu 14.04 since it was created. Newer MiaB won’t run on 14.04 and I can’t distro update the machine. The only choice is to roll a new VPS and migrate the mail.

I use Digital Ocean for my online services, feel free to sign up with the link in the side bar if you want, I get a little kickback if you do. It’s easy to use and affordable. Plus in cases like this, I can spin up an extra VPS, then easily destroy it and spin up a new one, when I discover that MiaB only works up through 18.04, so 20.04, which I used initially, won’t work. Also having the extra server just means a temporary bump in my billing for the month.

The basic process for migrating Mail-In-A-Box is here, in the official documentation. I had a few hiccups along the way but I got them ironed out.

First step was creating the new machine. I mentioned above, I first made a 20.04 machine, but found that doesn’t work, so I killed that and made a new 18.04 machine. Before anything else, I did a few security based housecleaning tasks. The server was creating with Shared Keys log in set up, but it only had a root account. So I created a new user and made them a sudoer. I also copied the SSH keys from root to the user.

adduser Username
usermod -aG sudo Username
cp ~/.ssh /home/Username
chown Username:Username /home/Username/.ssh -R

Next step was to add the new user to the SSH users and secure up that access.

sudo pico /etc/ssh/sshd_config

Then edit:

#Port 22

To a custom port and change:

PermitRootLogin no

Finally add:

AllowUsers Username

Lastly restart the ssh server with sudo service sshd restart. Then test the connection using the regular user. If that works, then disconnect from the root session and continue on the regular user.

I was doing an upgrade but the fresh install guide is here. All I needed was the set up line really, which takes a minute to run but does an initial set up of Mail-in-a-Box.

curl -s https://mailinabox.email/setup.sh | sudo -E bash

The next part was the trickiest bit. I linked the migration article above but I ended up trying to simplify things a bit. On the old machine, I stopped the mailinabox service, so no new mail would come in, then ran the backup python script as described int he article above. I found it was easiest to just connect to the server using Filezilla using SSH FTP, which meant importing my keys to Filezilla. It’s in the settings under SFTP. Something to keep in mind if you set a custom port is you’ll need to add sftp:// before the IP address.

Things are a little tricky here, since root owns the backup folder. I ended up doing a sudo copy into my user home directory, then a chown on the folder to give my user account access to the folder. This meant Filezilla could see the folder and download it to my local machine. There are way to directly transfer between the new and old server, but between custom ports and SSH keys and permissions, I found it was easiest just to download to my local laptop. Afterwards, I connected with SFTP to the NEW server, and pushed the backup folder to the new server. You need the whole folder with the “secret_key” text file and the encrypted folder and files. Basically, this is all the settings and emails.

Next step was to ssh into the New Server, go to the freshly uploaded backup directory, and import the old files, as described in the link. This is two commands run, separately.

export PASSPHRASE=$(cat secret_key.txt)

sudo -E duplicity restore --force file:///home/Username/backup/encrypted /home/user-data/

This takes a minute to run. The next step listed is to rerun the mailinabox set up with “sudo mailinabox”.

I had trouble here. Nginx would not restart. After sound troubleshooting I found it was an issue with SSL. Basically what seemed to happen was the restore, pulled the old SSL certs. Or maybe it was looking for the old SSL certs. Whatever the case, the fix was this process.

rm -rf /home/user-data/ssl/*

The fix was to delete the SSL certificates. then run “sudo mailinabox”. Everything started up. I verified I could log into the control panel and the mailbox using the UP address of the new server. I verified that all my custom DNS records existed, these are needed since the Glue Records point to the Mail-In-A-Box machine but because I host my websites on a separate machine, I have to have DNS records set up appropriately.

One thing I noticed was the SSL Certificates seemed to be wrong, which meant things worked, but would cause annoying security messages. I am not sure if this was related to deleting the certs above, or just that it was still looking for the old IP address. Whatever the case, I did a manual update with certbox for my MiaB Subdomain using

sudo certbot certonly --force-renewal -d Subdomain.Domain.comHere

Another minor issue I ran into, doing this needs to drop a file either in the webroot folder, or spin up a temporary web server to host it’s own file. I couldn’t find the webroot for the custom MiaB set up (it was not /var/www/html) so I temporarily ran “sudo service nginx stop”, then ran the above certbox command, using a temporary webserver option, then “sudo service nginx start” to restart Nginx. NGinx had to be stopped since otherwise it is using Port 80, and the temporary server can’t start to runt he certificate verification process.

Another note, I am not sure if the –force-renewal option is needed above. It didn’t throw out any errors and it fixed the issue, so I left it.

The final step was to go to my Domain Registrar and update the name servers and Glue Records to point to the new Server IP. After a short bit of waiting, eventually the mail server URL connected to the admin and web consoles. I did some test send and receive of emails between my server and gmail to verify everything was working properly. One nice bit, the newer MiaB has a different interface for Roundcube webmail, so I could easily tell if I was going to the new or old server.

Once everything was satisfactory, i went back to Digital Ocean and powered down the old server. If everything is still working in a few days, I will destroy the old server, so I don’t have to keep paying upkeep on it. One thing to keep in mind, both the old and new servers require a specific hostname, so they will be named the same, so double check that you are powering down and deleting the correct server. some easy ways to verify are IP address, or server age. The old server is several years old but the new server is several days old.

Basement – Sliding Door Project

So, I’ve been doing a fair number of projects, but writing about them isn’t one of those projects. Some of it has been improving the basement a bit. Part of the slowness of the basement work is because it occasionally floods a bit. Not really “standing in water” flooding, but “there is a puddle that keeps coming” flooding.

It’s annoying, but I’ve been working to fix it. The house originally didn’t have any downspouts on the gutters, I added those. I’ve added extensions to the gutters to direct water away. I added a new downspout near the area where the water seems to come from to help direct it away more. I cut out some drywall in the underside storage area and pulled the bottom step off of the stairs to fill in some ugly crack-ish spots in the area where the water comes from. At this point, I am waiting for more heavy rain to see if some of this has made any real difference. So far the cement fill seems to have done the best. It’s tricky to describe but basically, the water still came in, but it came in waaaay less and in a slightly different place. So I’m getting there.

I’m not really here to discuss the flooding though. It has affected some decisions on how to make the basement nicer, like I am not going to add Drywall walls like I wanted to. And no carpet, though that was out anyway, because the cats are assholes (We also replaced all of the upstairs carpet with vinyl plank flooring).

One fairly simple project was adding a door. In this case, I put in a sliding barn door style door. My wife wanted to put in a real door but I wasn’t keen on that since there isn’t really a good place for it to open to. The door itself had a couple of motivations behind it.

One, the basement is divided into two halves. One half is semi finished and “nicer” and it’s where I keep my computer and collection of stuff and there is a TV and couch with game consoles and my son has a corner that is his bedroom area when he is around. The other half is under the “original house”, it’s rough, the ceilings are a little low, and there is more duct work and such hanging from the ceiling. We use it for storing all sorts of stuff. It’s really great for that.

The “underside” half is ugly though. I wanted the door to be able to block it out, mostly for aesthetic reasons.

The other purpose of the door is to be able to lock the cats in the basement when we have guests over. My parents and my wife’s parents are all allergic to the cats. We lock some of them in bedrooms, we also lock some of them in the small sunroom/office area upstairs. Sometimes we would lock them in the basement by blocking the stairs with a giant cork board we have that doesn’t really have a home.

Now, we can use the door. It slides between the two openings, stairs and underside storage to block off either one.

One concern was air flow from the storage area, so the door can also be positioned in the middle, which is where it usually sits, so air can flow in and out both sides. It also lifts off easily if I needed to remove it.

The door itself isn’t anything complicated. I could have built a door but I opted to just buy one, though the door was pretty pricey since it needed to be extra wide. The roller kit is a low profile barn door kit, easy enough to install and it nestles up into the floor joist ceiling. The tricky part was that the floor joist didn’t reach the edge of the opening, so I had to screw a couple of 2×4 stand offs to the floor joist to get the door to sit int he proper place. This also meant adding some 2×4 lifts under the stand off to support the immense weight of the door.

I also ended up with an issue of the door rolling slightly. I am not sure if it’s the house or if the rail is a little off (probably a little of both) but the door slides towards the stairs on it’s own. Not very quickly, but it does move.

I solved this with magnets, at the suggestion of my uncle. I didn’t really want an ugly latch that would also potentially end up in the way of the door sliding or people walking. I bought some block magnets and some double sided Gorilla tape (I originally used Command Strips but they were too weak). I stuck a larger magnet to the wall, then two smaller magnets on one end and the center of the door. This allows the door to hold it’s position when blocking the stairs or when positioned halfway.

This project isn’t quite done. I may also add an L bracket of some kind in the center of the door, to hold the door from being leaned outwards, and I want to add a roller on the backside to the whole action is smoother. the way things are, if the cats get determined, they can push the door enough to get it to release from the magnet and escape from the basement.

I also need to adjust that network cable because it’s kind of just there and ugly.

Reading for April 2020

So, yeah, I missed a few months. I also didn’t actually finish any books in those two months, so it’s kind of a non issues. I didn’t really finish a ton fo books this month wither, but hey, progress is progress.

Transformers The Manga Volume 1

So, technically this one was a March read. This is the first of (I believe 2) collections of the old Transformers G1 Manga from Japan. It’s honestly, really weird, and kind of awful, but it’s also charming for both of these reasons. The stories are all more or less self contained. They all have this weird Japanese feel to them (because Manga duh), but more the whole, “we can’t decide if this is made for 3 year olds or 12 year olds” thing that seems like it pops up a lot in some Manga, especially older manga. Also, spoilers, but man, the Autobots seemed to get the most motivated when they they were dealing with a poor dog that the Decepticons had abused.

Also, most of the characters on the cover don’t appear int he stories at all.

Kill la Kill Vol 1

Speaking of Manga. I also read the first volume of Kill la Kill. I’ve seen this series come up in a few discussions online and it sounded kind of interesting. It also is part of Comixology Unlimited, which I keep forgetting I have a trial for.

Anyway, it’s a sort of “slice of life” high school manga, where everyone also has battles, based on themes of school, things. At least so far. Like the main chick has this school uniform that gives her extra power, and she fights this dude on the Boxing Team who has special Boxing gloves. It’s alright, for the most part.

Stumptown Vol 1

After enjoying the show Stumptown, I wanted to see how the original comic it was based off of compared. The comic, at least volume 1, had a lot less emphasis on the supporting cast than the show, but it was still decent. It was a bit predictable in it’s plot, but the writing and dialogue is alright. The art style was interesting for what I could see, though it’s all so dark it doesn’t show up super well on my Kindle. The whole thing kind of vaguely reminded me of Gunsmith Cats, which is one of my favorite series. I mean, Dex kind of is a more realistic, western version of Rally I suppose, they both are kind of PI/Bounty Hunters, they both are kind of snarky, they both drive old Mustangs.

Harry Potter and the Sorcerer’s Stone

I have been meaning to re-reread the Harry Potter Series for a bit now, and so I started with the first book. Which is as far as I got LAST time I meant to re-read the series. I really enjoy all the extra detail and bits not in the movies (which I’ve seen a dozen or two times), but I have not read the books in a while, so things are getting a bit hazy, and I could use a refresh. The first book is probably the most boring in this endeavor, since, for the most part, the book and movie are identical. There is an extra Potions based test to retrieve the Sorcerer’s Stone, Neville gets detention and goes to the Forbidden Forrest instead of Ron, Draco challenges Harry to a duel trying to get Harry and crew in trouble, and there is an extra Quidditch Match that is super short. Not much of importance that’s different.

What’s New

I’ve bought too much new to list. I think there was a video game themed StoryBundle, I bought several James Bond books, I’ve picked up quite a few free comics that I have not read yet. Too much to list honestly.

I also started The second Expanse Book. Which I hope to finish by next month.

My Music Listening Habits for April 2020

Well, it finally happened.

After a very long, very strong, 9 month reign as Queen, Sigrid has been dethroned from my top artist for the month. And by a rather huge margin. Funny enough, she has been dethroned by someone she knows, who is also a Norwegian singer, AURORA. It was a one-two punch though, because Sigrid has dropped to number three, not number two, with Tessa Violet sliding in at number two.

I can’t honestly blame the VierLive show entirely for Aurora’s rise here, she has been on sort of a slow bubble for a while now in my listening patterns. It certainly likely helped things along however. I would point to Tessa Violet and say she wasn’t helped by any live shows, but well, that wouldn’t be true. I have not watched all of them but she has been doing two weekly Youtube shows on Youtube. Though those are quite a bit … less structured.

Moving on a bit, Dua Lipa had a new album drop, Future Nostalgia, which is has a pretty nice sort of old school syth-pop feel going on with it. BT has been getting a bit of a resurgence lately, though it’s mostly just listening to These Humble/Hopeful/Whatever Machines again a bit. I can never remember which is which on those albums.

The rest of the top ten isn’t anything particularly exciting or new. The 5×5 is kind of all over the place as well, since I’ve been listening to a lot of random techno music lately so there’s a lot of kooky random stuff on there. The weird thing is, I don’t thing BT is on it either at all, despite being number 4 for the month.

Here is the 5×5 though, for the sake of consistency.

Vi Er Live – Sigrid and Aurora (Somewhere Else, 2020)

Last year when I went to see Sigrid in St. Louis, I told my wife afterwards that I wanted to go to more concerts. That plan clearly isn’t going to pan out to anything with everything going on. What I have done though is watched quite a few virtual concerts. The Somewhere Else Festival (Et Helt Annet Sted) presented at ViErLive.no is actually the fourth live show I’ve watched from Sigrid int he past month. The previous being a bit on the Twitch Steam Aid event, a short show on the IGTV from Levis, and one for the opening of an exhibit in KHÅK Kunsthall, on Facebook.

The Somewhere Else show is the first one that’s had any real production behind it, and it’s the first that had the entire bad. The first two were Sigrid playing Piano alone in her parent’s house, the KHÅK Kunsthall show was Sigrid alone playing piano in the museum. The Vierlive show is also different in that it was a paid event. You could buy a festival pass for 500nok (~$50 USD) or individual shows for 100nok (~$10). Super affordable. Most of the shows also included a VOD replay, though sadly (irritatingly), neither the Sigrid nor the Aurora shows have a replay option. I really hope there is some planned release of these shows as both were really stellar.

Despite not actually being live with Sigrid in person, the virtual show was really enjoyable and well done. For one, I am pretty sure it was all one camera shot (the Aurora show had a couple of cuts to alternate cameras). The sound quality was top notch incredible. Most of he songs had a much different tone and feel from normal as well, which really spiced things up a lot.

The show opened with Sigrid chatting in the chat room before going into Level Up on the couch, then moving to Basic in the room, both songs with only Kristina on backup vocals and Sondre on guitar. Then we follow Sigrid alone up to the main stage where the rest of the band (Kasper, drums and Peder, keyboard) were waiting playing a lead in riff before Sucker Punch. One one point they all went and say in the theater seats to play a nice acoustic Plot Twist. We also got a couple of piano tracks (on a nice grand piano and not the usual keyboard) of Dynamite and Home to You. Probably my favorite part was the rock and roll intro for I Don’t Feel Like Crying, with Sondre going all out on the guitar.

I also really liked how each song (11 total) had it’s own feel and set up for how it was presented. Only Dynamite and Home to You were similar, and that’s mostly just because it was Sigrid doing vocals and piano solo, so there isn’t a lot to mix up there.

Of course, being a virtual concert, it’s kind of hard to take photos, so here’s some screen shots instead.

I kind of was worried that these shows were going to be pretty basic, more Sigrid at her Parent’s Piano doing 3 songs, or some sort of funky out of sync Skype conference between the band members. The name is Sigrid, but frankly, I like Sigrid with her band more than I do just Sigrid. They all just mesh so well together. Part of what I really liked about this show was that on some level it amounts to a Studio Quality performance by the band. I am pretty sure a lot of Sigrid’s tracks on the album, don’t involve the band, but more synth. Not all of them, but most of them. I could be totally wrong. I like the live concert videos more than the regular tracks, but you often end up with dodgy audio on concert videos. This show is the best of both, and it was so well produced.

After how impressive the Sigrid Show was, I opted for also watching the Aurora show. I know a lot less about Aurora’s music than Sigrid, but I do like the tracks I’ve been listening to. And I’ve been listening to more and more of them over time. Aurora is arguably more popular than Sigrid though, I mean, she was part of a major Disney Movie (Frozen 2) so that alone kind of pushes her higher.

The point is more, I had less idea of what I was going to be seeing with Aurora. I was a bit disappointed initially, the first three tracks were Aurora singing and dancing in front of the white curtain (below). While it was good, I was a bit disappointed that there was less overall change of scenery between tracks like with Sigrid. A few tracks in that changed.

I can’t tell you all of the songs in this set, but around A Different Kind of Human, she started to move off the stage and a lot more visual effects started to kick in. Unlike Sigrid’s show, Aurora’s band (not sure if it’s her band or a band), was behind the scenes and off camera until the end of the show. There was a real band though. You could see their shadows behind the white curtain and like I mentioned, they showed up at the end for a brief introduction.

The biggest stand out of the performance from Aurora was the level of energy and raw emotion she puts into her music, Especially as the show reached it’s climax with Running with the Wolves. It’s also a crazy level of contrast with when she speaks and her overall small stature. The few times she talks to the camera it’s extremely soft and timid, she almost seems kind of afraid of it. But when performing, she’s something else entirely. She is the Queen of Warriors & Weirdos after all.

Overall the whole experience was well worth it for both shows. The main issue I had was less with Vierlive and more than neither show had a replay option, at the request of the music label. Maybe its something they plan to release later again in some form, but it really feels like kind of a waste of creative effort. Most of the other shows had a VOD option, tough a few others are also now unavailable. There also was a bit of a lack of communication by Vierlive until the last minute if shows would even have VOD options. It feels like there should at least be a 24 hour period or something, most of the shows didn’t happen at a time I could easily watch due to work, and other people mentioned having bandwidth issues. It just seems like it would have been the polite thing to do, even limited, this was a paid event after all.