Problem sending e-mails

Status
Not open for further replies.

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
You need to use POP3, not IMAP so change your gmail account back to pop3.

@gpsguy makes a good point and provided a good link that may help you out.

Also, you might want to contact your ISP to see if they did give you an email account, this may be your best bet here.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I must have missed something here--why are we talking about POP3 vs. IMAP? If there's an issue with sending email, wouldn't that be dealing with SMTP?

@Al Slitter, it's hard to troubleshoot when all we know is "it doesn't work." All that tells us is
  • You expect it to do something
  • It does something
  • The something it does, and the something you expected it to do, aren't the same thing
Setting up email isn't rocket surgery, but Gmail does sometimes complicate things (not out of mean-spiritedness, but for security purposes; nonetheless it can be more complicated than some other providers). But let's check some fundamental things first:
  • Can you actually access the Internet from your FreeNAS box? Go to the shell (whether from the console, the web GUI, or (best) via SSH) and do 'ping google.com'. What's the result? Ctrl-C will stop the pinging.
  • Have you configured an email address for the root user? Go to the Accounts button in the web GUI (in the top bar), to Users, and look for the root account. Is there an email address there? Is it a valid address?
  • What are the email settings? Go to the System button, to Email. The From email will need to be a valid address, probably your Gmail address. What are the rest of the settings?
  • If everything is good so far, click the Send Test Email button. What happens? If it doesn't work, does it give an error message? What (exactly) does the message say?
 

Al Slitter

Explorer
Joined
Jan 3, 2016
Messages
88
Hello gpsguy, it was not my intent of causing a double post, this post was related to me wanting to know if I could get an earlier version than 9.3.
DrKK was kind enough to give me a link to the index of previous versions and for that I am very great-full. He however being the gentleman that he is
wanted to know the issues that I was having and offered to help, so thinking that he and I could correspond with each other in an attempt to getting a resolution to the
e-mail issues that I am having.
 

Al Slitter

Explorer
Joined
Jan 3, 2016
Messages
88
Thank you danb for responding !
I have been given so many different opinions on this query and have applied them with the result I am completely overwhelmed by this seemingly simple
request.

As to your request for information as to where I am here is my reply:
  • Can you actually access the Internet from your FreeNAS box? Go to the shell (whether from the console, the web GUI, or (best) via SSH) and do 'ping google.com'. What's the result? Ctrl-C will stop the pinging.
  • I am able to access the Internet now as I was able to bring down form the net the standard Plug-Ins.

  • Have you configured an email address for the root user? Go to the Accounts button in the web GUI (in the top bar), to Users, and look for the root account. Is there an email address there? Is it a valid address?
  • I configured the user "root" to have a valid e-mail address.

  • What are the email settings? Go to the System button, to Email. The From email will need to be a valid address, probably your Gmail address. What are the rest of the settings?
  • I have to rely on my memory right now as I have downed the server but will bring it back up later today.
  • However yes I have specified the e-mail address as my Gmail account.
  • Previously the system had a default from user account that referred to FreeNas as the sender, but with all of the changes being done it is now gone. What value needs to be used?
  • There also in the configuration is a requirement to include a password, my question is this the password for the user "root" or for my Gmail account?

  • If everything is good so far, click the Send Test Email button. What happens? If it doesn't work, does it give an error message? What (exactly) does the message say?
  • I will later today either provide a screen image of the results from above or manually include them.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Did you look at the thread I referenced. There was an example of what to enter in the boxes.

Enter your gmail account password in the password box. If but if you use two factor authentication for gmail, follow the instructions in that thread to configure it.



Sent from my phone
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Hello gpsguy, it was not my intent of causing a double post, this post was related to me wanting to know if I could get an earlier version than 9.3.
DrKK was kind enough to give me a link to the index of previous versions and for that I am very great-full. He however being the gentleman that he is
wanted to know the issues that I was having and offered to help, so thinking that he and I could correspond with each other in an attempt to getting a resolution to the
e-mail issues that I am having.
So just link to one of your other threads. He won't be offended by getting a link to help resolve an issue.

The reality is that a previous version will not resolve your issue.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
What are your issues, exactly, with emails? I think you said something about using gmail. Note that google requires you to "allow less secure accesses" to your email in certain cases if you're going to set it on FreeNAS, for example. The error message the mail server returns includes the page you have to visit to activate it.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472

JDCynical

Contributor
Joined
Aug 18, 2014
Messages
141
Two things that I didn't see mentioned or asked...

  1. Your ISP. Is it a residential account? I ask as many ISP's will block outgoing SMTP on residential accounts, some do it on business accounts as well. Which leads into the next question...
  2. I didn't see if anyone checked to see if you can even reach the SMTP servers for gmail.
From my freenas box:
Code:
dig gmail.com MX
...
;; ANSWER SECTION:
gmail.com.        3600    IN    MX    20 alt2.gmail-smtp-in.l.google.com.
gmail.com.        3600    IN    MX    30 alt3.gmail-smtp-in.l.google.com.
gmail.com.        3600    IN    MX    40 alt4.gmail-smtp-in.l.google.com.
gmail.com.        3600    IN    MX    5 gmail-smtp-in.l.google.com.
gmail.com.        3600    IN    MX    10 alt1.gmail-smtp-in.l.google.com.


Try the following command, you should get something similar:
Code:
telnet gmail-smtp-in.l.google.com 25
Trying 2607:f8b0:400e:c01::1b...
Connected to gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP y27si34483232pfi.79 - gsmtp


A few notes:
  • The ^] is a control-], so use that to get back to the telnet prompt and use quit to exit.
  • The "Trying $ADDRESS" may be different depending on if you are on IPv6 or not.
  • The name you use (gmail-smtp-in.l.google.com in my example) can be any one of the names shown in the answer section above, or run the dig command listed to pull them yourself
  • In addition to the 25, try 465 and 587 as well. One of these should result in a connect response similar to my example
If the command just sits after the 'Trying' line, it is very possible that your ISP is blocking outbound port 25, in which case you will have to ask your ISP if they are blocking and can it be turned off for your account. Many ISP's will not allow it and force residential accounts to relay all outbound mail through their email servers, or just tell their customers to use mail services like gmail or yahoo that are accessed via a web browser.
 
Last edited:

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Justin, the thread I referred the OP to, includes screen shots showing what to enter in the FreeNAS configuration. Instead of using port 25, they are using port 465 which hopefully isn't blocked by the ISP.

The big question is whether or not he's using 2FA. If so, he needs an "application specific password". There's a link on that page to show how to generate one.

Two things that I didn't see mentioned or asked...
 

JDCynical

Contributor
Joined
Aug 18, 2014
Messages
141
Justin, the thread I referred the OP to, includes screen shots showing what to enter in the FreeNAS configuration. Instead of using port 25, they are using port 465 which hopefully isn't blocked by the ISP.

The big question is whether or not he's using 2FA. If so, he needs an "application specific password". There's a link on that page to show how to generate one.
The thread you referenced appears to assume that outbound SMTP isn't blocked, which isn't proven yet in this thread.

You are correct on the port 465/587 checking tho (my post has been updated to reflect this), as I'm sure the OP's machine isn't defined in any MX records. :)

The OP has proven the machine can access the outside world, but there still isn't anything showing that it can talk to said gmail MX servers on the necessary port.
 
Last edited:

Al Slitter

Explorer
Joined
Jan 3, 2016
Messages
88
I have been working on this again without success.
My ISP has SMTP servers however based on memory I do not use them. What I did was sign of for a Gmail account and went from there.
Just a note I have now changed my account back to a POP3 account on Gmail as per an earlier ewcommendation.
With Gmail I am set up for the 2step verification.
Here is some results that I saved when trying several of my ISP's SMTP servers.

Your test email could not be sent: (452, '4.5.2 Could not resolve sender domain.', u'root@freenas.local')
From email: root@freenas.local
Outgoing mail server: relay2.cat.net.th
Port to connect to: 25
TLS/SSL: Plain
Use SMTP Authentication:
Username:
Password:
Password confirmation:

Your test email could not be sent: timed out
From email: root@freenas.local
Outgoing mail server: smtp.tttmaxnet.com
Port to connect to: 25
TLS/SSL: Plain
Use SMTP Authentication:
Username:
Password:
Password confirmation:

Your test email could not be sent: [Errno 8] hostname nor servname provided, or not known
From email: root@freenas.local
Outgoing mail server: telnet relay2.cat.net.th 25
Port to connect to: 25
TLS/SSL: Plain
Use SMTP Authentication:
Username:
Password:
Password confirmation:

In the "Network/Global Configuration menu this is what I have configured:
Hostname: freenas
Domain: local
IPv4 Default Gateway: 192.168.1.1
IPv6 Default Gateway:
Nameserver 1: 8.8.8.8
Nameserver 2: 8.8.4.4
Nameserver 3:
HTTP Proxy:
Enable netwait feature:

MoreInformation_16x16px.png

Netwait IP list:
MoreInformation_16x16px.png

Host name data base:

That is about all I can think about regarding configurations for e-mail.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Yep. The first one appears to have resolved the mail server without difficulty, but your ISP requires that the sender address be valid (as I already mentioned above). They may also require authentication, in which case you'd need to fill in the username and password for SMTP authentication.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
I'm not saying that at some point you might want to try Justin the Cynical's instructions, it's just that I think if you followed the directions in the other thread, it will probably work. If not, then we try something else.
 

survive

Behold the Wumpus
Moderator
Joined
May 28, 2011
Messages
875
Hi Al,

I got gmail working using an "app password":

https://support.google.com/accounts/answer/185833?hl=en

This is basically a login\password for a single device, I had to generate one for each of my filers.

I send mail to "smtp.gmail.com" port 465 with SSL enabled using SMTP auth.

-Will
 
Status
Not open for further replies.
Top