hostname -fSo my server's hostname is
microdude, you might also get it as microdude.localdomain. You'll want to convert it into an FQDN (Fully Qualified Domain Name). That means I need to change my microdude to microdude.favoritemedium.com.sudo vi /etc/hostname
sudo vi /etc/hostsThe output of hosts:
127.0.0.1 localhost
127.0.1.1 microdude.localdomain microdudeWould now be:
127.0.0.1 localhost
127.0.1.1 microdude.favoritemedium.com microdudeReboot and check that the hostname has been changed to
microdude.favoritemedium.com:sudo reboot
hostname -fAfter that, you're supposed to set up RDNS (Reverse Domain Name System), this helps avoid your mails falling prey to the all-powerful spam filter. You can check on this RDNS with
dig which can be installed from this package:sudo apt-get install dnsutilsThis is optional, though if your mails start going into the spam folder, you'd best revisit this in the links provided.
Now to install the actual mail agent onto the server with a one-liner operation:
sudo tasksel install mail-serverThe process stops at two points for user input. The first is to pick the postfix configuration for the server, select the default
Internet site. The second is to set the main domain name, this should be already be filled with microdude.favoritemedium.com and all you need to do is accept. Once finished, the postfix daemon should be running now. You need to know about two files, the main configuration file and the mail log. You don't need to mess around with the config file, since that should be set up correctly. The mail log is useful to check on whether mails have been sent or other information. Their locations:
/etc/postfix/main.cf
/var/log/mail.logNow you'll want to test whether mails can be sent out. An email can be typed out in the terminal using the
mail command:mail testing@mailaddress.com
Subject: Do not panic, this is a test
Panic panic panic panic panic
.
Cc:Check the email account you sent the mail to and you should see that it is present.
Congratulations, you can now spam to your heart's content =^_^=.
From:
No comments:
Post a Comment