Yakim.org.ua Linux tips and tricks

  • Skip to content
  • Jump to main navigation and login

Nav view search

Navigation

  • Home
  • Services
  • Contacts

Search

  • Українська (Україна)
  • Russian (Russia)
  • English (United Kingdom)

RSS

feed-image Rss
  • Home
  • Servers
  • Workstations

Home

Sshd does not start after install

  • Print
Details
Category: Servers
Published: Thursday, 18 November 2021 12:58
Written by Super User
Hits: 727

This has never happened, and then, suddenly, again ... When installing Ubuntu server on VirtualBox at first everything went fine, but after installing sshd the service did not start

The output of journalctl -xe did not show anything specific

Read more: Sshd does not start after install Add new comment

Working with EXIF-data in jpg, png, and webp files

  • Print
Details
Category: Servers
Published: Thursday, 10 December 2020 16:03
Written by Super User
Hits: 1438

Almost all image files have the ability to store additional data, such as image size, creation time, geo-coordinates and so on.

It is also possible to add additional parameters - description, copyright and more.

There are EXIF data

Exchangeable image file format - a standard that defines the format of the description of auxiliary meta-information for image and sound files and used by digital cameras (including those in smartphones), scanners and other systems.

By the way, there is insufficient evidence that search engines use exif-image data on sites to rank the site and search optimizing.

Now let's see how to add or change EXIF-data

Read more: Working with EXIF-data in jpg, png, and webp files Add new comment

Monitoring the site certificate with Nagios

  • Print
Details
Category: Nagios
Published: Thursday, 25 June 2020 16:13
Written by Super User
Hits: 1651

If you have a site, there is a need to control the validity of the certificate. I already use Nagios for monitoring, so let them control the certificates.

Read more: Monitoring the site certificate with Nagios Add new comment

Hide passwords with Steghide

  • Print
Details
Category: workstation
Published: Tuesday, 21 April 2020 20:21
Written by Super User
Hits: 1784

StegHide hides data in picture and sound files, where not all bits in the byte are used. Since the data is encrypted, it is very difficult to prove its presence. The only problem with sizes - to hide megabyte of encrypted data, you will need audio or picture file sizes of several megabytes.

Read more: Hide passwords with Steghide Add new comment

Part 16. Plus addressing. Types of mailing addresses

  • Print
Details
Category: Mail Server
Published: Friday, 27 December 2019 11:37
Written by Super User
Hits: 6383

The list of articles cycle

Support plus addressing for mail server

If there is a need to support the plus addressing on the mail server, then it will be necessary to customize our system.

In the Postfix configuration file - /etc/postfix/main.cf you must add a line

recipient_delimiter = +

if we have Dovecot in the role of LDA, we need to make additional settings. First in the file /etc/dovecot/conf.d/15-lda.conf should add or uncomment the line:

recipient_delimiter = +

And in the /etc/postfix/master.cf file, we need to modify our dovecot filter.

It should look like this:

# Dovecot LDA

dovecot unix - n n - - pipe

flags=DRhu user=virtual:virtual argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -a $original_recipient} -d ${user}@${nexthop}

Read more: Part 16. Plus addressing. Types of mailing addresses Add new comment

Part 15. Manage messages in Dovecot. Sieve

  • Print
Details
Category: Mail Server
Published: Tuesday, 17 December 2019 14:11
Written by Super User
Hits: 2134

The list of articles cycle

To manage messages in Dovecot enabled Sieve.

Sieve — this is a language for describing filtering rules for messages. It was created by Cyrusoft International, Inc./ISAMET while working on the mail server Cyrus. By writing scripts with mail processing it is possible to:

  1. automatically sort messages in mail folders based on certain attributes (sender, subject and others).
  2. Automatically delete messages based on certain attributes
  3. set up automatic vacation on certain emails

 

Email processing should take place before the email gets into the user's mailbox. In our previous settings, In our previous settings, the local delivery agent (LDA) is Postfix itself. To connect the Sieve extension, you need to translate this function into Dovecot.

Read more: Part 15. Manage messages in Dovecot. Sieve Add new comment

Compose settings for entering non-standard characters

  • Print
Details
Category: workstation
Published: Sunday, 11 September 2011 13:30
Written by Super User
Hits: 1966

When typing texts is often necessary to use characters that are not present in your layout, or not presen on keyboard at all. For example, typing something like ¼ or ‰ is a non-trivial task. Of course, you can use a character table and just copy everything from there. But it is good when the desired character is entered 1-2 times. And what to do if you need it constantly? This is where the Compose key comes to the rescue.

 

The compose key is also known as "Multi_key" at the X Window System. In X.Org Server, many keyboard layouts provide different options for the location Multi_key, commonly used in PC-compatible architectures.

You can assign this key in different way. For example, using XkbOptions ("compose: rwin"). In my Kubuntu it can be done in Kmenu-Computer-System Settings-country/region/language. I assigned a button to the Compose key that I never use - CapsLock.

Now let's go through the settings step by step

Read more: Compose settings for entering non-standard characters Add new comment

Part 14. DNS configuring for the mail server. SPF, DKIM, DMARC

  • Print
Details
Category: Mail Server
Published: Monday, 09 September 2019 14:14
Written by Super User
Hits: 2300

The list of articles cycle

 

For correct operation of the mail server requires correct DNS configuration.

In our domain zone, at least, we must have MX records. It is also desirable to create the reverse record, SPF, DKIM and DMARC

 

Basic DNS settings

In order for other servers to know that our server is accepting mail for our domain, the following settings must be created in the zone description:

  1. Create an A record for our server (forward zone)
  2. Create MX record specifying priority and with our domain name
  3. Send request to the provider, hoster, or other entity that provided us with an IP address, requesting to provide a reverse zone (PTR-record) for our IP address with the name from the forward zone.
Read more: Part 14. DNS configuring for the mail server. SPF, DKIM, DMARC Add new comment

Part 13. GreyListing.

  • Print
Details
Category: Mail Server
Published: Wednesday, 14 August 2019 15:27
Written by Super User
Hits: 3285

The list of articles cycle

The work of gray lists is based on the fact that spammers in case of sending errors often do not send the letter a second time, and legitimate mail servers will try to send a letter for at least two days.

When the message is received for the first time our server returns an error 450 (message not accepted due to a temporary error) and terminates the session,

After a specified timeout (default 300 seconds) the message will be accepted and address of the sender server will be temporary whitelisted. The server will stay in this list for 35 days since the last successful session by default

 

Let’s install the necessary software

# apt install postgrey

Read more: Part 13. GreyListing. Add new comment

Part 12. SpamAssassin Antispam

  • Print
Details
Category: Mail Server
Published: Monday, 05 August 2019 15:18
Written by Super User
Hits: 2855

The list of articles cycle

SpamAssassin installing

To install anti-spam, execute the command:

# apt install spamassassin

 

The program will not work after installation. It is disabled by default. To activate it, it is necessary to change the value enable to 1 in /etc/default/spamassassin file.

Read more: Part 12. SpamAssassin Antispam Add new comment

Part 11. ClamAV Email Anti-Virus configuring

  • Print
Details
Category: Mail Server
Published: Thursday, 18 July 2019 14:27
Written by Super User
Hits: 2155

The list of articles cycle

Install the antivirus system for the mail server:

#apt install clamsmtp

Read more: Part 11. ClamAV Email Anti-Virus configuring Add new comment

Part 10. Working with a mail server using telnet

  • Print
Details
Category: Mail Server
Published: Thursday, 11 July 2019 12:14
Written by Super User
Hits: 2575

The list of articles cycle

After we have configure the mail server, it is necessary to check its work. Of course this can be done using a mail client, but sometimes easier and faster to do it with the utility telnet.

Read more: Part 10. Working with a mail server using telnet Add new comment

Part 9. Encrypt mail traffic

  • Print
Details
Category: Mail Server
Published: Thursday, 04 July 2019 13:33
Written by Super User
Hits: 1907

The list of articles cycle

 

It's quite dangerous to use unencrypted traffic on the mail server.This is not due to the interception of emails, but to the fact that an attacker can intercept a user's login and password from a user and use this information to send spam messages.

Encryption uses SSL certificates. If we can buy a certificate from a certification authority - then buy, if not, generate self-signed certificate. This is done by the command:

openssl req -new -nodes -x509 -out smtpd.pem -keyout smtpd.pem -days 3650

Read more: Part 9. Encrypt mail traffic Add new comment

Part 8. Set up mail server authentication through the OpenLDAP

  • Print
Details
Category: Mail Server
Published: Wednesday, 26 June 2019 11:06
Written by Super User
Hits: 3131

The list of articles cycle

OpenLDAP is an open implementation of LDAP, developed by the OpenLDAP project, distributed under its own free OpenLDAP Public License.

OpenLDAP consists of three main components:

  • slapd - an independent LDAP daemon and related overlays and tools;
  • libraries that implement LDAP protocol;
  • utilities, tools and auxiliary clients
Read more: Part 8. Set up mail server authentication through the OpenLDAP Add new comment

Part 7. Alternative methods for storing user settings. Using Windows AD.

  • Print
Details
Category: Mail Server
Published: Friday, 21 June 2019 16:12
Written by Super User
Hits: 2051

The list of articles cycle

In large organizations, mail servers and other services are often integrated with the Windows AD

Assume that we have Windows domain named the study.local and there is a special user mailadmin with the password mailadmin. And he has permissions to read from the LDAP tree. The domain controller has the address 192.168.0.10. Domain users must have aт attribute “mail” filled in. It should contain the mailing address of the user. Domain groups are created to work with mail aliases. They also fill in the attribute “mail”. Letters that arrive to such groups must be forwarded to all users who are their members.  

Read more: Part 7. Alternative methods for storing user settings. Using Windows AD. Add new comment

Part 6. Alternative methods for storing user settings. Using MySQL.

  • Print
Details
Category: Mail Server
Published: Thursday, 13 June 2019 13:48
Written by Super User
Hits: 2117

The list of articles cycle

 

User accounts can also be stored in the database. You can use PostgreSQL or Mysql for it.

 

Let’s use MySQL as a more popular option

 

Mysql configuring

Read more: Part 6. Alternative methods for storing user settings. Using MySQL. Add new comment

Part 5. Mail traffic routing. Authorization on a upstream server.

  • Print
Details
Category: Mail Server
Published: Tuesday, 21 May 2019 11:50
Written by Super User
Hits: 2142

The list of articles cycle

Typically, you do not need to configure mail traffic routing. All messages will be routed automatically, according to MX records in the DNS of the recipient domain. But there are exceptions to this rule. Using the transport_maps option, you can explicitly specify the server to which the mail will be sent for the specific domain.

Read more: Part 5. Mail traffic routing. Authorization on a upstream server. Add new comment

Part 4. Set up the automatic creation of hidden copies of messages.

  • Print
Details
Category: Mail Server
Published: Friday, 19 April 2019 15:49
Written by Super User
Hits: 3180

The list of articles cycle

Sometimes it is necessary to create copies of messages and send them to another address. For this purpose, Postfix has a mechanism for creating hidden copies (bcc – blind carbon copy)

You can create these copies based on the sender or recipient addresses. To do this, you can use the sender_bcc_maps or recipient_bcc_maps parameters in the main.cf file.

Read more: Part 4. Set up the automatic creation of hidden copies of messages. Add new comment

Mail Server Configuring. Content

  • Print
Details
Category: Mail Server
Published: Friday, 19 April 2019 15:44
Written by Super User
Hits: 2727

I decided to create a separate article with contents of all articles from the  Mail Server cycle.

I will write the full content and links will be inserted as far as publishing new articles

 

Read more: Mail Server Configuring. Content Add new comment

Mail server configuring. Part 3. RoundCube Webmail

  • Print
Details
Category: Mail Server
Published: Thursday, 11 April 2019 12:22
Written by Super User
Hits: 2335

The list of articles cycle

Mail web client RoundCube

RoundCube Webmail is a web-based IMAP email client. Roundcube's most prominent feature is the pervasive use of Ajax technology. After about two years of development, the first stable release of Roundcube was announced in early 2008. Roundcube is written in PHP and can be employed in conjunction with a LAMP "stack", or any other operating system that supports PHP are supported as well.

Roundcube is free and open-source software subject to the terms of the GNU General Public License (GPL) with exceptions for skins and plugins.

Read more: Mail server configuring. Part 3. RoundCube Webmail Add new comment

Mail server configuring. Part 2. Additional rules for mail filtering. DNSBL

  • Print
Details
Category: Mail Server
Published: Friday, 29 March 2019 10:48
Written by Super User
Hits: 3301

It is the second article from the "Mail Server Settings" cycle.

The list of articles cycle

 

Read more: Mail server configuring. Part 2. Additional rules for mail filtering. DNSBL Add new comment

Mail server configuring. Part 1. Installation and basic configuration for Postfix and Dovecot.

  • Print
Details
Category: Mail Server
Published: Thursday, 21 March 2019 11:28
Written by Yakim
Hits: 3117

I'm starting to publish a series articles about Postfix and Dovecot mail server configuring.

Today will be the first part - Installation and basic configuration of Postfix and Dovecot.

The list of articles cycle

Read more: Mail server configuring. Part 1. Installation and basic configuration for Postfix and Dovecot. Add new comment

Postfix Mail Server Reporting

  • Print
Details
Category: Mail Server
Published: Monday, 21 January 2019 14:34
Written by Super User
Hits: 3367

I have a postfix-based mail server and SpamAssassin as an antispam. There was a task to view statistics  to analyze the effectiveness of antispam and the mail server settings.

Read more: Postfix Mail Server Reporting Add new comment

MDAdm. Working with RAID in Ubuntu

  • Print
Details
Category: Servers
Published: Monday, 21 January 2019 14:00
Written by Super User
Hits: 2804

Sometimes when configuring servers you must configure RAID.

On branded servers they are often harware, but nonetheless, they often have to deal with a software raid.

Read more: MDAdm. Working with RAID in Ubuntu Add new comment

Change network card MAC address

  • Print
Details
Category: Servers
Published: Monday, 21 January 2019 13:45
Written by Super User
Hits: 2355

Some ISPs provide get access to the Internet only for a specific MAC address.

You can manually change the MAC address and do not communicate with the provider for the change settings.

Read more: Change network card MAC address Add new comment

Laptop as a wifi access point

  • Print
Details
Category: workstation
Published: Sunday, 29 January 2012 10:14
Written by Super User
Hits: 2663

I know that it is possible to make an access point from a wi-fi card. Now I tried to set it up. Here is a description of my actions step by step.

I have old laptop Acer Aspire 5315.

OS— Kubuntu 11.10

Wi-Fi-card— Atheros. That's what lspci says about it

Ethernet controller: Atheros Communications Inc. AR242x / AR542x Wireless Network Adapter (PCI-Express) (rev 01)

 

Of course it have ethernet card too.

Let`s go...

Read more: Laptop as a wifi access point Add new comment