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.
Asked
Active
Viewed 1.3k times
3 Answers
3
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.
1
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.

geocar
- 9,085
- 1
- 29
- 37
-
Thanks for the answer. I will try it. Why must stunnel be used, i.e. why can't exim4 coomunicate with gmail's smtp host directly? – Macker May 17 '09 at 18:37
-
I don't think it "must" - merely that this is easier to explain. – geocar May 18 '09 at 15:55
-
I've voted this down as I never liked having to use another piece of software (stunnel) where it should not be needed. – Macker Nov 22 '09 at 13:13