Install Postfix server:
bash$ sudo aptitude install postfix
and input these options:
Mail Server Configuration -> Internet Site
System Mail Name -> smartonline.com
Root and postmaster mail recipient -> sysadmin
Other destinations to accept mail for (blank for none) -> localhost
Force synchronous updates on mail queue? -> No
Local networks -> 172.16.110.0/8, 127.0.0.0/8
Mailbox size limit (bytes) -> 0
Local address extension character -> BLANK
Internet protocols to use -> ipv4
If you want to reconfigure the postfix, execute:
bash$ sudo dpkg-reconfigure postfix
The myorigin parameter specifies the domain that appears in mail that is posted on this machine.
myorigin = $myhostname (default: send mail as "user@$myhostname")
myorigin = $mydomain (probably desirable: "user@$mydomain")
The mydestination parameter specifies what domains this machine will deliver locally, instead of forwarding to another machine. The default is to receive mail for the machine itself.
mydestination = $myhostname localhost.$mydomain localhost
Authorized networks are defined with the mynetworks configuration parameter. By default, Postfix will forward mail from clients in authorized network blocks to any destination.
mynetworks = 127.0.0.0/8 168.192.0.0/24 (authorize local machine and the 192.168.0 subnet)
The relayhost parameters specifies the method of delivering mail. By default, Postfix tries to deliver mail directly to the Internet.
relayhost = (default: direct delivery to Internet)
bash$ telnet <IP> 25
EHLO
MAIL FROM: <from-email>
RCPT TO: <recipient-email>
DATA
Type message here.
<Enter>
The last line leaves DATA mode.