![]() ![]() You can change the body and the subject of the email to your liking. echo "This is the body of the email" | mail -s "This is the subject line" your_email_address.To send a test email, run the following command: In this step, you’ll test whether Postfix can send emails to an external email account using the mail command, which is part of the mailutils package that you installed in the first step. You’ll now test it by sending an example message to an email address. You’ve configured Postfix to only send emails from your server. Then, restart Postfix by running the following command: Note: If you’re hosting multiple domains on a single server, the other domains can also be passed to Postfix using the mydestination directive. Open it for editing using your favorite text editor: To make the changes, you’ll need to edit the main Postfix configuration file called main.cf, stored under etc/postfix. In this step, you’ll configure Postfix to send and receive emails only from the server on which it is running on-that is, from localhost.įor that to happen, Postfix needs to be configured to listen only on the loopback interface, the virtual network interface that the server uses to communicate internally. You have now installed Postfix and are ready to start configuring it. When you’ve finished, press TAB, followed by ENTER. The System mail name must be the same as the name you assigned to your server when you were creating it. If it does not show up automatically, run the following command to start it:Īfter that, you’ll get another configuration prompt regarding the System mail name: If you only see the description text, press TAB to select OK, then ENTER. That’s the recommended option for your use case, so press TAB, and then ENTER. Near the end of the installation process, you will be presented with the Postfix configuration window: #Ubuntu foxmail installThen, install Postfix by running the following command: The fastest way is to install the mailutils package, which bundles Postfix with a few supplementary programs that you’ll use to test sending email. The output should match the name you gave the Droplet when it was being created. You can verify the server’s hostname by typing hostname at the command prompt. Note: Your server’s hostname and your Droplet’s name must match your_domain, because DigitalOcean automatically sets PTR records for the Droplet’s IP address according to its name. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |