<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Hiteshpandey</title>
    <description>The latest articles on Forem by Hiteshpandey (@hiteshpandey).</description>
    <link>https://forem.com/hiteshpandey</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F354874%2F93a62925-fcd4-4338-9695-f22431bce25b.jpeg</url>
      <title>Forem: Hiteshpandey</title>
      <link>https://forem.com/hiteshpandey</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/hiteshpandey"/>
    <language>en</language>
    <item>
      <title>A go through of prismic implementation journey for a tutorial site on vue js</title>
      <dc:creator>Hiteshpandey</dc:creator>
      <pubDate>Sun, 17 Aug 2025 08:33:53 +0000</pubDate>
      <link>https://forem.com/hiteshpandey/a-go-through-of-prismic-implementation-journey-for-a-tutorial-site-on-vue-js-34ij</link>
      <guid>https://forem.com/hiteshpandey/a-go-through-of-prismic-implementation-journey-for-a-tutorial-site-on-vue-js-34ij</guid>
      <description>&lt;p&gt;This post is an overview of how you can approach a site that you want to build using Prisimc service integration, so this would be less of a technical code implementation walthrough and more of a go through of how we planned and diverted from implementing our site so you can take some cues from it. I am going to refer the site built on the same platform that is the Pepipost tutorials section (specifically the tutorial section) you can check it out &lt;a href="https://pepipost.com/tutorials/" rel="noopener noreferrer"&gt;here&lt;/a&gt; since that was the project I will be referencing.&lt;/p&gt;

&lt;p&gt;And before the article continues, I want to make clear that I am not specifically an expert on these technologies, this will be a big note on how I was trying to implement this an how I found certain things that work and my trials with Vue js, cause this was the first time I was Implementing it. With these points in mind let's go forward with the journey.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prismic Platform:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;So first things first. What is the scenario we would be using Prismic?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Basically, if you want a centralized control for all of your content independent of your system and want to provide access to multiple users to anyone in the world Prismic is your answer. It is an online service you can use as an independent CMS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;So we had the same requirement and wanted our tutorials to be editable by anyone posting it and the posts that can be posted by anyone by any external contributors.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What about WordPress?
&lt;/h3&gt;

&lt;p&gt;Well, we do have our site on WordPress and did have our tutorial section on that, but we wanted the new framework to be malleable to our campaigns that we will be posting on our site. Also, we wanted the site to be faster, Seo optimized and to be compatible with google crawler. So with that, here comes our second scenario.&lt;/p&gt;

&lt;h2&gt;
  
  
  Framework and language:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Second is the language and framework we want this to be built in. In the initial phases of planning and deployment, because Prismic allows unlimited calls to the API on the free plan, we thought it will be a really good idea to use a frontend framework and since I didn't have much experience in front end framework other than Vue, I took it forward as our main framework for the project to be built in.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Searching and ordering:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Initially, we had decided to use Algolia as our search service but since prismic provides us the search API through queries we decided to stick with it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Vue integration with prismic:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Prismic API services use GraphQL format for sending queries in order to customize the API calls according to our needs. If you are building a system from scratch it provides detailed documentation about the API requests on the many frameworks and languages yes on js and on Vue js too.&lt;/li&gt;
&lt;li&gt;But if you are a beginner like me or you don't want to waste time setting up the API and structuring the framework you can use the Vue &lt;a href="https://prismic.io/docs/vuejs/getting-started/with-the-vuejs-starter" rel="noopener noreferrer"&gt;starter kit&lt;/a&gt; in case you want a quick headstart.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  SEO optimization:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Here is where we faced one of the challenges with Vue since it renders the content after the Prismic API call we can see that there is a loading time for the contents on the pages. &lt;/li&gt;
&lt;li&gt;And google crawls that so on the SEO point of view we had failed to generate any meaningful content on google crawl. Our site was fast and google was ranking it but the content was missing. This would cause your site traffic to fall drastically.

&lt;ul&gt;
&lt;li&gt;The first thing you will say that adding a loader on the page will help with this. Yes and No. Yes it will look like the content is loading to the user, but the google crawler won't wait for the page content to load, it crawls the page the instant it is loaded. &lt;/li&gt;
&lt;li&gt;Also the page title, description and other meta tags are set dynamically from the API response they won't be set properly.&lt;/li&gt;
&lt;li&gt;You see, in case of a static site the content is readily available at the time of load since no latency is there fetching the content.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Since we had spent so much time integrating and implementing this project, we cannot turn back to a backend implementation with a database that will require us to sync data to the SQL regularly in case of content which will take a lot of time to build. The solution to this will be discussed in the next section.&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Server side rendering:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;This was a lifesaver for us. You can use Nuxt.js to implement the server-side rendering you can check it out &lt;a href="https://nuxtjs.org/guide" rel="noopener noreferrer"&gt;here&lt;/a&gt;. It provides a well-structured code frame on which you can develop your Vue js applications. &lt;/li&gt;
&lt;li&gt;Due to server constraints and since it was going on our live server where many services reside we used the &lt;strong&gt;Prerendering&lt;/strong&gt; as a solution to our newfound limitations. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Prerendering
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Prerendering is a process in which the server creates static html copies of the site's dynamic pages by literally loading the page in a browser and copying the loaded html code from it. After this, you will route the site URL to hit the main index page of the generated html directory which is by default named &lt;strong&gt;dist&lt;/strong&gt; and you are ready to use this generated html pages as your static site.&lt;/li&gt;
&lt;li&gt;What do we require for prerendering:

&lt;ul&gt;
&lt;li&gt;NodeJs -  To use the prerenderer library you have to install this since it is a NodeJs library.&lt;/li&gt;
&lt;li&gt;PrerenderSpaPlugin - You need to install this using npm&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;After you install necessary libraries, you need to add all of the Routes you need to be rendered in an array structure. Manually yes. If you have to figure it out if you want to add it dynamically.&lt;/li&gt;

&lt;li&gt;After that there are certain lists of things you need to keep in mind: 

&lt;ul&gt;
&lt;li&gt;Prerendering takes server resources you can make it such that the static web pages are built on one server and then pull it on another server to update the content or to add new pages.&lt;/li&gt;
&lt;li&gt;If you will be adding new pages routes all the time (since it is a tutorial site), you need to make changes to the vue config file.&lt;/li&gt;
&lt;li&gt;Change Timeout to 0 - Since it will take a long time to render all of the routes you will be updating, it is sure to time out after some time.&lt;/li&gt;
&lt;li&gt;Enable headless mode - Since we want this to happen internally without opening the chrome browser UI on the server&lt;/li&gt;
&lt;li&gt;Set Concurrent execution to a limited number - Else your server will not be able to handle the number of concurrent processes and the main process will die.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Disabling JS Scripts
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Please keep in mind to remove the js script while rendering the page where it is not required, since what will happen is that the page will load with the static content once and then the latent script once loaded and active will call the Prismic API again to load the page which doesn't look nice.

&lt;ul&gt;
&lt;li&gt;You can do this by using a regex pattern to identify starting and closing script tags and removing it from the buffered html.&lt;/li&gt;
&lt;li&gt;You can do this on certain routes by filtering the routes by the renderedRoute parameter&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;After the set up is done, we build the npm pages and were able to see a fast, SEO friendly site powered by vue and prismic. Let me inform this is not a perfect setup and more work has to be done to make it seamless and less manual interaction. But for now, for what time we had we are using this setup for our needs. &lt;/p&gt;

&lt;p&gt;Hope you all can take something out of it and plan your setup better in order to integrate prismic or other platform with your Vue setup.&lt;/p&gt;

</description>
      <category>vue</category>
      <category>node</category>
    </item>
    <item>
      <title>How does email bounce work in Mautic </title>
      <dc:creator>Hiteshpandey</dc:creator>
      <pubDate>Thu, 26 Mar 2020 09:29:21 +0000</pubDate>
      <link>https://forem.com/pepipost/how-does-email-bounce-work-in-mautic-1d5l</link>
      <guid>https://forem.com/pepipost/how-does-email-bounce-work-in-mautic-1d5l</guid>
      <description>&lt;p&gt;Mautic being an opensource marketing solution provides you with various features such as email organization through segmentation and sending targeted emails through campaigns with email monitoring. In order to comprehend the impact of your campaign, you need to track how much of your sent emails are being successfully sent and how many emails are being dropped. You can do this by checking bounced emails in your campaign.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do emails get bounced?
&lt;/h2&gt;

&lt;p&gt;Reasons for getting an email bounce notification can be many; from email address being changed, a domain has changed, the recipient's mailbox is full, etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of email bounces:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Hard Bounces:- A hard bounce of an email is caused by permanent non-deliverable conditions such as the recipient's email address is missing or invalid. Many other reasons for a hard bounce to occur are the non-existence of the recipient’s domain, unknown recipient, error in typing the recipient’s email address, blocking of your email server by the recipient’s email server, or any kind of network glitch at the recipient’s end.&lt;/li&gt;
&lt;li&gt;Soft Bounces:- If an email message is able to find the recipient’s email server and recognize the address, but it is not delivered to the recipient’s inbox and bounced back before delivery, it is classified as a "Soft Bounce." The reasons might include: the recipient’s inbox is full, the recipient's email server is down for some reason, or the email box is abandoned by the user.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With this, we can go forward with setting up email bounce filtration in Mautic.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Install and enable php-imap extension
&lt;/h3&gt;

&lt;p&gt;If you haven't yet installed the php-imap extension please follow these instructions for the installation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install php-imap
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;yum &lt;span class="nb"&gt;install &lt;/span&gt;php-imap // For centos &lt;span class="se"&gt;\ &lt;/span&gt;RHEL
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;php7.0-imap // For ubuntu
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Enable the extension
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;vim /etc/php.ini
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Uncomment or Add these lines
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;extension&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;imap.so
&lt;span class="nv"&gt;extension&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;curl.so
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Restart the HTTP server
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;service restart httpd&lt;span class="se"&gt;\a&lt;/span&gt;pache // For apache
&lt;span class="nv"&gt;$ &lt;/span&gt;service restart nginx // For nginx
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Setup Monitored Inbox Settings
&lt;/h3&gt;

&lt;p&gt;Since now we have our PHP IMAP extension enabled we can move onward towards setting up our IMAP inbox with Mautic.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Login to the Mautic panel&lt;/li&gt;
&lt;li&gt;Click on the [cogwheel icon] &amp;gt; [Configuration] &amp;gt; [Email Settings]&lt;/li&gt;
&lt;li&gt;Set these credentials:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Monitored address - The email address you are going to use&lt;/p&gt;

&lt;p&gt;IMAP host - The IMAP enabled email server's hostname&lt;/p&gt;

&lt;p&gt;Port - Email server connection port [usually 993]&lt;/p&gt;

&lt;p&gt;Encryption - Message encryption [usually SSL]&lt;/p&gt;

&lt;p&gt;IMAP username - User name of your email account&lt;/p&gt;

&lt;p&gt;IMAP password- Password of your email account&lt;/p&gt;

&lt;p&gt;Click on [Test connection and fetch folders] to test the connection and populate the Folders from your email server.&lt;/p&gt;

&lt;p&gt;Bounces - Select the bounces folder from which Mautic will be reading bounce notifications from. This can be set as the Inbox folder of your email directory or you can filter your bounce notifications to the Bounce folder which will be a cleaner way to handle this.&lt;/p&gt;

&lt;p&gt;You can use Use custom connection settings? option too, for setting up different email addresses for different Requests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:-&lt;/strong&gt; By any reason you are not being able to see the Monitored Inbox Settings you can do two things to fix this&lt;/p&gt;

&lt;p&gt;Check the php imap option is enabled in the php.ini file or not&lt;br&gt;
Delete the Mautic cache folder and reload the page&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;// Mautic cache folder
/mautic_setup_path/app/cache/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Setup Cron (If using IMAP)
&lt;/h3&gt;

&lt;p&gt;Edit the Cron file and put the following Cron in it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;crontab &lt;span class="nt"&gt;-e&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; php /path/to/mautic/app/console mautic:email:fetch
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Create a segment for bounce emails
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Open Segments section in Mautic&lt;/li&gt;
&lt;li&gt;Create a new segment named Bounce emails&lt;/li&gt;
&lt;li&gt;In the Filters section, Select [Bounced - Email] option apply equals operator and set it to yes save this segment
This segment will be updated when mautic:segments:update Cron is executed&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 5: Enable Bounce Forwarding
&lt;/h3&gt;

&lt;p&gt;After you set your IMAP server settings, Mautic would be checking for bounce notification emails in your specified directory. To receive these bounce notification emails, you might have to enable this in your email service providers panel.&lt;/p&gt;

&lt;p&gt;All you have to do is set the email id which you have specified in the Monitored Inbox Settings to be forwarded the bounce email notifications.&lt;/p&gt;

&lt;p&gt;In case you don't want to do that or your email service provider doesn't allow the kind of VERP format (more on that later), you can use the webhooks of your email service provider which is discussed in the next step&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Set the webhook to the Mautic mailer callback URL (Optional if you are using IMAP)
&lt;/h3&gt;

&lt;p&gt;Depending upon the service provider you use you will have to set the webhook to the Mauitc callback URL.&lt;/p&gt;

&lt;p&gt;The callback URL would look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;http://&amp;lt;mautic_installation_domain&amp;gt;/mailer/&lt;span class="o"&gt;{&lt;/span&gt;service-provider-name&lt;span class="o"&gt;}&lt;/span&gt;/callback
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Similar to the IMAP settings you can use this callback URL as a webhook in order to detect bounced emails. In this case, your email service provider provides information about the bounced emails through the webhook endpoint. Refer &lt;a href="https://docs.mautic.org/en/channels/emails/bounce-management"&gt;this&lt;/a&gt; section to know more about this.&lt;/p&gt;

&lt;p&gt;If you are using a custom SMTP service that is not mentioned in the Email service list provided in the [Mail Send Settings] panel, you will not be able to use this. Regardless of that, if you have no problem with the setup until Step 5, you will be able to detect and interact with the bounced email ids into the Bounce segment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Process&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For IMAP inbox:
Mautic uses the configured IMAP mail configuration to detect the Bounced email notifications. This is done by the execution of this Cron mautic✉️fetch&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Mautic uses VERP Variable Envelope Return Path (VERP) to detect emails Return-Path header to check for the bounced email which normally is the from-address you are sending from, which is modified by Mautic&lt;br&gt;
The format Mautic expects the return-path should be is &lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;youremail+bounce_receiver-email-id@your-domain.com
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;When an email is bounced it is sent back with the Return-Path header&lt;br&gt;
Mautic then uses this detail to set the contact as bounced email.&lt;br&gt;
The bounce segment that is created by the user is then updated by the contacts that are marked as bounced. This is done after the execution of the Cron mautic:segments:update&lt;/p&gt;

&lt;p&gt;I hope this helps clear some doubts about the bounce email handling in the Mautic service setup.&lt;/p&gt;

&lt;p&gt;You can check the original post here - &lt;a href="https://pepipost.com/tutorials/mautic-bounce-management/"&gt;https://pepipost.com/tutorials/mautic-bounce-management/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mautic</category>
    </item>
    <item>
      <title>A quick guide on Mautic installation for Ubuntu 18.04</title>
      <dc:creator>Hiteshpandey</dc:creator>
      <pubDate>Wed, 25 Mar 2020 05:53:26 +0000</pubDate>
      <link>https://forem.com/pepipost/a-quick-guide-on-mautic-installation-for-ubuntu-18-04-39ik</link>
      <guid>https://forem.com/pepipost/a-quick-guide-on-mautic-installation-for-ubuntu-18-04-39ik</guid>
      <description>&lt;p&gt;Mautic is one of the popular free open-source Marketing automation applications which can be used for multiple use cases of marketing paradigm. It ranges from sending bulk emails by uploading an Email list, Scheduling and Creating campaigns, Sending SMS and User journey.&lt;br&gt;
This will be a quick detour on how you can set up Mautic service on your brand new server setup from scratch. But before that, here are some of the basic system requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PHP 5.6.19 + (Magic Quotes GPC off)&lt;/li&gt;
&lt;li&gt;MySQL 5.5.3 + (InnoDB support required)&lt;/li&gt;
&lt;li&gt;Apache / Nginx&lt;/li&gt;
&lt;li&gt;An SMTP service provider like Pepipost&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can check Mautic's official requirements page &lt;a href="https://www.mautic.org/download/requirements"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After confirming to these requirements you can now begin with the installation&lt;/p&gt;
&lt;h1&gt;
  
  
  Installation
&lt;/h1&gt;
&lt;h3&gt;
  
  
  Step 1: Enter into the root directory of your remote server
&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd var/www/html/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Step 2: Create a new directory named Mautic
&lt;/h3&gt;


&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo mkdir &lt;/span&gt;mautic
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;mautic
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Step 3: Download the Mautic production file package
&lt;/h3&gt;

&lt;p&gt;To download Mautic at your local machine click &lt;a href="https://www.mautic.org/download"&gt;here&lt;/a&gt;&lt;br&gt;
Fill your credentials and click on the download button&lt;br&gt;
The downloaded file would be named something like this 2.16.0.zip&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 4: Copy the zip file to the remote server
&lt;/h3&gt;

&lt;p&gt;Enter the following commands in your local machine download file location&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;scp &lt;span class="nt"&gt;-r&lt;/span&gt; 2.16.0.zip root@&amp;lt;your-domain-name/ip-address&amp;gt;:/var/www/html/mautic/mautic.zip
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:-&lt;/strong&gt; By any chance, you don’t have access to copy files to your server directory you can use FTP to upload the zip file, or you can use the git repo to clone it to your server directory, but you have to take some additional steps to get it up and running. Check &lt;a href="https://github.com/mautic/mautic"&gt;this link&lt;/a&gt; for Mautic git repo.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Unzip the file contents
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;unzip mautic.zip
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If you don’t have unzip installed, you can install it by using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;unzip
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Step 6: Delete the zip file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; mautic.zip
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 7: Install php-fpm and dependencies
&lt;/h3&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo apt install php libapache2-mod-php libapache2-mod-php php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-tidy php-mysql php-cli php-mcrypt php-ldap php-zip php-curl php-sqlite3 php-fpm
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Step 8: Setting up MySQL
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Install MySQL server&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;mysql-server
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Set MySQL root password&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After the installation a temporary password will be generated in the mysqld.log file you can access this password by the following command
$ sudo grep 'temporary password' /var/log/mysqld.log&lt;/li&gt;
&lt;li&gt;Now you will get a message something like this
[Note] A temporary password is generated for root@localhost: ,b*-rkuIR4Zas&lt;/li&gt;
&lt;li&gt;Copy this password for the next step&lt;/li&gt;
&lt;li&gt;Enter this command
$ sudo mysql_secure_installation&lt;/li&gt;
&lt;li&gt;This will prompt you to validate your password enter Y&lt;/li&gt;
&lt;li&gt;After this, you will be prompted to set your password strength. Enter you choice between LOW, MEDIUM and STRONG.&lt;/li&gt;
&lt;li&gt;Enter new password&lt;/li&gt;
&lt;li&gt;You can say yes to all the other prompts that come after this&lt;/li&gt;
&lt;li&gt;You will now be prompted with multiple questions on how to set up the MySQL installation. You can set Y to all the prompts&lt;/li&gt;
&lt;li&gt;You will be able to login with the user root and a blank password
&lt;strong&gt;Login to MySQL&lt;/strong&gt;
Create Mautic database and add User
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;mysql &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; create database mautic&lt;span class="p"&gt;;&lt;/span&gt;
mysql &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; CREATE USER &lt;span class="s1"&gt;'mauticuser'&lt;/span&gt;@&lt;span class="s1"&gt;'localhost'&lt;/span&gt; IDENTIFIED BY &lt;span class="s1"&gt;'password'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
mysql &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; GRANT ALL PRIVILEGES ON &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; TO &lt;span class="s1"&gt;'mauticuser'&lt;/span&gt;@&lt;span class="s1"&gt;'localhost'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
mysql &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; FLUSH PRIVILEGES&lt;span class="p"&gt;;&lt;/span&gt;
mysql &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 9: Setting up Http Server
&lt;/h3&gt;

&lt;p&gt;(You can install Nginx or Apache server according to your needs)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Nginx&lt;/strong&gt;:
For installing Nginx you can follow these steps
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;nginx
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start nginx
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;nginx
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You need to make the following changes to nginx.conf file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;vim /etc/nginx/nginx.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;server &lt;span class="o"&gt;{&lt;/span&gt;
       listen       80 default_server&lt;span class="p"&gt;;&lt;/span&gt;
       listen       &lt;span class="o"&gt;[&lt;/span&gt;::]:80 default_server&lt;span class="p"&gt;;&lt;/span&gt;
       server_name  &amp;lt;Your domain name&amp;gt;&lt;span class="p"&gt;;&lt;/span&gt;
       root         /var/www/html/mautic&lt;span class="p"&gt;;&lt;/span&gt;
       location / &lt;span class="o"&gt;{&lt;/span&gt;
               try_files &lt;span class="nv"&gt;$uri&lt;/span&gt; /index.php&lt;span class="nv"&gt;$is_args$args&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
       &lt;span class="o"&gt;}&lt;/span&gt;
       location ~ &lt;span class="se"&gt;\.&lt;/span&gt;php&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;
       fastcgi_pass unix:/run/php/php7.2-fpm.sock&lt;span class="p"&gt;;&lt;/span&gt;
       fastcgi_index index.php&lt;span class="p"&gt;;&lt;/span&gt;
       fastcgi_param SCRIPT_FILENAME &lt;span class="nv"&gt;$document_root$fastcgi_script_name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
       include fastcgi_params&lt;span class="p"&gt;;&lt;/span&gt;
       fastcgi_split_path_info ^&lt;span class="o"&gt;(&lt;/span&gt;.+.php&lt;span class="o"&gt;)(&lt;/span&gt;/.+&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nv"&gt;$;&lt;/span&gt;
       &lt;span class="o"&gt;}&lt;/span&gt;
   &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now depending upon your php-fpm setup you either need to add&lt;br&gt;
    fastcgi_pass 127.0.0.1:9000;&lt;br&gt;
Or&lt;br&gt;
    fastcgi_pass unix:/var/run/php7.2-fpm.sock;&lt;br&gt;
Note: If you are unclear on which value has to be set, you can check this in &lt;a href="http://www.conf"&gt;www.conf&lt;/a&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;vim /etc/php/7.2/fpm/pool.d/www.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Search for the listen parameter.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Apache:&lt;/strong&gt;
For installing Apache you can follow these steps
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;apache2
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start apache2
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;apache2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You need to make the following changes to apache2.conf file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;vim /etc/httpd/conf/httpd.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&amp;lt;VirtualHost &lt;span class="k"&gt;*&lt;/span&gt;:80&amp;gt;
DocumentRoot /var/www/html/mautic
&amp;lt;Directory /&amp;gt;
       Options FollowSymLinks
       AllowOverride All
   &amp;lt;/Directory&amp;gt;
   &amp;lt;Directory /var/www/mautic&amp;gt;
       Options FollowSymLinks MultiViews
       AllowOverride All
       Order allow,deny
       Allow from All
   &amp;lt;/Directory&amp;gt;
&amp;lt;/VirtualHost&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;After this you will be opening http://{your-domain-address} to open Mautic installation panel&lt;br&gt;
There is more to this after the basic setup. But, since this tutorial is already too long here are some links to help you.&lt;br&gt;
For more detailed setup on ubuntu 18.06 (Error resolutions | Setup | Setting up your first campaign) you can follow the original blog here — &lt;a href="https://pepipost.com/tutorials/how-to-install-mautic-on-ubuntu-18-04/"&gt;https://pepipost.com/tutorials/how-to-install-mautic-on-ubuntu-18-04/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mautic</category>
      <category>ubuntu</category>
    </item>
    <item>
      <title>Install Mailtrain on Ubuntu 18.04</title>
      <dc:creator>Hiteshpandey</dc:creator>
      <pubDate>Tue, 24 Mar 2020 16:32:53 +0000</pubDate>
      <link>https://forem.com/pepipost/install-mailtrain-on-ubuntu-18-04-1pn5</link>
      <guid>https://forem.com/pepipost/install-mailtrain-on-ubuntu-18-04-1pn5</guid>
      <description>&lt;p&gt;Mailtrain is a free open-source, self-hosted, newsletter application which is built on NodeJs and MySQL/MariaDB. Mailtrain allows us to send bulk emails by uploading e-mailing lists, with that it has email triggers, segmentation, email template generation from drag and drop to HTML editor. All you need is the SMTP credentials of your ESP.&lt;br&gt;&lt;br&gt;
In this tutorial, you will learn the steps required to successfully install and integrate Mailtrain Open Source Email Newsletter Application on a fresh Linux- Ubuntu 18.04 instance.&lt;br&gt;&lt;br&gt;
Please go through these prerequisites  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A hosting server with a minimum of 1GB ram available for Mailtrain service. (To be at safer side, it is recommended to have slightly higher capacity)
&lt;/li&gt;
&lt;li&gt;Node.js (v7+)&lt;/li&gt;
&lt;li&gt;MySQL (v5.5+ or MariaDB)&lt;/li&gt;
&lt;li&gt;Redis (for session storage)&lt;/li&gt;
&lt;li&gt;MySQL (v5.5+ or MariaDB) 
With these requirements fulfilled get-go through the installation steps
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  Installation
&lt;/h1&gt;
&lt;h3&gt;
  
  
  Step 1: Check Node version
&lt;/h3&gt;


&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;node &lt;span class="nt"&gt;-v&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You can install Node.js using these commands (Skip this step, if you already have NodeJs installed)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;build-essential
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;manpages-dev
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;nodejs
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Check MySQL version
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;mysql &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;For the installation of MySQL server please refer to &lt;a href="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#apt-repo-fresh-install"&gt;this&lt;/a&gt; article. (Skip, in case you have MySQL already installed):&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Clone Mailtrain git repository on your server directory
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;git clone git://github.com/Mailtrain-org/mailtrain.git
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;mailtrain
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: In this step you will create a new database and a new user, so log in to your MySQL instance and follow the given steps:
&lt;/h3&gt;

&lt;p&gt;Log in to MySQL and create a new database.&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mysql&amp;gt; create database mailtrain;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Create a new user with its hostname and password &lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mysql&amp;gt; CREATE USER 'mailtrainuser'@'localhost' IDENTIFIED BY 'password';
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Give user access and exit&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mysql&amp;gt; GRANT ALL PRIVILEGES ON * . * TO 'mailtrainuser'@'localhost';

mysql&amp;gt; EXIT;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Step 5: Copy the file config/default.toml to config/production.toml
&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cp config/default.toml config/production.toml
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Step 6: Edit config file
&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo vim config/production.toml
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Step 7: Now you will make changes to the following sections in production.toml file:
&lt;/h3&gt;

&lt;p&gt;Change the MySQL details based on the database you have created.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;[&lt;/span&gt;mysql]
&lt;span class="nv"&gt;host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"localhost"&lt;/span&gt; // your mysql host
&lt;span class="nv"&gt;user&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"mailtrainuser"&lt;/span&gt; // username
&lt;span class="nv"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"password"&lt;/span&gt; // mysql password
&lt;span class="nv"&gt;database&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"mailtrain"&lt;/span&gt; // database
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Enable Redis if you have it installed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;[&lt;/span&gt;redis]
&lt;span class="nv"&gt;enabled&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true
&lt;/span&gt;&lt;span class="nv"&gt;host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"localhost"&lt;/span&gt;
&lt;span class="nv"&gt;port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;6379
&lt;span class="nv"&gt;db&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;For installation of Redis follow the given set of commands&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;redis-server
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;redis-server.service
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 8: Run npm install
&lt;/h3&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ npm install --production
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Step 9: For the final step, you will run the Mailtrain.
&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ NODE_ENV=production npm start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can run Mailtrain like this or you can create a Mailtrain service. To do that, you can now end the currently running instance by pressing [Ctrl + c] and follow the next steps.&lt;/p&gt;

&lt;h1&gt;
  
  
  Create and run Mailtrain service file
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Step 1: Create a new user group forMailtrain
&lt;/h3&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo adduser --system --group mailtrain
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Step 2: Add user group in the production.toml file
&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo vim config/production.toml
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Add these credentials&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user="mailtrain"
group="mailtrain"
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Step 3: Add permissions for our Mailtrain user to execute our directory
&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo chown mailtrain:mailtrain /var/www/html/mailtrain/ -R
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Step 4: Copy our Mailtrain service file to our systemd system directory
&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo cp /var/www/html/mailtrain/setup/mailtrain.service /etc/systemd/system/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;
  
  
  Step 5: Change the working directory in our mailtrain.service file
&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo vim /etc/systemd/system/mailtrain.service
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Change "/opt/mailtrain" to whatever your Mailtrain folder path is for example "/var/www/html/mailtrain"&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Start the Mailtrain service
&lt;/h3&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo service mailtrain start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And with this, you have the Mailtrain service up and running. You can check the status of the Mailtrain service by using this command&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo service mailtrain status
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;With this done, you have successfully installed Mailtrain service on your Linux server.&lt;/p&gt;

&lt;p&gt;The next step is to set up a reverse proxy.&lt;/p&gt;

&lt;h1&gt;
  
  
  Setup reverse proxy
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Step 1: Edit production.toml file
&lt;/h3&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo vim config/production.toml
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Modify these lines&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"127.0.0.1"&lt;/span&gt; 
&lt;span class="nv"&gt;proxy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Server config setup
&lt;/h3&gt;

&lt;p&gt;For Apache2, use the commands mentioned below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;apache2
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start apache2
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;apache2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You can find the Mailtrain server configuration setting for Apache in the following path.&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ vim /var/www/html/mailtrain/setup/mailtrain-apache.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Note:- You need to enable Proxy Mod on Apache2 (only if you haven't enabled it yet). This can be done by using the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;a2enmod proxy 
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;a2enmod proxy_http
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;These are the settings you will be adding in your apache2.conf file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;vim /etc/apache2/apache2.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;ProxyPreserveHost On
ProxyPass        &lt;span class="s2"&gt;"/"&lt;/span&gt; &lt;span class="s2"&gt;"http://127.0.0.1:3000/"&lt;/span&gt;
ProxyPassReverse &lt;span class="s2"&gt;"/"&lt;/span&gt; &lt;span class="s2"&gt;"http://127.0.0.1:3000/"&lt;/span&gt;
ServerName example.com
ServerAlias www.example.com
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Restart the server&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo service apache2 restart
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;For Nginx, use the commands mentioned below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;nginx
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start nginx
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;nginx
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You can find the Mailtrain server configuration setting for Nginx in the following path.&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ vim /var/www/html/mailtrain/setup/mailtrain-nginx.conf 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;These are the settings you will be adding in your nginx.conf file :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;vim /etc/nginx/nginx.conf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;    server &lt;span class="o"&gt;{&lt;/span&gt;
    listen 80&lt;span class="p"&gt;;&lt;/span&gt;
    listen &lt;span class="o"&gt;[&lt;/span&gt;::]:80&lt;span class="p"&gt;;&lt;/span&gt;

    server_name mailtrain.org www.mailtrain.org&lt;span class="p"&gt;;&lt;/span&gt;
    access_log /var/log/nginx/mailtrain.log&lt;span class="p"&gt;;&lt;/span&gt;

    location / &lt;span class="o"&gt;{&lt;/span&gt;
        proxy_set_header X-Real-IP &lt;span class="nv"&gt;$remote_addr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        proxy_set_header X-Forwarded-For &lt;span class="nv"&gt;$proxy_add_x_forwarded_for&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        proxy_set_header HOST &lt;span class="nv"&gt;$http_host&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        proxy_set_header X-NginX-Proxy &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        proxy_pass http://127.0.0.1:3000&lt;span class="p"&gt;;&lt;/span&gt;
        proxy_redirect off&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Restart the server:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo service nginx restart
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Step 3: Restart Mailtrain service&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo service mailtrain restart
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;With this, you will be able to access Mailtrain dashboard on your domain URL&lt;/p&gt;

&lt;p&gt;http://{your-domain-address}&lt;br&gt;
I hope with these simple steps you are now able to use the Mailtrain set up for your marketing campaigns. For setting up your SMTP credentials and other settings you can refer the following link which is the original post:&lt;/p&gt;

&lt;p&gt;Mailtrain setup for Ubuntu 18.04 - &lt;a href="https://pepipost.com/tutorials/how-to-install-mailtrain-on-ubuntu-18-04/"&gt;https://pepipost.com/tutorials/how-to-install-mailtrain-on-ubuntu-18-04/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For installation on Centos 7 - &lt;a href="https://pepipost.com/tutorials/how-to-install-mailtrain-on-centos-7/"&gt;https://pepipost.com/tutorials/how-to-install-mailtrain-on-centos-7/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mailtrain</category>
      <category>ubuntu</category>
    </item>
  </channel>
</rss>
