Changes

From Amahi Wiki
Jump to: navigation, search
== Option 2 (Exim4) ==
sudo apt-get install exim4 mailx
 
Ensure you verify the hostname before proceeding. You will need this later.
hostname
After installing exim4 we need to configure it. This is done by the following command:
Now you need to answer some questions. Don't worry I'll give you the answers to those questions.
* The first screen asks you what General type of mail server you need. Select the second optionconfiguration: "<code>mail sent by smarthost; received via SMTP or fetchmail"</code>* The next question asks for the system mail name: <code>Set to same as hostname (raspberrypi)</code>* Now it asks you what IP addresses should be allowed to use the server. <code>Leave as is (127.0.0.1 ; ::1)</code>* Other destinations for which mail is accepted: raspberrypi<code>Set to same as hostname</code>* Machines to relay mail for: <code>Leave blank.</code>* IP address or host name of outgoing smarthost: Enter: <code>smtp.gmail.com::587</code>* Hide local mail name in outgoing mail: Select: <code>No</code>* Keep number of DNS-queries minimal: Select: <code>No</code>* Delivery method for local mail: Select: "Maildir <code>mbox format in home directory"/var/mail/</code>* Split configuration into small files: Select: <code>No</code> <br />
After answering all these questions exim4 will restart and we're halfway home. Now you'll have to enter your account details. As root, edit the file /etc/exim4/passwd.client and add the next three lines at the end of the file.
<pre>gmail-smtp.l.google.com:YOU@gmail.com:PASSWORD
smtp.gmail.com:YOU@gmail.com:PASSWORD</pre>
::'''NOTE:''' You'll have to change ''YOU '' to your Gmail login name, and ''PASSWORD '' to your password on all three lines.
This password file contains sensitive account information. You should verify its file permissions and ownership.
:<precode>$ ls -al /etc/exim4/passwd.client</code>:<code>-rw-r----- 1 root Debian-exim 252 Mar 25 17:24 /etc/exim4/passwd.client</precode>
If they are different from the above, use the following commands to set file permissions and ownership.
exim4 -qff
::'''NOTE:''' The <code>-qff </code> parameter forces a delivery attempt for every message, whether frozen or not.
== Test Email ==
12,424

edits