problems with gmail email

Status
Not open for further replies.

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
my email was working - sent one when i ran a scrub on the boot drive on friday.

my scrubs on sunday started but did not get an email

i got this error when i sent a test email.

  • Your test email could not be sent: [Errno 8] hostname nor servname provided, or not known
my settings -
From email:
MoreInformation_16x16px.png
root@freenas.local
Outgoing mail server:
MoreInformation_16x16px.png
smtp.gmail.com
Port to connect to:
MoreInformation_16x16px.png
465
TLS/SSL:SSL
MoreInformation_16x16px.png

Use SMTP Authentication: checked

can anybody help please
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Your server doesn't know how to reach smtp.gmail.com. From the command line, what does 'host smtp.gmail.com' return?
 

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
thanks for replying

[root@freenas ~]# host smtp.gmail.com
smtp.gmail.com is an alias for gmail-smtp-msa.l.google.com.
gmail-smtp-msa.l.google.com has address 74.125.21.109
gmail-smtp-msa.l.google.com has address 74.125.21.108
gmail-smtp-msa.l.google.com has IPv6 address 2607:f8b0:4002:c03::6d
[root@freenas ~]#
 

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
my gmail doesn't have 2 factor authentication
 

bricebm

Cadet
Joined
Nov 26, 2014
Messages
7
That shouldn't matter. The only thing two factor changes is that I use a single use app specific password instead of my regular password. You should configure your email the same way in the post. except using your regular password. Ignore the two factor stuff
 

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
i'll have a go - thank you
 

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
IPv4 Default Gateway:192.168.1.1
IPv6 Default Gateway:
Nameserver 1:192.168.1.1

i set this and now the email works
 

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
the email is not working correctly - i hit the send test email button 10 times and it worked 3 times - the other 7 i got this error -
  • Your test email could not be sent: [Errno 8] hostname nor servname provided, or not known
i haven't changed anything. it should either always work or always fail. .i copied this from the console -

rrno 8] hostname nor servname provided, or not known
May 25 13:45:16 freenas freenas[3055]: Traceback (most recent call last):
May 25 13:45:16 freenas freenas[3055]: File "/usr/local/www/freenasUI/../freenasUI/common/system.py", line 173, in send_mail
May 25 13:45:16 freenas freenas[3055]: local_hostname=local_hostname)
May 25 13:45:16 freenas freenas[3055]: File "/usr/local/lib/python2.7/smtplib.py", line 781, in __init__
May 25 13:45:16 freenas freenas[3055]: SMTP.__init__(self, host, port, local_hostname, timeout)
May 25 13:45:16 freenas freenas[3055]: File "/usr/local/lib/python2.7/smtplib.py", line 251, in __init__
May 25 13:45:16 freenas freenas[3055]: (code, msg) = self.connect(host, port)
May 25 13:45:16 freenas freenas[3055]: File "/usr/local/lib/python2.7/smtplib.py", line 311, in connect
May 25 13:45:16 freenas freenas[3055]: self.sock = self._get_socket(host, port, self.timeout)
May 25 13:45:16 freenas freenas[3055]: File "/usr/local/lib/python2.7/smtplib.py", line 786, in _get_socket
May 25 13:45:16 freenas freenas[3055]: new_socket = socket.create_connection((host, port), timeout)
May 25 13:45:16 freenas freenas[3055]: File "/usr/local/lib/python2.7/socket.py", line 553, in create_connection
May 25 13:45:16 freenas freenas[3055]: for res in getaddrinfo(host, port, 0, SOCK_STREAM):
May 25 13:45:16 freenas freenas[3055]: gaierror: [Errno 8] hostname nor servname provided, or not known
May 25 13:45:23 freenas freenas[3055]: Traceback (most recent call last):
May 25 13:45:23 freenas freenas[3055]: File "/usr/local/www/freenasUI/../freenasUI/common/system.py", line 173, in send_mail
May 25 13:45:23 freenas freenas[3055]: local_hostname=local_hostname)
May 25 13:45:23 freenas freenas[3055]: File "/usr/local/lib/python2.7/smtplib.py", line 781, in __init__
May 25 13:45:23 freenas freenas[3055]: SMTP.__init__(self, host, port, local_hostname, timeout)
May 25 13:45:23 freenas freenas[3055]: File "/usr/local/lib/python2.7/smtplib.py", line 251, in __init__
May 25 13:45:23 freenas freenas[3055]: (code, msg) = self.connect(host, port)
May 25 13:45:23 freenas freenas[3055]: File "/usr/local/lib/python2.7/smtplib.py", line 311, in connect
May 25 13:45:23 freenas freenas[3055]: self.sock = self._get_socket(host, port, self.timeout)
May 25 13:45:23 freenas freenas[3055]: File "/usr/local/lib/python2.7/smtplib.py", line 786, in _get_socket
May 25 13:45:23 freenas freenas[3055]: new_socket = socket.create_connection((host, port), timeout)
May 25 13:45:23 freenas freenas[3055]: File "/usr/local/lib/python2.7/socket.py", line 553, in create_connection
May 25 13:45:23 freenas freenas[3055]: for res in getaddrinfo(host, port, 0, SOCK_STREAM):
May 25 13:45:23 freenas freenas[3055]: gaierror: [Errno 8] hostname nor servname provided, or not known
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Do you have a DNS server on 192.168.1.1?

Consider adding OpenDNS servers: 208.67.222.222 and 208.67.220.220
 

ethereal

Guru
Joined
Sep 10, 2012
Messages
762
i have 192.168.1.1 in ipv4 default gateway and i put 8.8.8.8 and 8.8.4.4 in nameserver 1 and 2 - is this where i need to put them ?

the email only works intermittently - if there is a problem with my settings why does it work occaisionally - it should fail 100% of the time

there is still a problem
 

sethgoldin

Dabbler
Joined
May 9, 2015
Messages
24
I'm still experiencing this similar issue.

Here are the console logs when I try to send a test email:

Code:
Sep 16 15:23:22 Jupiter notifier: Waiting for PIDS: 38782.
Sep 16 15:23:22 Jupiter notifier: Starting ntpd.
Sep 16 15:23:22 Jupiter ntpd[82767]: ntpd 4.2.4p5-a (1)
Sep 16 15:23:24 Jupiter ntpd_initres[82769]: host name not found: 0.freebsd.pool.ntp.org
Sep 16 15:23:24 Jupiter ntpd_initres[82769]: host name not found: 1.freebsd.pool.ntp.org
Sep 16 15:23:24 Jupiter ntpd_initres[82769]: host name not found: 2.freebsd.pool.ntp.org
Sep 16 15:24:26 Jupiter ntpd_initres[82769]: host name not found: 0.freebsd.pool.ntp.org
Sep 16 15:24:26 Jupiter ntpd_initres[82769]: host name not found: 1.freebsd.pool.ntp.org
Sep 16 15:24:26 Jupiter ntpd_initres[82769]: host name not found: 2.freebsd.pool.ntp.org


The error message displayed in the web GUI is:
Code:
Your test e-mail could not be sent: [Errno 8] hostname nor servname provided, or not known
.

Has anyone using a Google Apps mail server figured this out? I'd like to know when my scrubs are occurring, what the results of my S.M.A.R.T. tests are, when my UPS is engaged, etc.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Your problem is that your FreeNAS server can't resolve hostnames. If it's picking up its IP configuration via DHCP, your DHCP server should be providing gateway and DNS server information. If you've configured a static IP, you need to make sure the gateway and DNS server settings (and you should really use your own or your ISP's DNS servers; there's no reason you should need to use Google's) are appropriate. This is not a FreeNAS problem.
 

CaptainSensible

Dabbler
Joined
Aug 27, 2015
Messages
17
Yes it is a freenas problem, cause it hasn’t got a native DNS server
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Finding gateway and DNS server information is beyond my understanding. Can you explain?
Your router is likely your DNS and gateway for your home network... Every computer needs to know how to get out to the internet. A DNS translates a hostname to an IP address, and a gateway is literally your gateway to the internet...
 

sethgoldin

Dabbler
Joined
May 9, 2015
Messages
24
I'm routing through a HP Procurve 1810G-24 Switch (J9450A). How could I find the specific DNS and gateway for the connected NAS?
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Your switch is your router? It does NAT?

If its on the same network as all your other machines, it would be the same gateway and DNS settings as every other machine.....
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
If you have access to a Windows PC on your network that is configured using DHCP, you can get the settings off of it. From cmd run "ipconfig /all"
 
Status
Not open for further replies.
Top