TUTORIAL Install gMail as SMTP SmartHost for SendMail

diedaar

New Member
Joined
Dec 14, 2007
Messages
11
Reaction score
0
Thanks guys. works like a charm

In the last couple off days Google didn't accept email send from my ip anymore (default setup port 25 open), Google' s suggestion was use your ISP mailserver as a relay.
Not a very helpful solution in my case because if I did want to do this I need to open my mail server(pbx) for one incoming validation email from my ISP to verify the IP address and domain. Didn't fancy chancing the firewalls (two) and adding port forwards for just 1 email.

Reading this thread and doing the install it toke me less then 5 minutes to get things working again.

Wish all my (IT) problems are as easy to resolve. :biggrin5:

Thanks.
 

edisoninfo

Guru
Joined
Nov 19, 2007
Messages
505
Reaction score
4
My gmail relay stopped working on my system on Wednesday. Did gmail shutdown something?
 

diedaar

New Member
Joined
Dec 14, 2007
Messages
11
Reaction score
0
gmail relay

Don't know, this is the message I got back in the mailbox of root (IP ,email address and host name replaced with xxx for obvious reasons) Redoing the setup and everything worked again.
----- The following addresses had permanent fatal errors -----
<xxxxatgmail.com>
(reason: 550-5.7.1 [xxx.xxx.xxx.xxx] The IP you're using to send mail is not
authorized)

----- Transcript of session follows -----
... while talking to gmail-smtp-in.l.google.com.:
>>> DATA
<<< 550-5.7.1 [xxx.xxx.xxx.xxx] The IP you're using to send mail is not authorized
<<< 550-5.7.1 to send email directly to our servers. Please use the SMTP relay at
<<< 550-5.7.1 your service provider instead. Learn more at http://mail.g
<<< 550 5.7.1 oogle.com/support/bin/answer.py?answer=10336 c20si9375121rvf.51
554 5.0.0 Service unavailable
Failed delivery status
Final recipient xxxxxx.at.gmail.com Reason for failure 550-5.7.1 [xxx.xxx.xxx.xxx] The IP you're using to send mail is not authorized Remote mail server gmail-smtp-in.l.google.com Reporting mail server xxxxx.homeip.net
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,205
Reaction score
5,226
Sounds like your IP may have gotten on their spammer list.
 

dswartz

Guru
Joined
Feb 17, 2009
Messages
1,056
Reaction score
0
Could be. This is one reason I have a virtual private server to provide me a legitimate static IP. I have found way too many places that reject mail from known dynamic IP blocks. That may be it too - rather than a spammer per-se, they reject all IPs in that range. He may have gotten a new IP that wasn't.
 

diedaar

New Member
Joined
Dec 14, 2007
Messages
11
Reaction score
0
Well I still have the same (dynamic) IP address and it is working (again) with Gmail.
I know my own ISP (xtra.co.nz = Yahoo) rejects mail send from my IP address using a mail server to my own email address (on my ISP user account) because the IP is part of a dynamic block. They are using Spamhaus policies and block lists.
Maybe it is time to get a static IP address.
 

cadman97

Member
Joined
Apr 9, 2009
Messages
56
Reaction score
1
I am having a tough time getting gmail to work. I've done all the examples for sendmail to setup gmail for outgoing. all my pings to yahoo, google, etc. go thru and respond with no issue. but every time I try the echo test to my email address, I get nothing.

I am completely lost at this point. let me know what I need to post to help you help me..

Thanks IN Advance.

Mike
 

joevoirol

New Member
Joined
Aug 22, 2008
Messages
14
Reaction score
0
Works Great!

I followed your instructions and this works perfectly!

Thanks for all of your hard work and especially for sharing :smile5:
 

dopegroove

New Member
Joined
Apr 2, 2008
Messages
4
Reaction score
0
Wow this worked like a charm the FIRST time! Awesome! thanks so much!
 

bobapoka

New Member
Joined
Sep 13, 2008
Messages
3
Reaction score
0
<resolved>

Hello, used the instruction and everything works fine. Big thanks!

Now, i am trying to use the same pbx to relay emails out to gmail smtp as my network printer doesn't understand the authentication process required.

- I have added my lan segment (/24) for access file for relay
- I have modified iptables to allow smtp traffic coming in to my pbx box

* tcpdump shows smtp traffic hits pbx from my printer and pbx is sending out ack but that's it.. nothing will happen and my printer will eventually give out an send error. Tested with an email client from my PC on the same lan segment as well and getting the same result.

Anyone can assist me on how to get this to work?

Thanks,

// resolved by fixing mis-config on network ports for sendmail //
 

himala76

Member
Joined
Sep 7, 2008
Messages
70
Reaction score
2
Hello guys
I have to change port 587 to 465 to get it to work
echo AuthInfo:smtp.gmail.com:587 "U:smmsp" "I:user_id" "Password" "M:pLAIN" >> client-info
echo AuthInfo:smtp.gmail.com:465 "U:smmsp" "I:user_id" "Password" "M:pLAIN" >> client-info
Thanks
Himala
 

Zitro

New Member
Joined
Sep 18, 2008
Messages
20
Reaction score
1
I couldn't the gmail setup to work but then i changed the port to 465 as the person before me did and it started working.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,205
Reaction score
5,226
Thanks. We've updated the instructions to support port 465 for SSL encryption in addition to 587 for TLS encryption.
 

Zitro

New Member
Joined
Sep 18, 2008
Messages
20
Reaction score
1
i do have a question though and forgive me as this is only my second build and i'm still learning my way around.

All my extensions are successfully getting their email's sent through this gmail setup but i'm also getting tons of these mail delivery status notifications in my inbox. It's trying to send email to root@____.org so my question is does anyone know where i change the root email to another email address.
thanks
 

jmullinix

Guru
Joined
Oct 21, 2007
Messages
1,263
Reaction score
7
You can also put a file called

.forward

in /root/ with the email address you want to forward to in it. The leading dot on .forward is important, by the way.
 

Nixi

New Member
Joined
Mar 17, 2009
Messages
21
Reaction score
0
Thanks a lot. Very easy to implement. We use Google Apps premium account with our own domain.

/
Jonathan
 

jeffersonkim

New Member
Joined
Sep 12, 2008
Messages
25
Reaction score
0
Does anyone know how to undo this mess or just use the web interface to make this an easier process?

I recently changed my gmail password account, and it was sort of hell for me to find the exact spot where I needed to change the password because it was like 1 year later!

If it was in the Webmin for sendmail, then I could just input info there.
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top