=== Send mail through your HDA using your gmail Gmail account ===
tags: mail gmail f14 postfix relay
Warning: Only try this if you know what you’re doing.<br><br>
I took the information from [http://carlton.oriley.net/blog/?p=31 this page] and modified them slightly for Fedora 14 / Amahi 6. <br><br>
First of all, install postfix and remove sendmail: <br>
{{Code|yum -y install postfix
yum -y remove sendmail}}
{{Code|yum -y install openssl openssl-perl}}
A Certificate Authority is needed to create the necessary certificates. You can skip the next paragraph if you already have one:<br>
{{Code|cd /etc/pki/tls/misc
./CA.pl –newca}}
*You will be prompted for the file name, hit enter to create a new CA.
* You will need to enter a passphrase next, be sure to remember it.
*For the Common Name, type “CA” (without quotes).
*Take defaults for everything else and when prompted enter the passphrase from above.<br>
Now a key that is sent to GMail Gmail to start the SSL encryption will be created: <br>
{{Code|cd /etc/pki/tls
mkdir gmail_relay
Add the following to the bottom of the file /etc/postfix/main.cf.
You do not need to change anything else in it, as the last setting for any option is the one that is saved.
{{Text|Text=#### GMail Gmail SSL SMTP Relay
relayhost <nowiki>=</nowiki> [smtp.gmail.com]:587
smtpd_tls_req_ccert <nowiki>=</nowiki>no
smtp_tls_enforce_peername <nowiki>=</nowiki> no}}
Create /etc/postfix/sasl_passwd file with your GMail Gmail login credentials that looks like below:
{{Text|Text=gmail-smtp.l.google.com user@gmail.com:password
smtp.gmail.com user@gmail.com:password}}
Obviously, you need to change ''user'' to your username and ''password'' to your gmail password. <br>
Create the password database: <br>
{{Code|postmap hash:/etc/postfix/sasl_passwd}}
Protect the files with your GMail Gmail login data:
{{Code|chmod 600 /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd.db
Restart Postfix
{{Code|/etc/init.d/postfix restart}}
Now try sending a mail, it should reach your gmail Gmail account.
See also:<br>