Postfix Mail

How to send mails in POSTFIX through external SMTP

This short guide shows how you can set up Postfix to relay…

Postfix Mail
Postfix Mail

This short guide shows how you can set up Postfix to relay emails through another mailserver. This can be useful if you run a Postfix mailserver in your local network and have a dynamic IP address because most dynamic IP addresses are blacklisted today. By relaying your emails through another mailserver that is hosted on a static IP address in a data center (e.g. your ISP’s mailserver) you can prevent your emails from being categorized as spam.

First step, you will need to make changes in your configuration file (in standard postfix configuration it would be /etc/postfix/main.cf). You need to add at the end of configuration file following lines:

I’m going to use Nano editor to edit my configuration file.

nano /etc/postfix/main.cf

Configuration

Linux

Zip Example: How to Do!

The zip command under UNIX is use for a compression. It works…

The zip command under UNIX is use for a compression. It works as a file packaging utility for the following operating systems:

1. Unix
2. VMS
3. MSDOS
4. OS/2
5. Windows 9x/NT/XP, 6. Minix
7. Atari
8. Macintosh
9. Amiga
10. Acorn RISC OS.

Simple Examples

The syntax is as follows:

zip file.zip file1.txt file2.doc photo.jpg ...

To zip resume.doc and all *.c file, enter:

zip bacup.zip resume.doc *.c

To zip data directory, enter:

zip -r backup.zip data

UFW - Uncomplicated Firewall

UFW – Uncomplicated Firewall

The default firewall configuration tool for Ubuntu is ufw. Developed to ease…

The default firewall configuration tool for Ubuntu is ufw. Developed to ease iptables firewall configuration, ufw provides a user friendly way to create an IPv4 or IPv6 host-based firewall. By default UFW is disabled.

Gufw is a GUI that is available as a frontend.

Basic Syntax and Examples

Default rules are fine for the average home user

When you turn UFW on, it uses a default set of rules (profile) that should be fine for the average home user. That’s at least the goal of the Ubuntu developers. In short, all ‘incoming’ is being denied, with some exceptions to make things easier for home users.

Enable and Disable

Enable UFW

To turn UFW on with the default set of rules:

sudo ufw enable

To check the status of UFW:

sudo ufw status verbose

The output should be like this:

How To: PPTP VPN on Ubuntu 12.04 (pptpd)

PPTP VPN on Ubuntu 12.04 (pptpd)

Install Software sudo apt-get install pptpd ufw Allow Ports 22 and 1723…

Install Software
sudo apt-get install pptpd ufw

Allow Ports 22 and 1723 on UFW and Enable UFW
Warning: if you are connected to SSH on a port other than 22, please adjust the first command accordingly so you don’t get kicked off.

sudo ufw allow 22
sudo ufw allow 1723
sudo ufw enable

Edit /etc/ppp/pptpd-options
use your favourite editor in this case I use “sudo nano /etc/ppp/pptpd-options” and make sure you have the following parameters for encryption.

refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128

Server

How to Use the vi Editor

This help note explains the basics of vi: opening and closing a…

This help note explains the basics of vi:

  • opening and closing a file
  • moving around in a file
  • elementary editing

vi has many other commands and options not described here. The following resources can help you get started using the vi editor, and are available at the UW University Book Store:

  • “vi Tutorial.” Specialized Systems Consultants (SSC).
  • “vi Reference.” Specialized Systems Consultants (SSC).
  • “Learning the vi Editor.” Linda Lamb, 1990.

Starting vi

You may use vi to open an already existing file by typing

      vi filename

where “filename” is the name of the existing file. If the file is not in your current directory, you must use the full pathname.

Or you may create a new file by typing

      vi newname

where “newname” is the name you wish to give the new file.

Server

FIX: Plesk and Sendmail Problem PHP

From the command line, enter this below. /usr/local/psa/bin/domain -u yourdomain.com -mail_service false…

From the command line, enter this below.

/usr/local/psa/bin/domain -u yourdomain.com -mail_service false

You do not need to restart the server. This tells Plesk to not use the mail server to send mail for that domain. It will then go through the correct MX entry for the domain and send it to an external domain. Specially for those who use Google Apps on Plesk.

You will need to do this for every domain hosted on the server.

Server

Configure RPMforge Repository on CentOS

Open the RPMforge configuration file /etc/yum.repos.d/rpmforge.repo Add the following text to the…

  1. Open the RPMforge configuration file
    /etc/yum.repos.d/rpmforge.repo
  2. Add the following text to the end of the RPMForge repository entry
    priority=3
  3. Check that you got the priorities set correctly
    yum check-update
    You should output similar to the following:
    Loaded plugins: fastestmirror, priorities

    469 packages excluded due to repository priority protections
Linux

How to Add User To Group in Linux

You can use the useradd or usermod commands to add a user…

You can use the useradd or usermod commands to add a user to a group. The useradd command creates a new user or update default new user information. The usermod command modifies a user account i.e. it is useful to add user to existing group. There are two types of group. First is primary user group and other is secondary group. All user account related information is stored in /etc/passwd, /etc/shadow and /etc/group files to store user information.

useradd Example – Add A New User To Secondary Group

You need to the useradd command to add new users to existing group (or create a new group and then add user). If group does not exist, create it. The syntax is as follows:

useradd -G {group-name} username

In this example, create a new user called neo and add it to group called matrix. First login as a root user (make sure group matrix exists), enter:

grep matrix /etc/group

How to Set Up vsftpd on Ubuntu 12.04

How to Set Up vsftpd on Ubuntu 12.04

About vsftpd The first two letters of vsftpd stand for “very secure”…

How to Set Up vsftpd on Ubuntu 12.04
How to Set Up vsftpd on Ubuntu 12.04

About vsftpd

The first two letters of vsftpd stand for “very secure” and the program was built to have strongest protection against possible FTP vulnerabilities.

Step One – Install vsftpd

You can quickly install vsftpd on your server in the command line:

sudo apt-get install vsftpd
Once the file finishes downloading, the VSFTP will be on your server. Generally speaking, it is already configured with a reasonable amount of security. However, it does provide access on your Server to anonymous users.

Step Two – Configure vsftpd

Once vsftpd is installed, you can adjust the configuration.

Open up the configuration file:

sudo nano /etc/vsftpd.conf
The biggest change you need to make is to switch the Anonymous_enable from YES to NO:

anonymous_enable=NO