Postfix Configuration Settings for Ubuntu and Debian
Postfix Configuration Settings for Ubuntu and Debian
-
Install Postfix:
This will remove exim since there can't be two mail systems active at the same time.
If you have a website, choose "Internet Site" when the configuration prompt ask for it.
apt-get install postfix
-
Verify mail.log to see if postfix started correctly.
cat /var/log/mail.log
-
Add your domain to the config files, so others can't abuse your mailsystem.
postconf -e "myorigin = example.com"
-
Add your hostname (computer name).
Use command "hostname" at the command-line to display your hostname if not sure.postconf -e "myhostname=server1.example.com"
-
Now add the domain names that your system will handle.
postconf -e "relay_domains= example.com, example2.com, example3.com"
-
Reload the Postfix server:
postfix reload
-
Test the mailserver.
telnet localhost 25
You should see something similar to:
-
Try sending an email:
mail from: < you(at)youremail.com > rcpt to: < user(at)example.com > data To: user(at)example.com From: you(at)youremail.com Subject: Hey my first email This is my first postfix email after installing and configuring it. It was easy. .
Make sure to add an extra '.' at the end to indicate the end of the email content.
Use "quit" to return to the regular command prompt input.
Trying 127.0.0.1... Connected to localhost.localdomain. Escape character is '^]'. 220 server1.example.com ESMTP Postfix (Debian/GNU)
Author
Andrisoft Team
Andrisoft Team
Date Created
2014-10-30 09:59:11
2014-10-30 09:59:11
Date Updated
2017-11-29 22:37:57
2017-11-29 22:37:57
Views
8372
8372