Archive

Archive for the ‘Uncategorized’ Category

How to prevent Email blacklisting

August 9th, 2022 No comments

Mails can bounce back with the message ” Your message is blocked for low reputation”, or similar. If you wonder: it is likely that your e-mail landed on an e-mail server blacklist! This happens when your domain/mail server IP is blacklisted by any 3rd party anti-spam agency. Eg: Spamhaus, RBL, CBL, etc. Also, many mail servers reject such emails outright if the mails look suspicious and have a probability of being spam mail. Your mail can be flagged for spam and get rejected.

This can even happen if your are not a spammer and if your e-mails have no bad intention. If your e-mails are blocked due to blacklisting there are things you can do to remove your mail address from the list. We give you some information about that further below. However, more important, we like to give you some hints how you can avoid that your e-mail address is putted on a blacklist:

What steps to take to keep away from blacklists?

In order not to be taken for a spammer, prevent as act like one 😉 Here are some items you may consider to make sure to send mails which are not suspicious:

There are lots of emails sent from your mail address/domain in a relatively short time spam. This can cause your mails to get flagged and get blocked for mass mailing.
Your mail subject or body contains suspicious words or strings which are frequently used by spammers. Eg: ‘viagra’, ‘buy now’, ‘lowest prices’, ‘click here’, etc. Also, mails with blinking text, flashy fonts, etc are flagged by antispam tools.
You are sending from a mail server that has been blacklisted in past. This can easily trigger a spam flag as your sending IP has a low reputation. In this case, you can try using another SMTP server to send emails or ask your host to change the SMTP server IP
Bulk mailing without authenticated SMTP server can also cause mails to get blocked. Using PHP mail() function is now rejected by many mail servers. Mail sent using PHP mail() was mostly abused by spammers in past. You must use an SMTP mail server with authentication to send mails.
Mails which does not contain valid ‘unsubscribe’ links and ‘From’ address are also flagged as suspicious emails. Having too many CC recipients must be avoided.
Ensure your domain has valid SPF, DKIM and DMARC records. The absence of these records reduces the level of trust of the mail sender.
Also to check your spamminess, you can use e.g. this tool https://www.mail-tester.com/. This will give you information why your mail is getting rejected or lands in the spam folder – however since this is a third party tool, Servage cant give any guarantee for this service.

How to get off blacklists?

The bounce back notification will give you some information about whether your e-mail IP is blacklisted. You can use various tools online to check if you are blacklisted. One such popular tool is:

https://mxtoolbox.com/blacklists.aspx

If you found out that your email IP or domain appear on any of the blacklists, your first step should be to check the unlisting process for a particular blacklist. Usually the blacklister gives information about the unlist process on their webpages. If you need help with this matter, you are always free to contact the Servage support. You can easily open a support ticket via your Servage control panel and let us know what e-mail address is concerned and what bounce back notification you received.

Run rsync if not running using cronjob?

April 9th, 2022 Comments off

I want to rsync files from one server to another server every 5 minutes, but only want to start the rsync if the previous rsync command has finished. Time for one rsync depends on how much data changed on the source server, so the time taken to finish rsync cronjob varies.

Create file rsync.sh

#!/bin/bash

if ! pgrep -x "rsync" > /dev/null
then
    rsync -avzP /var/www/html/files/  root@m1.serverok.in:/var/www/html/files/
fi

Set cronjob like

*/10 * * * * /root/rsync.sh > /dev/null
Categories: Uncategorized Tags:

How to Flush DNS Cache in macOS, Windows, & Linux

December 16th, 2021 Comments off

Introduction

DNS cache can be corrupted for a number of different reasons, including network attacks or viruses. When that happens, IP address mapping becomes corrupted for certain popular websites.

For example, instead of going to www.facebook.com, your browser may redirect you to an IP address of a malicious website that an attacker inserted in your computer’s DNS records. Or, you may get a large number of 404 errors.

Clearing DNS cache deletes all saved DNS lookup information. Your computer then gets updated data from DNS servers next time it sends a lookup request. Learn how to flush DNS on in macOS, Windows, & Linux below.

What is DNS Cache?

Linux, Windows, and macOS save name resolution information in the form of DNS cache. This speeds up project load times since the cache contains IP addresses for the queried domains. Instead of having to reroute to DNS servers, the system answers queries from the cache.

The DNS cache contains the following information:

  • Resource data
  • Record type
  • Record name
  • TTL (time to live)
  • Class
  • Resource data length

How To Flush DNS Cache on Mac

There are a few different commands to use for flushing DNS cache on OS X and macOS depending on the version you are running.

As the procedure is the same on all versions, this article details how to clear DNS on macOS Mojave (10.14) and then list the commands for other versions in a table.

Flush DNS on macOS Mojave (version 10.14)

To clear DNS cache on macOS Mojave, use the Terminal application:

  1. Run terminal.app using your preferred method. You can launch the app from Applications -> Utilities or press Command + Space to launch Spotlight and search for Terminal.
  2. Type in sudo killall -HUP mDNSResponder and hit Return on your keyboard.
  3. Enter the for the administrator password account in question and hit Return.

There is no notification when the process finishes. However, you can append another command to change that.

Flush DNS Commands on Older macOS and Mac OS X Versions

The table below lists the commands for clearing the DNS cache on most macOS and Mac OS X versions. You can copy and paste them directly from the table into your terminal.

Mac OS X or macOS versionTerminal Command
Mojave (version 10.14)
High Sierra (version 10.13)
Sierra (version 10.12)
Mountain Lion (version 10.8)
Lion (version 10.7)
sudo killall -HUP mDNSResponder
El Capitan (version 10.11)
Mavericks (version 10.9)
sudo dscacheutil -flushcache   sudo killall -HUP mDNSResponder
Yosemite (version 10.10)sudo discoveryutil mdnsflushcache   sudo discoveryutil udnsflushcaches
Snow Leopard (version 10.6)
Leopard (version 10.5)
sudo dscacheutil -flushcache
Tiger (version 10.4)lookupd -flushcache

How to Flush DNS in Windows

Clearing DNS cache is an easy and quick process. The procedure is the same for almost all Windows systems. Foe the example below, we will be using Windows 10.

To flush DNS on your Windows machine:

1. Load the Command Prompt as an administrator. Open the Start Menu and start typing command prompt until you see it in the results.

Image of how to open the command prompt in the start menu.

2. Type ipconfig /flushdns when the prompt loads and hit Enter on the keyboard.

Running the command to flush DNS cache in Windows.

3. The process should take only a few seconds. You should see the DNS Resolver Cache confirmation message when it’s done:

The DNS Cache database on your computer is now clear. You should get the correct and updated IP mapping from DNS servers next time your machine sends a DNS query.

How to Flush DNS Cache in Linux

Linux distributions are a bit different from Windows and Mac machines. Each Linux distribution might use a different DNS service. Some distributions, like Ubuntu, don’t have a default DNS service at all.

It depends on which service you have on your distribution and whether it is enabled by default. Some of them are NCSD (Name Service Caching Daemon), dnsmasq, and BIND (Berkely Internet Name Domain).

For every distribution, you need to launch a terminal window. Press Ctrl+Alt+T on your keyboard and use the corresponding command to clear the DNS cache for the service your Linux system is running.

Flush Local NCSD DNS Cache

Use this command to clear NCSD DNS cache on your Linux machine:

sudo /etc/init.d/nscd restart

Enter your password if necessary. The process stops and then starts the NCSD service within seconds.

Flush Local dnsmasq DNS Cache

Use this command to clear the dnsmasq DNS cache on your Linux machine:

sudo /etc/init.d/dnsmasq restart

Enter your password again, if the terminal asks you to. You will see the response when the service stops and starts again.

Flush Local BIND DNS Cache

If you use BIND for DNS service, there are a few commands you can use to flush its DNS cache. You may need to enter your password to finish the process.

sudo /etc/init.d/named restart
sudo rndc restart
sudo rndc exec
Categories: DNS, Uncategorized Tags:

cURL error 60: SSL certificate problem: unable to get local issuer certificate

January 30th, 2021 Comments off

I have faced this issue in webmin/virtualmin server where Let’s encrypt SSL was installed on the domain and while installing jetpack in WordPress it was giving error.

cURL error 60: SSL certificate problem: unable to get local issuer certificate

The problem is with SSL of the domain. If you are using let’s encrypt SSL on the domain then it might give you error. It’s because SSL pem authentication file is missing.

How to fix it?

To fix the issue what you have to do is download the pem file and install it on the server.

Replace the ssl.ca file with this file:

https://letsencrypt.org/certs/lets-encrypt-r3-cross-signed.pem

It is the correct CA intermediate certificate for newly issued Let’s Encrypt certificates.

This is the old one, which you are currently using:

https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem

3 Ways to Install Telegram Messenger on Debian 11 bullseye

December 15th, 2020 Comments off

This tutorial shows 3 ways to install the Telegram messaging app on Debian 11. Telegram is a free, open-source messaging app with a focus on privacy, security and speed. It’s available on Linux, Mac, Window, Android, iOS and Windows Phone.

Telegram boasts over 100 million active monthly users. Main features of Telegram Messenger are as follows:

  • Super fast and lightweight
  • Send text, files, pictures, audio and video messages
  • Group chat with up to 10,000 members
  • Make voice calls with the Telegram mobile and desktop app
  • Messages can be synced across your computer, tablet and phone
  • Secret chat mode provides end-to-end encryption and self-destruct messaging function
  • Beautiful interface

Now let’s see how we can install Telegram messenger on Debian 9 Stretch.

Method 1: Install Telegram on Debian 11 via Tarball

Telegram website offers a traditional tar.xz tarball for Linux users. This is the recommended way to install Telegram on Debian 11. Head over to the official Telegram website and download the tar archive. Once it’s downloaded, open up a terminal window and navigate to the download directory. Then extract the tarball with the following command:

tar xvf tsetup*.tar.xz

There’ll be a new directory named Telegramand there are two executable files in it: Telegram and Updater.  You can navigate to the Telegram directory, execute the Telegram binary and using Telegram Messenger right away like below.

cd Telegram

./Telegram

Instead of using Telegram this way, we can move the Telegram directory into /opt, a directory used for storing third-party applications on Linux. The following two command requires root privilege. You can use su - command to switch to root user on Debian.

mv Telegram/ /opt/

Then create a symbolic link. Please note that Linux is case-sensitive.

ln -sf /opt/Telegram/Telegram /usr/bin/telegram

Now you can launch Telegram by typing telegram in the terminal.

telegram

Method 2: Install Telegram on Debian 9 via Snap Package

Starting with Debian 11, snapd is available from Debian repository. And Telegram is available from the Ubuntu Snap store. So we can install telegram on Debian 11 via Snap.

First, switch to root user with the following command (Don’t forget the hyphen).

su -

Then update package repository and install snapd.

apt update

apt install snapd

Next, install Telegram from Snap store. There are actually 3 Snap packages for telegram: telegram-latesttelegram-sergiusenstelegram-cli (the command line interface to telegram service). You can install one of these packages with commands below.

snap install telegram-latest

snap install telegram-sergiusens

snap install telegram-cli

After installing it, you may need to log out and log back in to see the Telegram icon in application menu. One drawback of the Telegram snap package is that you won’t be able to open HTTP links when click them in Telegram. You have to manually copy links and open them in web browser.

Method 3: Install Telegram on Debian 11 via Ubuntu PPA

You can install Ubuntu PPA packages on Debian. A third-party Telegram PPA is available. Here’s how to install Telegram on Debian 11 via PPA.

Open up a terminal window and login as root.

su -

Then edit /etc/apt/sources.list file.

nano /etc/apt/sources.list

Append the following two lines at the end.

deb http://ppa.launchpad.net/atareao/telegram/ubuntu xenial main
deb-src http://ppa.launchpad.net/atareao/telegram/ubuntu xenial main

Notice that ubuntu version is xenial in the above two lines. Save and close the file. Now add the PGP public key of this PPA to your Debian 9 Stretch with the following command.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36FD5529

If the above command reports no dirmngr, then you can install it with:

sudo apt install dirmngr

Once the key is imported, update package repository and install Telegram Desktop.

sudo apt update

sudo apt install telegram
Categories: Uncategorized Tags:
%d bloggers like this: