server

Mail server trouble shooting

Logs

Check the logs!

Telnet

Do not use a common mail client (e.g. Kmail) to troubleshoot the server. Use telnet instead.

Here is a sample POP3 session via telnet:

$telnet example.com 110
Trying 123.145.167.189...
Connected to example.com.
Escape character is '^]'.
+OK Hello there.
user john@example.com       
+OK Password required.
pass mypassword
+OK logged in.
quit
+OK Bye-bye.
Connection closed by foreign host.

Here is a sample IMAP session via telnet:


$ telnet example.com 143
Trying 123.145.167.189...

Courier

Documentation

http://www.courier-mta.org/
http://en.wikipedia.org/wiki/Courier_Mail_Server

The official courier documentation is only a collection of man pages. So, for a good tutorial on how to install and configure courier, our only resource is to look at third-party tutorials. Here are a few:

Backups

Server backups.

Use dar to backup the whole system.

For mysql, see the official documentation:
http://dev.mysql.com/doc/refman/5.5/en//backup-and-recovery.html

Security

Table of Contents

Notes on how to secure your server. This list is a stub only. It is by no means complete nor authoritative.

By service

Cron

See man crontab.
rm /etc/cron.deny
echo root /etc/cron.allow

mysql

See Chapter 6. Security
http://dev.mysql.com/doc/refman/5.5/en//security.html

Postfix

http://www.postfix.org/
http://en.wikipedia.org/wiki/Postfix_(software)

The Postfix official documentation is quite good and comprehensive. After you have done a basic postfix install, you may have a look at the tutorials on how to fully configure your mail server with courier:
http://linux.overshoot.tv/wiki/server/courier

Security

File permissions

/etc/postfix/main.cf should be world-readable!

iptables manpage

Table of contents

IPTABLES

Section: iptables 1.4.10 (8)

NAME

iptables — administration tool for IPv4 packet filtering and NAT

SYNOPSIS

NAT (Network Address Translation)

How to communicate peer-to-peer through NAT (Network Address Translation) firewalls
http://www.mindcontrol.org/~hplus/nat-punch.html
NAT and Peer-to-peer networking
http://alumnus.caltech.edu/~dank/peer-nat.html

Administration

Daily administration of a server...

System mail

When you work on a console, you may sometimes see the message: “You have new mail”.

The mail is usually stored in /var/mail/root or /var/spool/mail/root.

It can be read from within the console with a program like mutt. Install it, spend some time to read mutt's documentation to learn how to use it.

See:
http://www.mutt.org/
Mutt on wikipedia.

UFW: Uncomplicated Firewall

The Uncomplicated Firewall (ufw) is a frontend for iptables.

Links

Uncomplicated Firewall:
http://en.wikipedia.org/wiki/Uncomplicated_Firewall
https://launchpad.net/ufw
Documentation:
https://wiki.ubuntu.com/UncomplicatedFirewall
https://help.ubuntu.com/community/UFW

Setting up your first firewall

This section is written as a tutorial to help you go through the process of enabling your first firewall over a remote connection (SSH).

Syndicate content