CategoriesEmail Marketing

Postal Setup 2021 Guide. (RabbitMQ and ERLANG issues fixed)

Run all the below commands successfully to get a running Postal server. Ensure you are replacing yourdomain.com with the actual domain name you intend to use.

This document only applies to ubuntu 18.04 (try at your own risk for other versions)

The 2021 method for postal installation needs to use Docker on The VPS.

Steps:

1.Set up the repository

sudo apt-get update

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

2. Add Docker’s official GPG key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

3. Use the following command to set up the stable repository

echo \
  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

4. Install Docker Engine.

 sudo apt-get update
 sudo apt-get install docker-ce docker-ce-cli containerd.io

5.  install Docker

 apt-cache madison docker-ce

6. Verify Docker is running on the server.

sudo docker run hello-world

7. Install Docker Compose (This command will fetch the latest stable version)

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

8. Apply executable permissions

sudo chmod +x /usr/local/bin/docker-compose

9. Check if installed successfully or not.

docker-compose --version

10. Proceed to Clone Git.

git clone https://postalserver.io/start/install /opt/postal/install
sudo ln -s /opt/postal/install/bin/postal /usr/bin/postal 

11. Install Maria DB

docker run -d \
   --name postal-mariadb \
   -p 127.0.0.1:3306:3306 \
   --restart always \
   -e MARIADB_DATABASE=postal \
   -e MARIADB_ROOT_PASSWORD=postal \
   mariadb

12. Install Rabbit MQ.

docker run -d \
   --name postal-rabbitmq \
   -p 127.0.0.1:5672:5672 \
   --restart always \
   -e RABBITMQ_DEFAULT_USER=postal \
   -e RABBITMQ_DEFAULT_PASS=postal \
   -e RABBITMQ_DEFAULT_VHOST=postal \
   rabbitmq:3.8

13. Once all of the above three steps done. Issue command

sudo apt-get install jq
postal bootstrap postal.yourdomain.com  -- Change yourdomain.com to your actual domain. 

14. Once issued, Proceed to edit the postal.yml file.

nano /opt/postal/config/postal.yml

15. Replace postal.example.com with your postal.domain.com 

16. Initialize Database

postal initialize
postal make-user

Create user with email and password detail.

17. Start Postal

postal start

18. Install Caddy.

docker run -d \
   --name postal-caddy \
   --restart always \
   --network host \
   -v /opt/postal/config/Caddyfile:/etc/caddy/Caddyfile \
   -v /opt/postal/caddy-data:/data \
   caddy

19. Login to postal UI using the postal username and password generated on Step16.

20. Build organization -Mailserver

21. Go to Domain and setup – your domain DKIM/SPF etc.

22. Configure Routes and tracking domains.

A Records

Hostname Type Value
postal.example.com A 192.168.1.3
postal.example.com AAAA 2a00:1234:abcd:1::3

SPF Record

You can configure a global SPF record for your mail server which means domains don’t need to each individually reference your server IPs. This allows you to make changes in the future.

Hostname Type Value
spf.postal.example.com TXT v=spf1 ip4:192.168.1.3/24 ip6:2a00:1234:abcd:1::3/128 ~all

Return Path

The return path domain is the default domain that is used as the MAIL FROM for all messages sent through a mail server. You should add DNS records as below.

Hostname Type Value
rp.postal.example.com A 192.168.1.3
rp.postal.example.com AAAA 2a00:1234:abcd:1::3
rp.postal.example.com A 192.168.1.3
rp.postal.example.com TXT v=spf1 a mx include:spf.postal.example.com ~all
rp.postal.example.com TXT Value from postal default-dkim-record

Route domain

If you wish to receive incoming e-mail by forwarding messages directly to routes in Postal, you’ll need to configure a domain for this just to point to your server using an MX record.

Hostname Type Value
routes.postal.example.com MX 10 postal.example.com

Your postal.yml file should look like this below.

dns:
  mx_records:
    - postal.example.com
  smtp_server_hostname: postal.example.com
  track_domain: postal.example.com
  spf_include: spf.postal.example.com
  return_path: rp.postal.example.com
  route_domain: routes.postal.example.com

If you want to use IP pools.

general:
  use_ip_pools: true

If you want to use spam assassin to check incoming emails you can install Spam Assassin.

sudo apt install spamassassin
sudo systemctl restart spamassassin

Go to postal.yml and then type in

spamd:
  enabled: true
  host: 127.0.0.1
  port: 783

Do a postal restart for it to take effect

postal stop
postal start
CategoriesEmail MarketingMautic

Mautic on Shared hosting – Complete setup guide 2021

Mautic on Shared Hosting – It’s a bad idea.

Hey, Since, you are on my article, I assume you might already have planned to install Mautic on a Shared Host. Well Just to let you know- It is really a bad idea. But there can be situations where you need to be working on a shared host and do not want to own a VPS. Well, you are at the right place. In this article, I will guide you about a few things that you must know before going ahead and installing Mautic on your favorite Shared Host.

If you do not already know how to install Mautic on a shared host. Follow this article completely so I can guide you do it hassle free.

Assuming you already own a domain/subdomain name. The First Step is to go and prepare your Host where you will be installing Mautic. I will take the example of Hostinger.com here as I already have their hosting plan with me. If you do not yet have a hosting plan, I would suggest you go with Hostinger, they have been fair with me so far and I’ve 5 years hosting plan with them.

Get Hosting from Hostinger

If you are not a fan of Hostinger, my next suggestion will be Namecheap because they are awesome when it comes to support, and their servers are pretty beefed up. This blog itself runs on Namecheap.

Get Hosting from Namecheap

Download Mautic :

Alright, we are ready to get started now. Let us go ahead and prep our cPanel. We will go ahead and download Mautic to download Mautic 3.2.5 in one step you can click here or go to https://mautic.org/download. (You will need to submit your email and your role with the Organization before you can download from the official link)

Install Mautic on cPanel:

Now we have the Mautic software downloaded, lets upload it to our domain or subdomain. In my case, I am using a subdomain. You do not need to name the subdomain mautic.domain.com you can have something like mail.domain.com or em.domain.com or anything for that matter.

Once we go ahead and upload our software, it is time to unzip the software and ensure permissions on all the folders are intact. The folder permissions inside Mautic will always be 755 and the file permissions needs to be in 644. Once you have checked the permission. Its time to go ahead and create a database where Mautic will store the Data.

When it comes to Database, you can easily create one by opening your cPanel and following the wizard provided. Keep a note of the Database Name, Database username and Database Password.

Once we have created the Database, it is time to go ahead and open the URL in a browser. My case its em.biswajitpradhan.com. Once you click open you would see something like the below attached image.

You will need to then follow the wizard. You might come across some warnings like the below messages, the message itself is clear about what is missing on the installation. Follow accordingly. Once you have followed it, hit the refresh button. You should see the Warning/Error message gone. Kindly note if you are on a Shared Hosting plan.

There are high chances the warning for PHP Memory will stay. Hit next to go to the next step where it asks you about the Database the script should be using. Once you enter the Database name, Database Username and password, the script moves to the next step, where it asks you about the Email Credentials and whether you should be queuing your emails. Follow the steps as needed from the below screen recording. Once done You should be brought back to login page of Mautic, where you will need to enter your admin username and password to be able to login.

Once you have logged in, check the email configuration settings and then we will go by setting our cron jobs to ensure Mautic works as intended.

Please note here: Due to the nature of Shared hosting. Running continuous crons might not be permitted by your host and your host might limit you crons. You will need to ensure you give your application enough time for that matter. Crons cannot be set to continuously get executed every minute and so. Ensure you have enough time intervals placed in between your crons.

Cron Setup:

Setting up Crons with Shared hosting can be tricky but rest assured its not the case with Mautic. Setting up Crons is easy with Mautic. You will need to find the public html directory of your Mautic Installation. You will need to go to the below page.

Look for the below Directory

Once you have the path to the cache directory Everything else is a piece of cake. Follow the steps below to setup crons.

Go to Your cPanel and type in CRON. You should see the cronjob panel now.

You will need to setup correct Path and settings using the CRON panel on your CPANEL and set the frequency of the CRON Jobs. Once done you can hit save and then go back to your Mautic instance.

This is what it will look like:

Other Crons that you can install.

Here is a list of Cron Jobs you might need as per your need.

bin/console mautic:segments:updatebin/console mautic:campaigns:updatebin/console mautic:emails:sendbin/console mautic:email:fetchbin/console mautic:campaigns:triggerbin/console mautic:importbin/console mautic:broadcasts:sendbin/console mautic:integration:fetchleadsbin/console mautic:integration:synccontactsbin/console mautic:webhooks:processbin/console cache:clear

You now should be able to login to your console and send out emails. I would love to hear from you if you were successful in setting up Mautic with your shared hosting provider.

CategoriesBigFix

Bigfix and its Role in today’s Computing.

Bigfix and its Role in today’s Computing:

BigFix is a multi-layered platform that is an important part of IT infrastructure as it manages security and gives speedy solutions for compliance and endpoint security. Every company needs to secure its data. If any vulnerable points are left out then it may cause a great disaster. BigFix helps in securing endpoints and loopholes and helps in managing critical businesses.

BigFix finds out the vulnerabilities and applies patches on the loopholes to secure them. It uses real-time visibility. BigFix operates the cluster server patching and sequenced server builds. It is low cost and also decreases the power consumption cost which makes it all the more economical for companies.

BigFix is an endpoint administration tool and assuring application for IT Infrastructure and protection specialists. Every company business requires safety against protection hazards. One of the promising manners of conserving a company business is pertaining reasonable insurance and compliance to loopholes, defenseless junctures, and the endpoints which if left open may create a big disaster. BigFix is the most helpful strategy for Endpoint protection and important company bargains administration.

A brief introduction about the companies involved:

In the year 2019 BigFix was sold to HCL by IBM. BigFix increased IBM’s capabilities to administer security, laptops, desktops, ATMs, and point of sale devices.

How Does it work?

BigFix has made a query language called Relevance language. This language is used in the operations of the BigFix platform. It can retrieve the data of CPUs and disc space of the client. BigFix has another language for scripting called the action script language.

Relevance Language as the name suggests is running evaluation to check if an endpoint is relevant to the patches.

One of the biggest strengths of the Action Script language is the ability to use Relevance language expressions to implement variables within actions.

Software Distribution:

BigFix works as a software distributor, patch manager, and operating system deployer. It has the humongous capacity of handling 250000 virtual or physical computers using a private or public network. It also contains various applications which makes it more accurate and enhances productivity.

BigFix is based on different types of content such as Actions, Fixlets, Tasks, and Baselines. It helps you to make your targets more particular as it recognizes the devices that need the content. So overall it makes the system client specific.

We can say BigFix is a system management software that can run a large number of computers at a time working with VMware ESX, mac OS X, Unix, Linux, and Microsoft Windows. It secures the system and manages the software. It’s a great asset to IT companies in terms of safety security and good management.

Bigfix and Security:

It authorizes users to have an incredibly prosperous fixing up strategy. Decreases the web traffic while the user downloads the patches by downloading the patch to the prominent area and then to a regional site by using the relay. It gives great encryption supervision and gives reasonable monitoring of the endpoints. Enables users to deploy mandatory insurance capabilities quickly. BigFix can be used to determine and update strategy, and organize the data. Repair the malware, viruses, and spyware.

A user can instantly mend all endpoints that employ antivirus or scans.

BigFix can be utilized through the API relationship to undervalue and automate duration and reserves. Surveillance of numerous servers can be accomplished through the centralized locale which decreases the actions and period expended before. Gives adequate integration with the numerous requisitions. It furnishes the user with valid and real-time data about the endpoints – regardless of site, connectivity, or regulating network. Gives the simple enforcement of insurance strategies across the different endpoints and gives formal monitoring of the endpoints. Audits all the authorized or unauthorized servers in the index for conserving safety.

The application enables the users to search the monitored computers for Installed software designation. Corresponding the indications specified by the scan with regard to the software catalog, Conclusion in comparison with respect to the expense, Establishing the report.
BigFix has facilitated us to retain a highly profitable endpoint repairing procedure for the preceding decade.

It’s been awfully prosperous there. It’s also evolved an essential part of several of our employment procedures, from compliance monitoring of endpoints, encryption supervision, key escrow, and regional supervisor password escrow. It’s created into our index. It’s extremely everywhere. Companies use BigFix as a policy of examination in the example of forfeited and stolen equipment to get an impression of what manner of data was probably on it. It is a crucial fraction of our submission administration strategy.

Patch Management:

Companies are able to solitary console organize all departmental Windows, Linux, AIX servers, and from a sole console, we can consent entry via position basis relying on division significance and permit. It’s almost simple to get a large resemblance on a single wall. It lessens web traffic when it arrives at downloading patches. It’s solitary patch storage on the origin server, all patches begin on the origin server, and then they are communicated via pertinence as expected, up above a line and an isolated connection via the relays up until it gets to the underside of the final relay and then it disburses to the customer. Depository and web wise, it earns the tiniest download feasible down to the final band and then disseminates from there.

BigFix is, therefore, a very crucial asset to a business enterprise that serves multiple functions.

Patch Analysis:

Bigfix also comes with incredibly powerful Patch Analysis options which helps us to run analyses on Endpoints and ensures they are compliant and secured.

Bigfix Guide:

After HCL took over BigFix, They have started a Youtube Video Series educating others about Bigfix, You can follow them here:

CategoriesEmail MarketingMautic

Install Mautic 3.2.X on your VPS – Easiest Setup Ever!

Hello All,

This is a rewrite of what I wrote before on my previous blog website. Just a quick intro about Mautic- If you don’t know it yet.

Mautic is an open-source complete Automation package developed by the Mautic.org community. DB Hurley was the founder member of the Mautic Team and since then Mautic is known who’ve achieved success like no one else.

What can Mautic let you do?

Well, Mautic can pretty well handle almost everything you need from a Marketing and Sales Perspective. However, Mautic is young opensource and improving every day.

Why People Prefer Mautic?

Well the primary reason we can say here is
1. Email Marketing.
2. Auto Responder.
3. Landing Pages, Forms, Automated Campaigns.
3. Pixel/Analytics Tracking from Emails. Landing Pages.
4. Mautic reduces the cost of Email marketing or Funnels because of its self-hosted nature.

What is Mautic and how can we benefit from it?

As explained earlier, Mautic is a self-hosted complete marketing solution for organizations and people. Making use of globally renowned SMTP providers or our own SMTP we can run our own Newsletter Business instead of depending on ridiculously overpriced applications present in the market. You know Email Marketing can become very expensive once you have grown to have a large subscriber base as the other applications start to charge you based on the number of subscribers. Well, Good news is not anymore once you start using Mautic.

A normal calculation when working with Mautic and AWS SES Smtp is below for your reference where you will spend roughly about 10$ on sending 10000 emails which is pretty cool right?

Alright, now coming to the point. Since I said Mautic is self-hosted. How to and where to install Mautic?

Since Mautic is a very versatile application, Hosting it with any Cpanel hosting provider can cause the application to run slow and not perform as intended. Hence, I would always recommend you to have a VPS provider.

VPS is nowadays inexpensive and here a few VPS Provider where you can get a VPS for real cheap.

  1. Contabo.com
  2. Digital Ocean.
  3. Hostwinds.com
  4. AWS (Amazon Web Services)
  5. Linode.com

Now let’s assume you already have bought a VPS Subscription. However, you are not tech-savvy and would like to install the application yourself. How do you do that?

Well, This is a broad question. If you are terminal friendly, You will be able to install it yourself by installing MySQL and Apache on your VPS.

What if you want a simpler setup? This is what I will be explaining to you here.

We will make use of something called AAPanel which has a CPANEL like GUI(Graphics User Interface and at the same time doesn’t overload your CPU)

AAPanel is the English/Global Version of BTPanel and is very lightweight making it one of the fastest Cloud Server Panel Manager. Installing it is one step and is dead easy.

Depending on the operating system you have, You would like to install the AAPanel by following this article here.

Once you have installed AAPanel Its now time to install Mautic 3.2.X . Let’s assume you have got the 3.2.5 downloaded from mautic.org

We will go ahead and upload it to AAPanel and then unzip the Mautic Application. Then We will go ahead and create a Database for Mautic. Then we will need to go ahead and Issue our domain an SSL.

Once done follow the steps below.

How to install Mautic 3.0 on AApanel.

Step1. We need to download Mautic 3.0.2 from Mautic.org/download.
Step2. Prepare the domain/subdomain we are hosting it. (Ensure the A records are pointing and SSL is issued)
Step3. Minimum Requirements: https://www.mautic.org/blog/community/mautic-3-is-coming
Step4: Upload 3.2.5 zip on the website/subdomain we created.

Step5: Go to domain/subdomain on a browser and you should see the installer.
Step 6. Run the installer (Since, It’s a new installation, I am not backing up the DB)

Step 7: After giving your DB info. There is a high chance to get a 500 server error. If you come across any such errors. Its solely due to the file permissions. Ensure you have the permissions correct.
An easy command that you can use on the terminal to fix it would be

Ensure you cd to the website folder wwwroot/domain.com first and then type.

chmod -R g+w app
chmod -R g+w media/files/ media/images/ translations/

Once you do that, it should work fine.

Step7: You should now be able to refresh and reach the next page.

You will need to give your Admin username and password.
Your first name and last name and email address and should take you to the next page /3

Here you would be asked to configure your email SMTP. I use AWS SES here.

Then Hit NEXT> You should redirect to the login page and should be able to log in.

Next is to setup PHP cron jobs for the Mautic to work properly.

Once you log in go to the settings gear icon on the top right.

You will need to click on configuration and check the patch to the installation and cache directory.

You also have to note that with Mautic 3.0.2 you have to cron using bin/console and not app/console.

You will need to go ahead to cron on AApanel and set up shell crons

This will be the syntax for the same considering you are using PHP 7.3
/www/server/php/73/bin/php /www/wwwroot/domain.com/bin/console mautic:segments:update
/www/server/php/73/bin/php /www/wwwroot/domain.com/bin/console mautic:email:fetch
/www/server/php/73/bin/php /www/wwwroot/domain.com/bin/console mautic:campaigns:trigger

You should be ready to send out emails from campaigns now.

Next, We will make use of AWS SES on this Mautic install which is really cost-effective and at the same time not compromising the quality. There are few ways to connect Mautic and AWS SES explained below.

  1. AWS SES Smtp
  2. AWS SES API

We will make use of AWS SES API as it helps us manage bounces and complaints more effectively using SNS which is another AWS Offering for managing/handling of our bounces and complaints.

Once Mautic is installed. We will need to set up few Cron Jobs. Due to its self hosted nature, Mautic heavily relies on Cron Jobs.

Below are the Cron Jobs that we should be selecting.

/www/server/php/73/bin/php /www/wwwroot/domain.com/bin/console mautic:segments:update
/www/server/php/73/bin/php /www/wwwroot/domain.com/bin/console mautic:email:fetch
/www/server/php/73/bin/php /www/wwwroot/domain.com/bin/console mautic:campaigns:trigger

There are many other cron jobs which can be installed on case to case basis.

Done! As they say, With Great Power comes Great Responsibility. Be Responsible and Don’t Spam. Feel free to ask questions if any.