Send mail through gmail smtp server with Exim4 - What to do when gmail account has been disabled
To send mail from a machine using gmail smtp server see this tutorial :
http://www.manu-j.com/blog/wordpress-exim4-ubuntu-gmail-smtp/75/
I've just ran into a problem with this config.
I've created a gmail account just for this purpose because you need to set the gmail account password in exim4 configuration file on each machine.
I didn't want to use my personnal gmail account for obvious reasons.
As it's a technical account, I never log into it through http://gmail.com web interface.
Which lead to the account beeing disabled by gmail.
As a result, all mail that exim4 tryed to send gives this warning message in /var/log/exim4/mainlog :
R=send_via_gmail T=gmail_smtp defer (-53): retry time not reached for any host
To solve this issue, you need to
- Login to http://gmail.com with the account you use with exim4. It will ask you to login a second time with a captcha... do so
- login on all of your machine that use this technique and issue the following command :
sudo exim -qff
In exim4 logs you should see the following line :
2009-04-04 17:07:44 1Lq7Jf-0007WM-VJ => user@domain.com R=send_via_gmail T=gmail_smtp H=gmail-smtp-msa.l.google.com [74.125.79.109] X=TLS1.0:RSA_ARCFOUR_MD5:16 DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=smtp.gmail.com"
2009-04-04 17:07:44 1Lq7Jf-0007WM-VJ Completed
One more thing, don't forget to login once in a while on your gmail account so that it's not disabled. A solution is maybe a firefox extension like gmail manager.
Comments
Since I run my firefox every day at work, it keeps a 'login activity' so that my account isn't disabled.
I guess there's some api that allow gmail manager to login, so It should'nt be impossible to script this and cron it.
Any ideas?
Subscribe there :
http://lists.exim.org/mailman/listinfo/exim-users
Include your configuration and logs with something like http://pastebin.com/
That's the best place to get help.
I've configured exim for my servers and and don't know much more about it. I know postfix better.