Articles
Email Strife
Struggling with Email
"Email should be abolished," said one former colleague. "Email is antiquated" said another. This is what I have done regarding email for Timterests, followed by a rant of what email has put me through historically and the pitfalls that should be avoided. Setting up email for me has never been a simple task. Sure I could have gone and created timterests@gmail.com (if only it was available), but that's not what I wanted. I wanted my name (timscott/tim.scott) at gmail, or at least have the domain after the symbol. Initially, I wanted to have an email with my domain, and therefore put in any name that I wanted. I would be willing to check a new mailbox if I could have had that done. I also didn't want to pay money for it, or at least a one time fee, similar to how Gmail is free. AWS Simple Email Service (SES) I tried, I did. The receiving emails portion for this was weak. There was one page for receiving, and ten pages for sending emails. The sending out as a service would have been nice as I could have had automatic follow-up email when an email was received. I even got this working, but the juice was not worth the squeeze. There were only ways you can receive email through this. - The first is by storing in a S3 bucket as the entire email (metadata and all) which could then be managed and sent elsewhere. To send the email anywhere from that S3 bucket, a lambda function would have needed to be created. - Alternatively you can forward this to SNS (Simple Notification Service). I would not only not get the email, as an email but a text, but I would be paying for two services and not just one. Email Rerouting via Squarespace. Firstly I knew that some hosting providers added email with your domain in the address, Squarespace doesn't, but they do have email rerouting. Close enough. I got the email "address" I wanted: timscott@timterests.com. However if a bot starts spamming the email address, it's in Google's hands to move it to spam. Also on the note of spam, once it was set up, I immediately noticed all email going to that address was spam. It turns out. The plus side is now it's in an email account that can receive any message and in a place that I can read it. About me and my previous engagements with Email. Email for the work I have done has been a curse. I have dealt with the conflicts of trying to send email from LAMP stacks to Google and Yahoo addresses from Postfix. For those who don't know, Postfix is a mail transfer agent that is an alternative to sendmail. I historically and inherently used Postfix to relay localhost email to an Office365 mail server. The way I received the configuration was very rough and insecure since they sometimes didn't even use TLS and ran on port 25. Once updating the configuration with TLS, the system was set up as an authenticated email "no-reply" to send out as. Then the next problem to deal with, the systems sending email out sometimes were sent as fake emails that simulated email groups, not emails managed by the Office365 tenant. These emails would then begin to bounce since it could not be found by the email tenant. The next step would be to ensure that only emails that existed would be used for all outbound mail from our software and systems. Once that migration occurred, email was no longer "External" as well as Gmail and Yahoo played ball. However, the problems continued. Every email would have the system's email address, and a "on behalf of" followed by the email group you attempted to send as. Then there has been a more recent issue. Rate limits. Email providers have rate limits to ensure that you're not blasting out emails en masse. However, sometimes it's useful to send corporate wide emails to all employees. Email groups for all employees would be a quick and easy single send out, however if you want a personalized email per person, this will not work. As a result, I have also witnessed company wide email campaigns taking over an hour to reach all employees, being held up in the queue of the email server. Times email actually worked. Times that I have had to struggle the least with email was with SendGrid. I have had to migrate systems to SendGrid and it was always so seamless to me outside of proving that we were not a promotional campaign and not going to show up on a block list. This usually only takes 24 hours and a form filled out. Once verified, with just a host and key, emails would send out no problem. That is the end of the times I haven't fought with email. Conclusion Email sucks. The End.
2025-01-26
Email
Linux
PHP
The First Week, A Retrospective.
This was much more than just Golang.
Up to this point, everything that needed to be done architecturally for this site has been completed. - Project directory and file layout - How to handle styles - AWS Deployment - SSL Setup - Github Pipeline I aggressively went through all of these topics and didn’t give too much thought to any of them as I went through, agnostically learning as much as I could. As a little background, every piece of this site was something new for me. This is my first time getting a domain, using a web host, AWS, Golang, TailwindCSS, Github actions and projects, etc. Since I went so fast and aggressive at getting all the pieces in place, here are some of the pitfalls that I hit, and interesting (maybe) stories I have to tell. AWS Fargate in ECS. Let me start with the largest pitfall I had. AWS Fargate, although is great, was just not what I needed for this project. The project is built into a Docker container, which was perfect for AWS Fargate. What is not perfect with AWS Fargate is a budget and static IPs. Each “deployment” was a task, and each task had its own IP. Running anything in the backend as some bash task, that’s great… having to go to Squarespace to change the A record every update… not so much. There was a solution, however, set up a load balancer, and attach the ECS container to it, for 5 cents an hour, or somewhere in the $30 range a month. This was not an option for me. SSL using LetsEncrypt. This had me for hours. I had the strangest rig for getting this to work in AWS Fargate. Here is the list of things I had to do to get this working. - My docker container installed all the lets encrypt libraries, increasing the image size from 11MB to 45MB. - Environment variables for SSL file paths - Bash script as the start script of a Go project to run letsencrypt - NS records for the _acme_challenge. It was interesting, to say the least. Templ I am still trying to find out if I hate this or not. The concept is interesting, but I soon found out the recommendations I have heard are from those who have a great understanding of Golang already. As I mentioned, I have rushed the development up to this point, so I didn’t do a deep dive into the documentation yet. But outside of the documentation, the support for this is lacking and its name is so similar to the template, that every Google search just tries to tell me about Golang Templates. The extension for VS code is also not the most flushed out and sometimes seems to conflict with Golang’s official extension. I even resorted to turning to ChatGPT and its understanding of Templ was murky as well. Maybe in the not-too-near future, I will convert everything to native Golang and see how it goes. I still need to get my NeoVim LSPs installed for Golang as well. Tailwindcss I have heard a lot of praise from this. I was not unfamiliar as I have witnessed libraries like Bootstrap or FontAwesome and their use of classes. The problem I soon learned was I was not working on a node project. Without Node installed in the project, my ability to install Tailwind came into question. Luckily, they had a standalone CLI, which is great and all, but I still don’t know where to put the binary. Maybe I will find out, but for now, I have it hiding away in a .gitingore’d folder called utils. This took a decent chunk of my README to explain and for any future replicators, or myself replicating on another machine in 3 weeks. AWS Lightsail This is when things started to come together. I moved everything from AWS Fargate to AWS Lightsail. The nano was not powerful enough to even launch, so I went with the micro. SSL came built-in essentially, so that was a quick hookup. The configuration of this was simple enough, although not as much customization as I would like. Getting the exact right command to push up the image, get the new image name, and then deploying the new image was 32 lines, 4 hours, and 16 force-pushed commits of my life I am never getting back. But now finally, when I perform a pull request, the code finally deploys. Github Actions and project. This was probably the least out of the ordinary, but was an interesting perspective of alternative. I historically have used Azure DevOps the most followed by Jira. The projects is nothing compared to either of those, and the pipelines in Azure are much better flushed out from what I have seen. However, I will say this is the perfect amount of simplicity that I needed for this project. Lightsail Database and RDS So expensive. $15 a month for a blog that doesn’t have ads? Not worth it. I was originally going to use SQLite built into the container, but I realized before I began that if I push changes to the AWS, the container that maintains the SQLite file would be overwritten. I also didn’t want all of the content in the public repo, so I resorted to using the Lightsail storage bucket for $1 a month, and free for 12 months. I will just upload articles to that and present whatever is available in the articles and projects directories.
2025-01-01
Golang
TailwindCSS
AWS
Github
First Blog post using Golang.
Happy New Year and 20 more years.
Hello! My name is Tim and this is my first blog post. I don’t expect anyone to read this or follow along too much, but I wanted to keep this as a repository of topics I found interesting. This blog was highly influenced by https://github.com/eliben/code-for-blog which has content going back to 2005. I found that blog as a fork of a developer who wrote a database obfuscation/masking tool that I was investigating the usefulness of. To look back at this time after 20 years of posts like that blog would be very reminiscing, and seems like a great idea and investment. I have been programming in either college or through work for over 7 years now and there are so many topics that have changed or I have forgotten that I want to be able to look back to. For example, a college web development book based on PHP 5.3, phpMyAdmin, and Notepad++ dated 2011. Or the C++ 11 material I have learned and completely forgotten by this point. I can remember the data structures, pointers, references and so on, but it’s been years since I have touched it. Maybe one of these posts will be a deep dive into header files because they are still an anomaly to me. Then there are the more obscure languages that rarely see the light of day outside of an educational institution or some niche including APL, Fortran 66, and assembly. I am sure there are lessons to be learned from these languages that I would have written here that are being lost to time. As of today, my interests are widespread. I am interested in the popular like Typescript, React, and Python, for the support, libraries, and community. I am interested in the hyped like Go and Rust to see what makes a language develop such a fanbase (also why I am writing this in Go). I want to return to game development using either Unity or Unreal to create enjoyment. And lastly, build upon the practical like NeoVim or GitHub. I am not sure what the future articles will entail, but I look forward to looking back.
2024-12-27
Golang
Blog