From MEPIS Documentation Wiki
SMTP (Simple Mail Transfer Protocol) has two functions:
- It receives from an external or internal (network) source, or a user mailing to another user on same system. When it receives it, by default it puts it in the "Post Office" which is actually a directory called /var/mail.
- It sends mail when requested to by a client. A client can be Kmail, Thunderbird, M$ Outlook, or even the UNIX command line function mail.
Setup for Postfix SMTP Server
On MEPIS, Postfix is not by installed default. It can be installed via Synaptic. Also this configuration doc uses Webmin to configure Postfix. The Postfix Webmin module needs to be downloaded via Synaptic (MEPIS 6.5) or from the Webmin website (MEPIS 7.0, 8.0, and 8.5).
The following example configuration was for this scenario: an SMTP server that can send/receive mail from the internal network and receive only from the internet. Default configuration (in /etc/postfix/main.cf) was used except for the following list:
- I added aliases. In my system, the mail user names are user names in Linux. So to keep everyone from knowing my real username, I created an alias. For example, email@example.com will really go to firstname.lastname@example.org...
- I changed "myorigin" to jenkins.hopto.org. This was done because some ISP's will not allow a generic domain for email. By default when mail is sent, it is assigned the address email@example.com, now it is firstname.lastname@example.org.
- I changed "mydestination" which is "What domains to receive mail for" to "linux, linux.jenkins.hopto.org, localhost.jenkins.hopto.org, localhost, jenkins.hopto.org". This enabled me to receive both internal and external mail. "linux" is my server's name and "jenkins.hopto.org" is its domain.
- I changed "mynetworks" to 127.0.0.0/8 192.168.0.0/24 from 127.0.0.0/8 to allow users on my LAN to send mail.
- This may be redundant, but the routers/modems need to be configured to port forward to mail server.
Testing Server install
From Server console
$ telnet localhost 25
If this goes to a screen saying "220 yourservername ESMTP Postfix (Debian/GNU)," then port 25 is listening and responding on localhost
From PC on LAN console
$ telnet 192.168.*.* 25
Use the ip of smtp server and if it responds as above, then port 25 is listening and responding on LAN