<?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>DEV Community: Kartic Gharami</title>
    <description>The latest articles on DEV Community by Kartic Gharami (@devkartic).</description>
    <link>https://dev.to/devkartic</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%2F1299053%2F2012e722-05c3-43cb-a99c-f0dd0796f136.jpeg</url>
      <title>DEV Community: Kartic Gharami</title>
      <link>https://dev.to/devkartic</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devkartic"/>
    <language>en</language>
    <item>
      <title>Mail service integration in ubuntu VPS server</title>
      <dc:creator>Kartic Gharami</dc:creator>
      <pubDate>Wed, 06 Mar 2024 18:55:31 +0000</pubDate>
      <link>https://dev.to/devkartic/mail-service-integration-in-ubuntu-vps-server-17i9</link>
      <guid>https://dev.to/devkartic/mail-service-integration-in-ubuntu-vps-server-17i9</guid>
      <description>&lt;p&gt;To set up email services on an Ubuntu VPS server, you can use a mail server software like Postfix for sending emails and Dovecot for receiving and storing emails. Here's a basic guide to get you started with a simple email server setup. This example assumes you are setting up a mail server for personal use or small-scale usage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Update Package List
&lt;/h2&gt;

&lt;p&gt;Make sure your package list is up-to-date:&lt;/p&gt;

&lt;p&gt;sudo apt update&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Install Postfix
&lt;/h2&gt;

&lt;p&gt;Install Postfix, a popular mail transfer agent (MTA) used for sending emails:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo apt install postfix&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
During the installation, you will be prompted to choose the mail server configuration. Select "Internet Site" and press Enter. Enter your server's fully qualified domain name (FQDN) when prompted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Install Dovecot
&lt;/h2&gt;

&lt;p&gt;Install Dovecot, an IMAP and POP3 email server used for receiving and storing emails:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo apt install dovecot-core dovecot-imapd dovecot-pop3d&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Start and Enable Services
&lt;/h2&gt;

&lt;p&gt;Start and enable the services:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo systemctl start postfix sudo systemctl enable postfix&lt;br&gt;
sudo systemctl start dovecot sudo systemctl enable dovecot&lt;br&gt;
Step 5: Configure Postfix&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Edit the Postfix configuration file:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo nano /etc/postfix/main.cf&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Make sure the following settings are configured:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;myhostname = your_domain_or_server_name mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname inet_interfaces = all&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Save the file and restart Postfix:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo systemctl restart postfix&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Configure Dovecot
&lt;/h2&gt;

&lt;p&gt;Edit the Dovecot configuration file:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo nano /etc/dovecot/dovecot.conf&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Ensure the following settings are configured:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;protocols = imap pop3 mail_location = maildir:~/Maildir&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Save the file and restart Dovecot:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo systemctl restart dovecot&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7: Create Mailbox for a User
&lt;/h2&gt;

&lt;p&gt;Create a mailbox for a user (replace username with the desired username):&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo maildirmake.dovecot /etc/skel/Maildir&lt;br&gt;
sudo maildirmake.dovecot /etc/skel/Maildir/.Drafts&lt;br&gt;
sudo maildirmake.dovecot /etc/skel/Maildir/.Sent&lt;br&gt;
sudo maildirmake.dovecot /etc/skel/Maildir/.Trash&lt;br&gt;
sudo maildirmake.dovecot /etc/skel/Maildir/.Templates&lt;br&gt;
sudo maildirmake.dovecot /etc/skel/Maildir/.Junk&lt;br&gt;
sudo cp -r /etc/skel/Maildir /home/username&lt;br&gt;
sudo chown -R username:username /home/username/Maildir&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 8: Configure Email Client
&lt;/h2&gt;

&lt;p&gt;Configure your email client (e.g., Thunderbird, Outlook) to connect to your server using IMAP or POP3 for receiving emails and SMTP for sending emails. Use the server's IP address or domain name as the server address.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 9: Configure DNS Records
&lt;/h2&gt;

&lt;p&gt;Make sure your DNS records include proper MX records pointing to your server's IP address for receiving emails.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 10: Set Up Firewall
&lt;/h2&gt;

&lt;p&gt;Ensure that your server's firewall allows traffic on ports 25 (SMTP), 143 (IMAP), and 110 (POP3).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo ufw allow 25&lt;br&gt;
sudo ufw allow 143&lt;br&gt;
sudo ufw allow 110&lt;br&gt;
sudo ufw enable&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Remember that setting up and maintaining an email server requires careful configuration and security considerations. Additionally, ensure that your server's IP address is not blacklisted, especially if you're sending emails to external domains.&lt;/p&gt;

&lt;p&gt;This is a basic setup, and depending on your specific use case, you might need additional configurations and security measures. Consider consulting official documentation and additional resources for a more comprehensive email server setup.(&lt;a href="https://docs.docker.com/engine/reference/commandline/docker/"&gt;https://docs.docker.com/engine/reference/commandline/docker/&lt;/a&gt;). For additional information on coding and programming, you may also &lt;a href="https://www.crazycoderscafe.com/"&gt;visit&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>List of Docker Commands with Examples</title>
      <dc:creator>Kartic Gharami</dc:creator>
      <pubDate>Sat, 24 Feb 2024 16:33:55 +0000</pubDate>
      <link>https://dev.to/devkartic/list-of-docker-commands-with-examples-4nmi</link>
      <guid>https://dev.to/devkartic/list-of-docker-commands-with-examples-4nmi</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fybnpdc620ei6zm10m1dr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fybnpdc620ei6zm10m1dr.png" alt="Image description" width="800" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Docker is a popular platform for containerization, and it comes with a variety of commands to manage containers, images, networks, and volumes. Here’s a list of some commonly used Docker commands, with examples:&lt;/p&gt;

&lt;h3&gt;
  
  
  Container Management:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Docker run:&lt;br&gt;
-Creates and starts a container from an image.&lt;br&gt;
$ docker run -d — name my_container nginx&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker ps:&lt;br&gt;
-Lists running containers.&lt;br&gt;
$ docker ps&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;docker ps -a:&lt;br&gt;
-Lists all containers (running and stopped).&lt;br&gt;
$ docker ps -a&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker stop:&lt;br&gt;
-Stops a running container.&lt;br&gt;
$ docker stop my_container&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker start:&lt;br&gt;
-Starts a stopped container.&lt;br&gt;
$ docker start my_container&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker restart:&lt;br&gt;
-Restarts a container.&lt;br&gt;
$ docker restart my_container&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker exec:&lt;br&gt;
— Executes a command in a running container.&lt;br&gt;
$ docker exec -it my_container bash&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker rm:&lt;br&gt;
— Removes one or more containers.&lt;br&gt;
$ docker rm my_container&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Image Management:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Docker images:&lt;br&gt;
— Lists all available images.&lt;br&gt;
$ docker images&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker pull:&lt;br&gt;
— Pulls an image from a registry.&lt;br&gt;
$ docker pull ubuntu:latest&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker rmi:&lt;br&gt;
— Removes one or more images.&lt;br&gt;
$ docker rmi ubuntu:latest&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker build:&lt;br&gt;
— Builds a Docker image from a Dockerfile.&lt;br&gt;
$ docker build -t custom_image:tag .&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Network Management:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;docker network ls:&lt;br&gt;
— Lists all networks.&lt;br&gt;
$ docker network ls&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;docker network create:&lt;br&gt;
— Creates a new network.&lt;br&gt;
$ docker network create my_network&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;docker network connect:&lt;br&gt;
— Connects a container to a network.&lt;br&gt;
$ docker network connect my_network my_container&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Volume Management:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;docker volume ls:&lt;br&gt;
— Lists all volumes.&lt;br&gt;
$ docker volume ls&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker volume create:&lt;br&gt;
— Creates a new volume.&lt;br&gt;
$ docker volume create my_volume&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docker volume inspect:&lt;br&gt;
— Displays detailed information about a volume.&lt;br&gt;
$ docker volume inspect my_volume&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These are just a few examples, and there are many more Docker commands available. You can explore the Docker documentation for more in-depth information: &lt;a href="https://docs.docker.com/engine/reference/commandline/docker/"&gt;[Docker CLI documentation]&lt;/a&gt;. For additional information on coding and programming, you may also &lt;a href="https://www.crazycoderscafe.com/"&gt;visit&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>docker</category>
      <category>softwaredevelopment</category>
    </item>
  </channel>
</rss>
