Guest User

Zenoss - smtp troubleshooting - www.jangaraj.com

a guest
Aug 25th, 2014
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. ### Zenoss issue http://www.zenoss.org/forum/2106
  2.  
  3. garaj@zenossmaster:~$ sudo su - zenoss
  4. -bash-3.2$ whoami
  5. zenoss
  6. -bash-3.2$ nslookup smtp.gmail.com
  7. Server: 127.0.0.1
  8. Address: 127.0.0.1#53
  9.  
  10. Non-authoritative answer:
  11. smtp.gmail.com canonical name = gmail-smtp-msa.l.google.com.
  12. Name: gmail-smtp-msa.l.google.com
  13. Address: 173.194.66.109
  14. Name: gmail-smtp-msa.l.google.com
  15. Address: 173.194.66.108
  16.  
  17. -bash-3.2$ python
  18. Python 2.7.2 (default, Dec 20 2011, 15:24:39)
  19. [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
  20. Type "help", "copyright", "credits" or "license" for more information.
  21. >>> import Globals
  22. >>> from Products.ZenUtils.Utils import sendEmail
  23. >>> from email.Utils import formatdate
  24. >>> email_message = {}
  25. >>> email_message['Subject'] = 'subject'
  26. >>> email_message['From'] = '<from_email>'
  27. >>> email_message['To'] = '<[email protected]>'
  28. >>> email_message['Date'] = formatdate(None, True)
  29. >>> result, errorMsg = sendEmail(email_message, 'smtp.gmail.com', '587', True, '[email protected]', <password>)
  30. >>> print 'Result: %s - errMsg: %s' % (result, errorMsg)
  31.  
  32. >>> import socket
  33. >>> socket.getaddrinfo( 'smtp.gmail.com', 587)
  34. [(2, 1, 6, '', ('173.194.67.108', 587)), (2, 2, 17, '', ('173.194.67.108', 587)), (2, 3, 0, '', ('173.194.67.108', 587)), (2, 1, 6, '', ('173.194.67.109', 587)), (2, 2, 17, '', ('173.194.67.109', 587)), (2, 3, 0, '', ('173.194.67.109', 587)), (10, 1, 6, '', ('2a00:1450:400c:c05::6c', 587, 0, 0)), (10, 2, 17, '', ('2a00:1450:400c:c05::6c', 587, 0, 0)), (10, 3, 0, '', ('2a00:1450:400c:c05::6c', 587, 0, 0))]
Add Comment
Please, Sign In to add comment