27 February 2018

How to insert line numbers to a Vim file

How to insert line numbers to a Vim file?

Insert line numbers

The :s command can be used to insert line numbers before each line:
:%s/^/\=printf('%-4d', line('.'))
The pattern ^ matches the start of every line, and the replacement \= is the result of evaluating the following expression. That expression uses printf() to format the number of the current line: %-4d is a left-aligned decimal number, padded if necessary by adding spaces to a 4-column width (%4d is right-aligned, and %04d inserts leading zeroes).

22 February 2018

Outlook blocked by AVG

Outlook blocked by AVG

How to scan encrypted emails with AVG Email Protection

Please Note: The steps in this article relate to the AVG AntiVirus or AVG Internet Security products. If the instructions below do not apply to your product, you may be using the newer AVG Internet Security - Unlimited.

You must have prior knowledge of email servers and network configuration before following the steps below. 

Instructions

In some special cases, you must manually specify the incoming and outgoing mail servers in AVG Email Protection. A typical example is when you use secure communication (SSL). This article outlines how to set up AVG Email Protection to scan encrypted emails by manually specifying an incoming or outgoing mail server.
To configure AVG Email Protection, follow these steps:
  1. Open the AVG program, and click Options.
    User-added image
  2. In the Options menu, click Advanced settings.
    User-added image
  3. In the left pane, expand Email Protection > Email Scanner > Servers.
    User-added image
  4. Select POP3 or IMAP (depending on your email settings), and click Add new server.
    User-added image
  5. Enter the name of the new server, and click OK.
    User-added image
  6. Edit the settings as follows:
    • Type of login: Select Fixed host, and enter the details of your POP3/IMAP server. For example, pop3.mymail.com for a POP3 server, and imap.mymail.com for an IMAP server.
    • Local port: 5300
    • Connection: Select Secure to regular port or Secure to dedicated portbased on your network configuration.
    • Select the Activate this server and use it for sending/receiving emailsoption.
    User-added image
  7. In the left pane, expand Email Protection > Email Scanner > Servers, click SMPT, and click Add new server.
    User-added image
  8. Enter the name of the new server, and click OK.
    User-added image
  9. Edit the settings as follows :
    • Type of login: Select Fixed host, and enter the details of your SMTP server. For example, smtp.mymail.com.
    • Local port: 5400
    • Connection: Select Secure to regular port or Secure to dedicated portbased on your network configuration.
    • Select the Activate this server and use it for sending/receiving e-mails option.
    User-added image
  10. Click OK.
    User-added image
The AVG Email Protection is now set up to communicate with your email server using SSL encryption.
As the next step, configure your email client so that it connects to the AVG Email Protection instead of the actual email server. Configure the settings as follows:
  • POP3/IMAP:
    • Server: 127.0.0.1
    • Port: 5300
    • Username / password: your email username and password
    • Encryption: NONE (SSL disabled)
  • SMTP:
    • Server: 127.0.0.1
    • Port: 5400
    • Authentication: same as before
    • Username / password: your email username and password (if required)
    • Encryption: NONE (SSL disabled)