Software Installation – What is the right way to install RLS and rust analysis? [16.04 LTS]?

I wanted to use an IDE like Visual Studio Code with Rust on Ubuntu 16.04.3 LTS, but could not successfully install RLS (the Rust Language Server).

The RLS installation starts automatically, but fails with a permission error (see the figure below).

Error installing rust analysis in Visual Studio code

This error probably occurs because I am logged in to my non-root user account.

I get the same error when I execute the command rustup component add rls rust analysis rust src in a terminal window. My problem is when I try to execute this command sudo (as in sudo rustup component adds rls rust-analysis rust-src) I get the error message that Rustup can not be found.

What is the right way to install RLS and rust analysis in such a situation?

ubuntu 16.04 – How to fix cmGLobalNInjaGenerator.cxx.o "cmake error?

I install a newer version of cmake, cmake 3.10.1, and the make command fails to create the CXX object source.

I have the Ninja 1.5.1 installed, but still get the same error.

used this to install the cmake
wget link from cmake3.10.1
./configure
make (an error is displayed at this stage)

the mistake is


[ 83%] Creating the CXX Source / CMakeFiles / CMakeLib.dir / cmGlobalNinjaGenerator.cxx.o object
/media/nadia/967E9B477E9B1F55/data/cmake-3.10.1/Source/cmGlobalNinjaGenerator.cxx: In the member function "void cmGlobalNinjaGenerator :: AppendTargetDependsClosure" (const cmGeneratorTarget *, cmNinjaOuts & b
/media/nadia/967E9B477E9B1F55/data/cmake-3.10.1/Source/cmGlobalNinjaGenerator.cxx:1077:40 Error: "class std :: map >>" does not have a member named "emplace_hint".
Source / CMakeFiles / CMakeLib.dir / build.make: 5942: Recipe for target & # 39; Source / CMakeFiles / CMakeLib.dir / cmGlobalNinjaGenerator.cxx.o & # 39; failed
do[2]: * [Source/CMakeFiles/CMakeLib.dir/cmGlobalNinjaGenerator.cxx.o] Error 1
CMakeFiles / Makefile2: 2355: The recipe for the target & # 39; Source / CMakeFiles / CMakeLib.dir / all & # 39; failed
do[1]: *
[Source/CMakeFiles/CMakeLib.dir/all] Error 2
Makefile: 162: Recipe for Goal & # 39; All & # 39; failed
do: *** [all] Error 2

16.04 – Telegram, Slack, Skype will not run when I put them on startup applications

I've run telegram, Slack, Skype on startup application Ubuntu 16.04

Enter image description here

However, the icon does not appear in the system tray (Notification Area). However, it will be displayed as a running application

    $ ps ax | grep skype
3854? SLl 1:59 / usr / share / skypeforlinux / skypeforlinux - executed by = / home / pujangga --pid = 3847
3864? S 0:00 / usr / share / skypeforlinux / skypeforlinux --type = zygote --no-sandbox
3985? Sl 1:33 / usr / share / skypeforlinux / skypeforlinux --type = renderer --autoplay-policy = no user gesture required --ms-disable-indexeddb-transaction-timeout --no-sandbox - service pipe token = EF831309DDA5DEFF9BDFE0351F93886A --lang = DE -US --app-path = / usr / share / skypeforlinux / resources / app.asar --node-integration = false --webview-tag = true --no-sandbox - --preload = /usr/share/skypeforlinux/resources/app.asar/ Preload.js --background-color = # fff --num-raster-threads = 4 --enable-main-frame-before-activating-enable-compositor -Image-animations --service-request-channel-token = EF831309DDA5DEFF9BDFE0351F93886A - renderer-client-id = 4 - shared-files = v8_context_snapshot_data: 100, v8_natives_data: 101 --skype process type = Main
9924 points / 16 S + 0:00 grep --color = Auto Skype

If I try to run Unity Dash, it will not start. I need to killall skypeforlinux to run it through the hyphen menu

16.04 – A logical volume has been deleted to free up space. Ubuntu is still looking for it at boot time. Do you need help?

While trying to free up space on my home media server, I deleted a logical volume from a Raid 5 array (MDADM). Now Ubuntu can not be loaded at boot time due to a timed mount of the deleted LV.

Running Ubuntu Server 16.04

There is another LV in the same volume group that is ok.

In recovery mode, everything is properly loaded and loaded (including the other LVs that are in the same VG). An attempt is then made to load the previously deleted logical volume (backup) and it times out, causing the boot process to fail. Failure.

I am then put into the "recovery mode", which is then immediately interrupted and the message "Welcome to emergency mode!"

Finally, when I scroll through the results of journalctl -xb, I see the following:

June 13 19:09:05 ubuntunas kernel: EXT4-fs (dm-2): file system mounted with ordered data mode. Options: (null)
June 13 19:09:05 ubuntunas systemd[1]: dev-DataVolume-Backup.device: Job dev-DataVolume-Backup.device / start has expired.
June 13 19:09:05 ubuntunas systemd[1]: Waiting time on device dev-Dataolume-Backup.device expired.
–Subject: Unit dev-DataVolume-Backup.device failed
–Defined-by: systemd

There are a variety of other messages that imply that loading this LV is a "dependency" …

Any suggestions for correction? I'm not very strong technically, so I really appreciate any help.

Many Thanks!
JonNoob

How to secure Apache with Let & # 39; s Encrypt Ubuntu 16.04




This tutorial will explore how to secure Apache with Let's Encrypt for the Ubuntu 16.04 operating system. We will first look at Let's Encrypt and the certification authorities for an overview. Then, step-by-step, we will provide instructions on how to install and configure Let's Encrypt on your Ubuntu 16.04 VPS servers and how to automatically renew SSL certificates.

Let us encode is a free, automated and open Certificate Authority (CA) that can help protect a website. Let's Encrypt also provides automation and tools to reduce the setup and maintenance tasks required to back up Web servers using HTTPS (SSL / TLS).


Let's Encrypt is free and makes it easy to create, configure, and renew certificates on Web servers (such as Apache).

Most administrators hosting web servers aim to attract new visitors while keeping the end users' attention – which often results in profits or a growing web site community. People who host web servers also want to lower maintenance and costs.

End users, on the other hand, are motivated to visit websites that are secure and do not compromise their security.

To satisfy both administrators and end users, a certification authority is used to verify the authenticity of the domain name of the web server.

Traditional CA (certificate authority) solutions, such as Verisign, require domain owners to pay a fee to use the CA services. This is no longer necessary when using Let's Encrypt. The Let's encryption service is funded by sponsors and donors.


  1. The web server administrator creates a private and a public key pair. With the public key, the site administrator creates a CSR (Certificate Signing Request) and sends it to a certification authority.
  2. The CA signs the CSR and returns a final certificate that the Web server administrator installs on its Web server.
  3. The final certificate is signed by the CA private key and contains metadata about the administrator's web server.
  4. When a website visitor visits the website, the visitor's browser downloads the final certificate from the web server. The visitor's browser contacts the certification authority to ensure that the certificate downloaded from the website is valid.
  5. If the CA confirms that the certificate is authentic / valid, the site visitor will receive a green padlock in the URL Address field in their browser. This informs the end user that the visit to the site is safe.

  1. You must be the administrator of the domain name to be backed up. For this tutorial we will use the DNS hostname "LetsEncryptTutorial.ddns.net".
  2. You must have your public IP address.
  3. You must install the Apache web server if it is not already installed.

  1. Update the package definitions for Ubuntu apt repository. Open a command line terminal and enter "apt-update". If you are not logged in as root, enter "sudo apt update".

  1. To install Apache: "apt install apache2 -y" or "sudo apt install apache2 -y"

  1. Go to the / var / www / html directory and make sure that an index.html file exists in the directory.

  1. Optional but recommended: Edit the default title index.html so that it is unique (example: tutorial website "Let's Encrypt") by adding the text "Let's Encrypt". NOTE: This is for confirmation only that the server is being resolved and you are not accessing cached pages.

  1. If you are using systemd for startup, restart apache "systemctl restart apache2" or "sudo systemctl restart apache2" if you use non-root user. If using init, run "service apache2 restart".

  1. Make sure Apache is running properly on your system. If you are using systemd, use "systemctl status apache2" and if you use init, use "service apache2 status"

  1. Make sure the modified default Apache Web site is now available through a web browser

First, make sure port 80 is open and working by calling the following URL:
http: //< apache_server_ip>: 80 (You should see your edited website)

Next, make sure the Web server's SSL port 443 is also open and working by doing the following:
https: //: 443

NOTE: If the server resolves in a browser over port 443, the address bar displays the error message "Not Encrypted" or "Not Secure." No problem.

Attention: If you can not successfully reach your Apache server on both ports 80 and 443, do not perform the following steps. If the server does not resolve either port, contact your network administrators to ensure that both ports are configured for web traffic.

Once we know that Apache resolves correctly, we can move on to the next section of this tutorial.


  1. Install the "apt-get install software-properties-common -y" general tools if you are logged in as root

  1. Add the apt component to install new repositories by running add-apt-repository universe.

  1. Add certbot to the list of apt repositories "add-apt-repository ppa: certbot / certbot"

  1. Update apt to see the newly added repositories: "apt update"

  1. Install certbot to create and renew certificates with let's encrypt: "apt-get install certbot python-certbot-apache -y"

  1. Run the certbot command to create SSL for your domain.

  1. Visit now https: // to verify that your new certificate is working properly and your website has a valid certificate. You will notice a green lock icon that confirms that a secure connection has been established with your Apache server. Click the green lock to get details about the SSL certificate.


It is strongly recommended that you automate the renewal of your certificate to avoid interrupting HTTP traffic due to an expired SSL certificate. For example; On the Apache server, you can create a cron job to renew the certificate with Cron every month on the 10th at 6:04 am. Enter "sudo crontab -e" and add the following line (below) below and save / exit the program.

4 6 10 * * certbot -apache -force-renewal renew -quiet


EOF




Setting up and configuring VestaCP on Ubuntu 16.04




VestaCP is a versatile open source control panel for Linux computers. It provides a clear point-and-click interface that simplifies server management tasks at the same time. In this tutorial, we will guide you through the process of installing, configuring, and using this free and open source webhosting control panel for the first time.

As part of the installation, VestaCP will install and configure the following for you:

  • Apache Web server with nginx as frontend. Nginx will provide static files (such as images and CSS) while Apache renders PHP and HTML files.
  • vsftpdan FTP server
  • Exim and dovecoteto create and use e-mail accounts
  • MySQL Database
  • Softaculous, an auto-installer for applications

It requires 512 MB RAM, 1 GHz CPU and 20 GB hard disk space.

In this article, you install VestaCP on your VPS. Then, in VestaCP, set up a new site with an email address (in your domain).

  • A clean VPS on Ubuntu 16.04 with at least 512 MB RAM, 1 GHz CPU and 20 Gb hard disk space.
  • A domain name for the hosting of VestaCP and your websites that points to the IP address of your computer with your DNS provider. We will use panel.example.com for Vesta and test.example.com for the website throughout the tutorial.
  • If you want to set up e-mail accounts, the PTR entries for your server must be set correctly. This can only be done by your hosting provider.

First log in to your VPS as root about SSH. After signing in, navigate to / tmp Directory by executing the following command:

CD / tmp

Then download the VestaCP installation script by doing the following:

lure -O http://vestacp.com/ pub /vst-install.sh

Run it with:

bash VSTinstall.sh --Makes

The -Makes The parameter overrides the warnings of Vesta like Apache, which is already installed Administrator Group already exists in the system and so on. The warning might look like this:

With the -Makes This option takes you directly to the installation prompt:

Answer with me y, You will be asked to provide your e-mail address and an FQDN host name. Enter an e-mail address where you want to receive messages from Vesta, and enter the domain name you set up in the prerequisites as your host name.

Vesta will then start the installation and it will take about 15 minutes for the process to complete. You do not have to enter anything else. When it's done, you'll see a message that looks like this:

Write down the username (Administrator) and the generated password – you need them to sign in to Vesta.

Step 2 – Sign in to Vesta

In your web browser, navigate to the domain that appears in the message. Note that : 8083 at the end of the address – this is the default port for accessing Vesta.

During installation, Vesta created a self-signed certificate to allow HTTPS access. Because of this, your browser may display a warning that TLS certificates are self-signed. In the case of Mozilla Firefox, this looks like this:

In the case of Chrome, the message is:

Continue with the advanced section alerts and create an exception for your browser.

You will be asked to log in:

Enter the previously noted credentials and click the Sign In button. You will see the Vesta Control Panel:

Notice the columns in the middle upper part of the screen. They provide access to Vesta's key features-managing users, their websites, DNS records, email addresses, databases, and backups.

Step 3 – Create a new user

After installing Vesta, exactly one user is called Administratoras shown in the picture above. Adding a new user is a common task in setting up Vesta because you need a new user for each new site you create.

If you want to create a new resource in Vesta (be it a user, domain, or whatever), you'll need to click on the green plus icon, which will be extended with additional text when you hover over it.

To add a new user, press the green plus button on the user Page. You will see the following form:

Add VestaCP users

Fill in the user name and password with your desired credentials, the first and last name with your name and enter your e-mail address. When done, scroll down and press Add.

Vesta will then display the same page you were on earlier. The message informs you that the user was created successfully. For a user named Example usersThis is the message:

For every available user you have the options like log out. To edit. expose, and Clear, They only appear when you hover over the line, and they look like this:

Step 4 – Create a new website

Click on the link to log in as a newly created user. If you are logged in, click network Pillar. Press the green plus button to create a new website.

Enter the domain name – ours is test.example.com, As stated in the requirements, you must first refer the domain name to the IP address of your server. For instructions, contact your DNS provider.

FTP access

To access files in your site, you must create an FTP user for it. To do this, press Advanced Options and enable the additional FTP option. Then enter the user name for the new FTP user (the maximum secure length is 8 characters) and a password. You can click Generate for Vesta to create one for you. Make a note of this so that you can refer back to it later, since you will now be able to access the files on your website. If you want to create an additional FTP user, click Add One More FTP Account and try again.

Enable HTTPS

If you want to (and certainly do) HTTPS for your site, check the box SSL support Possibility.

You then need to fill in the required fields with the data you received from your certificate issuer, or automate the entire process for free by enabling Lets Encrypt Support. Let's Encrypt is a trusted certification authority that issues fully free certificates in the last 90 days. You can enable this option if you have installed Certbot on your system (the program that actually requests the certificates). Vesta creates and renews them for you. Keep in mind that adding Vesta to the new website takes longer. Do not press the "Add" button twice.

Tracking site statistics

With VestaCP you can also set up both Webalizer or awstats Web statistics software. Note that Webalizer does not differentiate between human visitors and bots in its reports, whereas awstats tries to do so.

When finished, click Add to create the website in Vesta. When the page loads, the new site will appear in the list. When you navigate to your domain in your browser, a placeholder page created by Vesta will be displayed with the domain name.

Step 5 – Create an e-mail account

Click on that Mail Column in the middle. To create an e-mail address, you must first add an e-mail domain in Vesta. Then you can create an unlimited number of e-mail addresses. As in the previous steps, start adding an e-mail domain by clicking the green plus icon.

You only have to enter a domain name. Keep anti-spam and anti-virus options enabled to increase security at no extra cost. When you're done, click the Add button.

As in the case of userHovering over it displays additional options. Click the List Account button to list the existing email accounts for this domain. Otherwise, click Add Account to add a new email address (account).

Enter your desired e-mail address (without the @ domain part) in the Account field. Then enter your desired password or let Vesta create it by clicking Generate. The final configuration will be shown in the adjacent box.

If you want to set a storage quota or set up e-mail forwarding, click Advanced Options and enter the appropriate information. When done, press Add.

You return to the list. Vesta shows you a success message that looks like this:

You can click the Open Webmail link to open Roundcube. Roundcube is a mature open source webmail software used by many. You will be asked to sign up. Enter the complete email address you just created as a username and password, then click Sign In. In Roundcube you can read and write e-mails as usual.

Dusko Savic is a technical writer and flutter programmer.
duskosavic.com




Apache – Error redirecting from http to https Apache2 in Ubuntu 16.04 in Amazon EC2

Hello, I'm telling you, I'm trying to redirect my website from http: // to https: //.
I'd like to redirect it via Apache, but I can not get the redirect going.
I'll tell you a little bit about what I've done to see if it helps.

The virtual host is an Amazon EC2. Ubuntu 16.04 with apache2 + php + mysql + phpmyadmin.

On the next route, I understand that there are the Apache settings for the sites / etc / apache2 / sites-available

In this folder I find two files
the 000-default.conf and default-ssl.conf
I understand that one is the normal configuration file and the other is the ssl file. the ssl was activated by the command sudo a2enmod ssl and then sudo a2ensite default-ssl.conf

The domain certificate is configured through the Amazon certificate, and I have created a load balancer that can be accessed through the http and https ports.

At this point, I went to the file /etc/apache2/sites-available/000-default.conf where I assume it is due to the prinpial configuration of the port * 80.

At first I did that without touching it.


       
        
       
        
       
        
       
        ServerAdmin webmaster @ localhost
DocumentRoot / var / www / html / public

ErrorLog $ {APACHE_LOG_DIR} /error.log
CustomLog $ {APACHE_LOG_DIR} /access.log combined


and then I created I have added the following code before the default configuration.


  
  
  
  Server name yourdomain.com
Also known as www.yourdomain.com
Redirect permanently / https://www.yourdomain.com/





        

        

        

        ServerAdmin webmaster @ localhost
DocumentRoot / var / www / html / public


ErrorLog $ {APACHE_LOG_DIR} /error.log
CustomLog $ {APACHE_LOG_DIR} /access.log combined

  

PS: I've also tried deleting the initial configuration, leaving only the redirection code, but not doing anything.

I leave the default ssl.conf pro code if it works for you
if someone can help me, thank you in advance.


        
                
                
                
                ServerAdmin webmaster @ localhost

DocumentRoot / var / www / html / public

ErrorLog $ {APACHE_LOG_DIR} /error.log
CustomLog $ {APACHE_LOG_DIR} /access.log combined

SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

                
                                SSLOptions + StdEnvVars
                
                
                                
                                
                                
                                SSLOptions + StdEnvVars
                

	








# vim: syntax = apache ts = 4 sw = 4 sts = 4 sr noet

networking – Download Speed ​​on Ubuntu 16.04 LTS

I am relatively new to Linux and run an HP Proliant G6 ML350 Server for Plex, Sonarr and Radarr. Connected via LAN.

I have a problem with the download speed. It seems like speed is limited on the server itself.

I ran the server over a VPN to eliminate throttling, but all I've done has been to further reduce the speed.

When running speedtest-cli I reach a download speed of about 240 MB / s. Which is what I should get.

The problem is with wget and sabnzbd, they tend to get between 17 MB / s and 28 MB / s maximum.

Could someone help please?

Many Thanks

How to install and configure Postfix on Ubuntu 16.04




In this tutorial, you will learn how to install and use Postfix, an open-source mail transfer agent. With Postfix, you can send and receive emails and send them through third-party SMTP servers, such as gmail.com.

What we will treat

  • Create a user who sends and receives emails
  • Interactive installation of Postfix
  • Configure Postfix via the main.cf file
  • Set up mailbox for Postfix
  • Set up the virtual map file
  • Add a firewall rule to enable Postfix
  • Mail location (in which folder the mail files are located)
  • Check the postfix status
  • Using Postfix over TELNET
  • Install mail client
  • Working with the mail client

requirements

We will install and configure Postfix on Ubuntu 16.04:

  • Starting with a clean VPS with
  • At least 512 MB of RAM and
  • 15 GB of free space.
  • You need root user access and
  • DNS records for your domain must already exist, especially for PTR and MX.

Step 1: Create a non-root user

Once you are logged in as rootYou can create a new user account that receives and sends emails to and from Postfix. To create a user named postfixuserRun the following command:

adduser postfixuser

Then add it to the sudo group so you can execute commands as sudo:

usermod -aG sudo postfixuser

Step 2: Interactive installation of Postfix

Postfix is ​​very easy to install. First, update the system cache and immediately immerse yourself in the installation.

sudo apt update
sudo apt install postfix

You will be guided through a series of three screens to define basic parameters for Postfix. Press the Tab key on the keyboard to move the cursor to the OK button, then press Enter.

The first screen explains the choices you have, but you can actually select them on the next screen.

Choose an option Website,

For the above screen (email name), enter the correct name of your domain, which you have previously set up with your DNS registrar.

Step 2A (optional): Full interactive installation of Postfix

There is another command to install Postfix:

sudo dpkg-reconfigure postfix

The first three screens are also displayed. Then the following screens are displayed for more detailed control:

Enter the name of the user who should receive e-mails for the system administrator.

On this screen, you define the final destination of the e-mail. Select Ok, as the options offered are good enough.

On this screen, select No because you are using a journaling system for data.

Select OK to accept the defaults in the screen above.

Select Ok again to select 0 for the postfix file limit.

You can select the character that defines the local address extensions – just click OK.

Use the vertical cursor keys to select one of the three values. Choose Everything,

This was the last screen in the postfix interactive installation.

Step 3: Configure Postfix via the main.cf configuration file

The main configuration file for Postfix is ​​located at / etc / postfix / main / cf, Open it for editing with this command:

sudo nano /etc/postfix/main.cf

and you will see the following:

You recognize values ​​that we entered during the manual installation.

If you change something in this file, run the following command:

/etc/init.d/postfix reload

For the new values ​​to take effect.

Load new aliases and enable and restart the Postfix service so that it is always available:

sudo newaliases
Enable sudo systemctl postfix
sudo systemctl restart postfix

Step 4: Set up Mailbox for Postfix

Once the e-mail messages arrive, they can be saved as separate files or in a large file. The former option is known as Maildir Format while the latter is known as mbox Format. To indicate that we are using the Maildir format, we need to change the value of the parameter At homemailbox_ in the file main.cf.

One way to do this is the Nano Editor. The other is to use the following command:

sudo postconf -e & # 39; home_mailbox = Maildir / & # 39;

postconf is a program that changes main.cf "from the outside", parameter by parameter.

Step 5: Set up the virtual map file

We will now connect email addresses with users on your VPS. We have already created a user named postfixuserConnect them now with two e-mail addresses: info@example.com and office@example.com, Change this generic name example.com on your actual domain name.)

Postfix keeps connections in the file / etc / postfix / virtual and there is a parameter virtual_alias_maps in the config file change. Taken together:

sudo postconf -e & # 39; virtual_alias_maps = hash: / etc / postfix / virtual & # 39;

Then open this file in nano:

sudo nano / etc / postfix / virtual

Add the following lines to configure the addresses:

postfixuser@example.com postfixuser
office@example.com postfixuser

To notify Postfix of these changes, restart the process:

sudo postmap / etc / postfix / virtual
sudo systemctl restart postfix

Step 6: Modify the firewall rules to enable Postfix

If you are using a firewall, you must configure it to allow postfix and e-mail. Firewall called & c (uncomplicated firewall) should already be installed on Ubuntu, so you can add Postfix with just one line:

sudo ufw allow Postfix

If ufw does not exist, first install it with these two commands:

sudo apt install ufw

sudo ufw activate

After installation, you would need to specify ALL ports to be operational:

sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
sudo ufw allow 20 / tcp
sudo ufw allow 21 / tcp
sudo ufw allow Postfix
sudo ufw activate

WARNING: If you omit rows with ssh. http. https etc. You can NOT log in to your VPS server! you are highly recommended To investigate the ports your hosting provider can rely on and include them in the list above.

Step 6: E-mail Location

The mail location should be updated everything Users know about it. There are two places where we need to add the new location: /etc/bash.bashrc and /etc/profile.d/mail.sh,

You can change both files with the following command:

echo & # 39; export MAIL = ~ / Maildir & # 39; | sudo tea -a /etc/bash.bashrc | sudo tee -a /etc/profile.d/mail.sh

It is added export MAIL = ~ / Maildir to these files at the end of each.

To see the result, execute

sudo cat /etc/bash.bashrc

and see export MAIL = ~ / Maildir as the last statement in the file:

The same applies /etc/profile.d/mail.sh:

sudo cat /etc/profile.d/mail.sh

At startup, Ubuntu reads and executes any files ending with .sh in the /etc/profile.d/ folder. Instead of rebooting your VPS, run

Source /etc/profile.d/mail.sh

reload mail.sh in the current session.

Step 7: Switch to a specific user

This is a simple command, but it will save you many hours debugging. We switch to a specific user and send and receive emails. If you try to do this root You will most likely get this error:

Can not canonize "/ root / Maildir"

The way out is to switch to a non-root user, as follows:

su postfixuser

Step 8: Check Postfix Status

execute order

sudo postfix status

will tell us if Postfix is ​​running or not. A typical output would be:

If it is not running, restart it:

sudo postfix start

Step 9: Use Postfix over TELNET

We have Postfix installed and configured, but is it working right?

Assuming port 25 of your VPS is open, we can test Postfix with a service called TELNET.

telnet localhost 25

Here is a typical edition that you will see:

The line beginning with 500 is an error, because I purposely hit the Enter key. Telnet expects you to enter an e-mail line by line:

ehlo localhost
Email from: root @ localhost
rcpt to: fmaster @ localhost
dates
Subject: My first mail on Postfix

Hello,
How is your day?
I hope it's all right!

Administrator
,
leaving

A dot at the end signals the end of the input and leaving In the last line we return to the terminal command line.

With everybody leavingYour message will be queued, ie sent as an e-mail.

Step 10: Install a Mail Client

To see e-mails and do something with them, we need to install an e-mail client. There are several applications to consider that are most popular slug and mailutils, They all lead to the same virtual package mailx, and all are activated by command mail in the command line.

command

sudo apt install mailutils

will give us a command mail utility.

Another competitor, s-nail, can be installed with the following command:

sudo apt install s-nail

Open the configuration file s-nail.rc:

sudo nano /etc/s-nail.rc

Then add the following lines at the end of the file:

set emptystart
set folder = ~ / Maildir
set record = + sent

Step 11: Working with the Mail Client

Let's send our first email about that mail Command:

echo & # 39; init & # 39; | mail -s & # 39; init & # 39; -Snorecord postfixuser

From this picture

we see that we first had four messages (sent over Telnet in my case) and that we have five messages in the folder after executing the above command. This means that Postfix and the mail program are working properly.

The question mark at the beginning of the line means that we can enter commands to the mail client, for example:

  • enter – Show the message,
  • H – go back a message,
  • d – delete current message,
  • File + sent – message that was sent
  • q – leave the terminal.

It is also possible to send messages mail, like this:

Echo "Beginning" | mails & # 39; Great News Ahead & # 39; example@example.com

The message will be sent, but you will most likely notice first that you have received new messages:

When you open the message, it explains what went wrong. Number 550 for mistakes can mean something like that

  • Verification failed
  • Unrouteable address
  • Verification of the sender failed

The incoming server has tried to see who is sending emails and has refused to accept it without any additional information. This is to be expected in times of spam worldwide.

What do you do next?

You have now run Postfix and one or two e-mail clients. They are all command-line based and are only for administrators. Your users need a graphical interface to send emails. For this we need not only Postfix, but also some additional programs. One such program for SMTP transmission is Dovecot, or you can connect Postfix to a service such as gmail.com to send an e-mail from a proxy address.

Dusko Savic is a technical writer and flutter programmer.

duskosavic.com