Exploring Microsoft Azure Portal: Setting Up GitLab Runner and Poste.io Mail Server with Amazon SES for SMTP

Introduction

In today’s cloud-driven world, managing infrastructure with services like Microsoft Azure and AWS has become a vital part of software development and deployment. In this post, I’ll walk you through my recent experience exploring Microsoft Azure, where I set up a Virtual Machine (VM) to host GitLab Runner for continuous integration and Poste.io as a mail server. However, I encountered a common issue — outbound port 25 was blocked, which is essential for sending email via SMTP. To overcome this, I integrated Amazon Simple Email Service (SES) to handle outbound mail.

This blog post details how I set up these services and how Amazon SES solved the port 25 block issue on cloud infrastructure, providing a seamless email-sending solution.


Step 1: Exploring Microsoft Azure and Creating a Virtual Machine

The first step in the process was to create a Virtual Machine (VM) on Microsoft Azure, which would serve as the host for both GitLab Runner and the Poste.io mail server.

Why Azure?
Azure’s cloud platform offers powerful resources, scalability, and a wide range of services. Its Virtual Machines are versatile and support various operating systems, making it perfect for my needs.

Here’s a quick rundown of how I created the VM:

  1. Access the Azure Portal:
    • Go to the Azure Portal and log in with your credentials.
    • From the dashboard, select Virtual Machines in the side menu and click Create.
  2. Configuring the VM:
    • Choose an operating system (I used Ubuntu 20.04 for its stability and support).
    • Select the appropriate size for your VM based on your workload. I went with a Standard B2s VM, which offers 2 vCPUs and 4 GB of RAM — enough for GitLab Runner and Poste.io.
  3. Networking:
    • When setting up the VM’s networking options, ensure that you configure inbound rules for ports such as HTTP (80), HTTPS (443), and SMTP (587) for mail communication.
    • Once done, click Review + Create and then click Create to spin up your VM.
  4. Access the VM via SSH:
    • Once the VM is created, you’ll be given a public IP address. Use SSH to access your new VM:

      ssh <your-username>@<your-vm-ip-address>


Step 2: Setting Up GitLab Runner on Azure VM

With the VM ready, I proceeded to set up GitLab Runner — a key component for running CI/CD pipelines on GitLab.

  1. Install GitLab Runner: SSH into your VM and run the following commands to install GitLab Runner:

    curl -L –output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64
    chmod +x /usr/local/bin/gitlab-runner
    gitlab-runner install
    gitlab-runner start


Step 3: Setting Up Poste.io as a Mail Server

Next, I turned my attention to setting up the mail server. For this task, I chose Poste.io, a fully-featured mail server that’s easy to install and configure.

  1. Installing Docker: Poste.io runs within a Docker container, so the first step is to install Docker on your VM:

    sudo apt-get update
    sudo apt-get install docker.io

  2. Setting Up Poste.io: With Docker installed, you can now set up the Poste.io mail server. Simply run the following command to pull the Poste.io Docker image and start the container:

    sudo docker run -d \
    –name “poste” \
    –restart=always \
    -p 25:25 -p 80:80 -p 443:443 -p 587:587 -p 110:110 -p 995:995 -p 143:143 -p 993:993 \
    -v /your-data-folder:/data \
    analogic/poste.io

    This will expose the necessary ports and mount the data folder for persistence. You can access the Poste.io admin interface by visiting the VM’s public IP address in a browser.

  3. Initial Configuration: Upon visiting your server’s IP in a browser, you’ll be prompted to configure the domain, admin account, and other initial settings. Once set up, you can start managing email accounts, domains, and mail queues directly through the Poste.io dashboard.

Step 4: Overcoming the Port 25 Block with Amazon SES for Outbound Mail

At this point, I ran into a common issue: Azure (and most cloud providers) block outbound traffic on port 25, the default port used for sending SMTP email. This meant my Poste.io server could not send outgoing mail.

The solution? Amazon Simple Email Service (SES) — a reliable, scalable service that bypasses port 25 restrictions and allows your server to send outbound emails.

Setting Up Amazon SES

  1. Log into the AWS Console: Head to the Amazon SES Console and create an SES account if you don’t have one already.
  2. Verify Your Domain:
    • Navigate to Domains under the SES dashboard.
    • Click Verify a New Domain and follow the steps to verify your domain. This may involve adding DNS records provided by SES to your domain’s DNS settings.
  3. Create SMTP Credentials:
    • In the SES console, under SMTP Settings, generate SMTP credentials (Amazon will provide a username and password).
    • Make note of the SMTP server endpoint (e.g., email-smtp.us-east-1.amazonaws.com) and the credentials.

Configuring Poste.io to Use Amazon SES

Now, you need to configure Poste.io to use Amazon SES as the SMTP route for outbound emails.

  1. Modify Default SMTP Route (used by Poste.io): Change target SMTP server hostname Amazon SES SMTP hostname together with the SMTP username and password,

At this point, your Poste.io mail server is configured to send emails through Amazon SES, circumventing the port 25 block.


Step 5: Conclusion

Setting up a Virtual Machine on Microsoft Azure to run GitLab Runner and Poste.io for mail services is a powerful combination for managing your CI/CD workflows and email communication. However, the outbound port 25 block on most cloud providers can be a major hurdle for email delivery.

By integrating Amazon SES with Poste.io, I was able to successfully configure SMTP services, ensuring reliable outbound mail delivery. This solution not only bypasses cloud provider restrictions but also offers a scalable and cost-effective way to manage email sending.

If you’re facing similar challenges in your own cloud-based mail server setups, I highly recommend looking into Amazon SES for your email-sending needs. It’s a robust and dependable solution to keep your communication flowing smoothly!


Have you set up similar cloud-based systems or dealt with SMTP restrictions? Share your experiences in the comments below!

Migrating to AWS Malaysia Region: From Linux to Windows/IIS with Free SSL from ACM

For the past few weekends, I’ve been busy migrating my website and WordPress blog from my previous hosting provider to the newly launched AWS Malaysia Region. Initially, my plan was to set everything up using the classic Linux/Apache stack, but after evaluating my project requirements (And my expertise in IIS 😅), I decided to go with Windows/IIS instead. This decision was largely based on familiarity, support, and ease of use for what I had in mind.

After a few challenges, I was able to complete the migration seamlessly, and to top it off, I secured everything using the AWS Certificate Manager (ACM) which provided me with a free SSL certificate! In this post, I’ll walk you through some of the steps I took to make this migration successful, and provide some extra instructions for those of you planning to run PHP and Laravel on IIS. Let’s dive in!

Migrating to AWS Malaysia Region

AWS recently launched its Infrastructure Region in Malaysia, offering improved latency and performance for those of us working out of Southeast Asia. The timing couldn’t have been better for my migration.

Here’s a quick rundown of the migration process:

  1. Setting up an EC2 Instance: I spun up a Windows Server EC2 instance using AWS Elastic Compute Cloud (EC2). AWS made it easy to select the region closest to me—AWS Malaysia Region—and launch a server instance that met my performance needs.
  2. Installing IIS: Once my Windows Server instance was up and running, I installed IIS (Internet Information Services) using the Server Manager.
  3. Migrating WordPress: I moved my WordPress site from my old host to AWS manually by copy the directory and export the SQL.
  4. Setting Up SSL with ACM: Security is always a top priority, and I took advantage of AWS Certificate Manager (ACM) to get a free SSL certificate for my domain. ACM automates the provisioning and renewal of SSL/TLS certificates, ensuring my website is secure without the need for manual intervention.

Everything was running perfectly—until I realized I also needed to host a Laravel application on this server.

Enabling PHP in IIS for Laravel

If you’re planning to run PHP-based applications like Laravel on IIS, there are some additional steps you’ll need to follow. Here’s a step-by-step guide to get PHP up and running on IIS, and ensure that Laravel works without issues:

1. Install PHP on Windows/IIS

First, you’ll need to install PHP on your IIS server.

  • Download the PHP Windows Installer and choose the latest non-thread-safe version for your system.
  • Extract the files to a directory, e.g., C:\php.
  • Open IIS Manager, navigate to your server node, and click on Handler Mappings.
  • Add a new Module Mapping with the following details:
    • Request Path: *.php
    • Module: FastCgiModule
    • Executable: C:\php\php-cgi.exe (or wherever you extracted PHP)
    • Name: PHP
  • Once done, restart IIS.

2. Install FastCGI

To enable IIS to process PHP files, you’ll need to install FastCGI support.

  • In Server Manager, click on Add Roles and Features.
  • Navigate to Web Server (IIS) > Web Server > Application Development, and select CGI.
  • Install FastCGI.

3. Configure PHP with IIS

You need to tell IIS where to find the PHP installation. Here’s how:

  • Open your php.ini file (located in your PHP installation directory) and modify the following settings for Laravel:
    • max_execution_time = 300 (or more depending on your needs)
    • memory_limit = 512M
    • post_max_size = 100M
    • upload_max_filesize = 100M
    • extension_dir = "ext" (adjust this to your actual PHP extension directory)
  • Enable required extensions for Laravel:
    • Uncomment the following lines in php.ini:
      extension=curl
      extension=mbstring
      extension=fileinfo
      extension=openssl

4. Install Composer

Now that PHP is up and running on IIS, the next step is to install Composer and Laravel.

  • Download and install Composer.
  • Next, configure IIS to serve Laravel application.

5. URL Rewrite Module for IIS

Laravel requires the URL Rewrite Module to work correctly with IIS.

  • Download and install the URL Rewrite Module for IIS.
  • Add the following rewrite rules to your site’s web.config file located in the Laravel root directory:
    <configuration>
    <system.webServer>
    <rewrite>
    <rules>
    <rule name="Laravel" stopProcessing="true">
    <match url=".*" />
    <conditions logicalGrouping="MatchAll">
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Rewrite" url="index.php" />
    </rule>
    </rules>
    </rewrite>
    </system.webServer>
    </configuration>

6. Database Setup

  • Install MySQL and set up your database.
  • Update the .env file in your Laravel app with the correct database credentials:
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=your_database
    DB_USERNAME=your_username
    DB_PASSWORD=your_password

After following these steps, Laravel app should be fully functional on IIS!

Wrapping Up

Migrating my website, WordPress blog, and Laravel app to AWS Malaysia Region using Windows/IIS turned out to be a rewarding experience. By enabling PHP and configuring the necessary components, I’ve ensured my applications run smoothly and securely in the cloud. Thanks to AWS’s robust infrastructure and ACM’s free SSL certificates, I’m confident my setup will handle future growth and challenges with ease.

If you’re planning to do the same or have any questions, feel free to reach out. I’m more than happy to help!


Key AWS Services Used:

  • EC2 for hosting the Windows/IIS server.
  • ACM (AWS Certificate Manager) for free SSL certificates.

Exploring AWS free tier and expanding my tech knowledge has been a blast, and I highly recommend it to anyone looking to dive into cloud computing. It’s empowering to manage your own cloud infrastructure, and AWS offers great flexibility, whether you’re using Linux or Windows!

Have you tried AWS for your hosting needs? Let me know your thoughts and experiences!

Story of Poco & Coco

I saw 2 turtles abandoned inside a filthy cage at my building lobby for consecutive 2 days.
Took them in, wash and feed them.
Both of them are red-eared slider or red-eared terrapin (Trachemys scripta elegans) is a semiaquatic turtle belonging to the family Emydidae. (I think based on the red-eared)
I bought a new tank and ordered a few extra stuff in Shopee.
Kinda test and fail on the water filter and turtle tank.

However, unfortunate incident happened and Coco have left us.

Poco & Coco in Aquarium 1

Poco & Coco in Aquarium 2

This post to commemorate Coco (The tiny one).
We will miss you 😢

Published
Categorized as Life Tagged

How I Got into Salesforce

This article has been sitting in my drafts for some time.
I believe it was the first draft I ever wrote, but for some reason I’ve never published it.

How did I get involved in Salesforce

Short answer: my new job in Dell Technologies.

Long answer: I have been Software Engineer (And even become Team Lead) for sometimes and mainly using C# programming language for development. It is a good job, not overly hard and its easy to see what you have accomplished at the end of the day.

Then, I have been recruited by Talent Acquisition from Dell Technologies in LinkedIn. Long story short, I go for the interview and getting hired for the Senior Software Engineer.

During the interview, I being informed about Salesforce and the Apex class that being used in Salesforce is similar to C# language.
I instantly Googled Salesforce, created a Trailhead account, and became fixated on finding solutions to every Salesforce-related issue I had ever come across.
I became aware of how much fun I was having combining my two passions for technology and business to find solutions.

As a result, I decided to study everything I could about Salesforce.

This led me to learn as much as I could about Salesforce and I am now Salesforce Certified Associate. Now I spend as much time as I can studying Salesforce, working on certificates, building solutions in my dev org and documenting what I have learned.

Dell Technologies’ Awesome Employee Benefits!

I stumbled 1 blog about Digi Telco company benefit for the employee. (I unable to find back the link)
As one of the multinational technology company employee myself, I would like to write some of the benefit working in Dell Technologies. (Today also my 1-year work anniversary at Dell Technologies)

Benefit 1: Working environment

Dell Cyberjaya

Basically, I work in Dell Cyberjaya and have the luxury of remote work.
Dell Cyberjaya compound was big and very spacious.
Inside there is cafeteria, gaming room, gym and personally, I love the workstation.
The workstation come with height-adjustable table, dual monitor setup with keyboard and mouse (Basically I just bring my laptop, don’t even need to bring power adapter).

Dell Cyberjaya Workstation

Benefit 2: Insurance and Medical coverage

Dell AIA Employee benefit

This benefit I believe most of the company will provide.
However, Dell employee provide extra with medical card, flexible benefit and for those with family, it also cover spouse and kids plus higher claimable amount.

Benefit 3: Extra Public Holiday & Annual leaves

If public holiday fall on Saturday & Sunday, there will be replacement on Monday.
Regarding Annual leaves, it depend on the job grade level and year of service which can go up to 20 / 25 days per calendar year.


Benefit 4: Performance Bonus

13th month salary and annual performance bonus.

Money picture

Benefit 5: Free Learning Courses

Dell Digital Udemy

Company provide a lot of training and free online courses for the employee.
Such as Udemy and LinkedIn Leaning. (All this is paid courses, however Dell provide a business account for the employee to access the courses for free)

Beside all of this, there are few more benefit such as flexible working hours, Free FoodPanda PandaPro subscription, freebies, goodies & a lot of exciting event held virtually and on-site.
The flexible working hours that allows me to arrange my own time to complete the task on time and supports & advices from colleagues that are always available to guide and assist me when I face obstacles in my tasks.
The working environment is friendly and I am free to voice out my problems openly to my colleagues or management.

Published
Categorized as Life

Facebook Monetization Policy

Facebook Monetization Policy

My Facebook page got the issue last year and I did nothing about it at that time.
This year I research about this and try out the solution which is enroll in Level Up program as Gaming Video Creator.

Facebook LEVEL UP

However, the policy issue still there as you can seen below.

Facebook Monetization Policy

Please bear in mind that all my content are original with my face, outlook and my signature on it.
However, Facebook deem all this as not original. 😭
Hence, I am giving up Facebook as one of the platform to earn extra money.

Published
Categorized as Life

atome

atome About Us Website

Few weeks back, I bought Manchester United 22/23 Home Kit from Al-Ikhsan Sports using Atome.

atome is a BNPL (Buy Now Pay Later) application that is available I think at the moment only in Malaysia.
There was quite a lot of places support this application either online or physical stores.

You can choose the repayment period of minimum 3 months to 6 or 12-months payment plan. (The minimum payment amount is RM 10)
However, you could proceed with early settlement after 2 weeks after 1st payment.

As usual, only buy what you can afford.
Shopping can be fun and responsible when you buy only what you need and can afford to pay back.

Published
Categorized as Life Tagged

Nike Go FlyEase

Nike Go FlyEase Shoes

Nike has been subtly revolutionizing the way we wear shoes.

I believe this shoes is not available in physical stores in Malaysia.
I search in Sunway and KLCC branch but yet to find it.
So, I order it thru Nike website.
It take less than 1 week to reach. (I ordered it on 28th August and reach 1st September)

Nike Go FlyEase Shoes

Here comes Nike GO FlyEase.
First unveiled in February, this is really very convenient (which is why I bought this in the 1st place) due to there isn’t a need to tie any laces because they include a hinge that allows them to bend in half.
Simply stepping inside the shoes causes them to enclose your feet.
You stand on the heel of your foot and raise your foot out to remove them.

Nike Go FlyEase Shoes

The FlyEase mechanism on the Go FlyEase has amazed me.
It performs admirably.
I found it to be simple and put them on without any difficulty the first time.

Nike Go FlyEase Shoes

Published
Categorized as Life Tagged

Manchester United 2022-2023 Home Kit

Me wearing Manchester United 22/23 Home Jersey

I just bought Manchester United’s new 2022-2023 home kit from Al-Ikhsan Sports.
It is made by Adidas and will be worn in the Premier League 2022 – 2023 campaign.

The front of Manchester United 22/23 Home Jersey

To explore the design of the kit further, Inigo Turner, Design Director at Adidas said:
The polo collar is synonymous with Manchester United. Turned up or folded down, it has played a starring role in many of the club’s biggest moments. With such a rich history, we wanted to pay homage to some of the club’s most legendary kits and players.

Collar and 3 stripes

The Adidas Manchester United 2022-2023 home kit combines a rather dark red main color with a white Adidas logo and black Three Stripes.

The “triangle” design can be seen on the collar

What makes the kit special is the Polo collar. The white collar comes with a 1994-inspired triangular design.

Manchester United logo with sheild

The Manchester United 22-23 home kit features a shield on which the Manchester United logo is placed.
The shield has a pentagon shape with a slightly darker tone of red than the rest of the shirt and outlined by a thin border to separate the shape.

A shield for the crest is nothing new for Manchester United