Add gmail as smarthost in Debian exim4 [closed]
Question
I'd like to know how to setup my exim4 on Debian so that it can use gmail as the smarthost, rather than my ISP. It appears to need TLS to be setup, and of course a gmail userid and password. The "standard" smarthost example that comes with exim4 in Debian doesn't have these.
Solution
The above solution didn't work for some reason but the solution here worked for me.
http://www.manu-j.com/blog/wordpress-exim4-ubuntu-gmail-smtp/75/
The only change I did was to use xyz@mydomain.com
instead of xyz@gmail.com
in the “begin authenticators” section.
OTHER TIPS
First, install stunnel4 and configure it to map [127.0.0.1]:587
to smtp.gmail.com:465
like this:
client=yes
[smtp-gmail]
accept = 587
connect = smtp.gmail.com:465
Then reconfigure exim4:
dpkg-reconfigure exim4-config
Configure exim4 to use a lot of small files, smarthost through localhost:587
Edit /etc/exim4/passwd.client and add:
localhost:yourname@gmail.com:yourpassword
Remember to check permissions, and then run:
update-exim4.conf
That should do it.
See the instructions on Debian Wiki: