email configured correctly but sending to root

Status
Not open for further replies.

whistlepigger

Dabbler
Joined
Jun 9, 2011
Messages
15
Using 8.0 release, configured email alerts to my smtp server.

First problem is that clicking on Send Test mail returns an error
Your test email could not be sent: character mapping must return integer, None or unicode

Second problem is that mail is being sent to root@mydomain.com, and there is no such account. Configuration doesn't seem to allow me to specify a "to" address.
 

eqisow

Cadet
Joined
Jun 11, 2011
Messages
8
Second problem is that mail is being sent to root@mydomain.com, and there is no such account. Configuration doesn't seem to allow me to specify a "to" address.
8.0.1 Beta 2 here, same issue. For me, however, it sends it to freenas.local even if I change my hostname.
 

survive

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

I'm on FreeNAS-8.0.1-BETA2-amd64 as well and am seeing this. Test mail is being sent to "root@freenas.local" instead of the address i provided.

-Will
 

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,754
You're right, the test is broken in BETA2, but in RELEASE this is the intended way, sending e-mail to the one configured in "Change Admin User".

In beta2 the email there was removed and the root one should be used...
 

whistlepigger

Dabbler
Joined
Jun 9, 2011
Messages
15
Now I see the "email" entry in Change Admin User. Thanks. This is a bit confusing though, since we'd expect to setup all the email entries in Settings - Email. Maybe the text there should specify that mail will be sent to the email address specified in Admin User settings. Also, the entries in Settings - Email are also a little confusing. The Username, Password, and Password confirmation fields could be grouped with the authentication box.
 

cbray

Explorer
Joined
Jun 16, 2011
Messages
68
Hi youins,

I'm on FreeNAS-8.0.1-BETA2-i386. My test emaill didn't work until I rebooted.
Now it actually sends a test message to my gmail account but also contains the 'root@freenas.local' address :

Subject: Test message from FreeNAS

Delivery to the following recipient failed permanently:

root@freenas.local

Technical details of permanent failure:
DNS Error: Domain name not found


Harumph
 

adad

Cadet
Joined
May 31, 2011
Messages
2
This issue is still reproduceable in FreeNAS-8.0.1-BETA3-amd64.
 

SilverJS

Patron
Joined
Jun 28, 2011
Messages
255
I started a thread (a little hastily, I now realize - apologies) on this as well. I have the exact same version as the poster above (8.0.1 beta 3 AMD64) and cannot for the life of me find where to tell FreeNAS which address to send the e-mails TO.
 

SilverJS

Patron
Joined
Jun 28, 2011
Messages
255
I have the same issue. And, this is even though all fields are configured correctly in the Email tab.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,972
Well I got mine to work (beta-3) and here's how, maybe you missed something...

1) Setup your network properly. Configure the Gateway and Name Server. For my network both of these are 192.168.1.1 due to my router, yours might be different. If you don't configure these you don't have a path to the internet.
2) Visit the View Users and change root (ID 0) to the email address you desire to receive system emails.
3) Now jump to the Settings - Email GUI and at the top enter the email address that your smtp requires. Enter the outgoing mail server. If you need to change the other items because you have SMTP authentication or a unique outgoing port, do it.
4) Click OK and give it about 30 seconds (it depends on your system, 30 was pulled out my butt, mine takes about 5 seconds) to take affect. Now send a test message.

If you get an error, start over again and double check everything. If that doesn't work, list the error message.
 

SilverJS

Patron
Joined
Jun 28, 2011
Messages
255
Yep, configured all that as per. I can't see in there where to edit the root@freenas.local or wherever FreeNAS is trying to send to. I don't see root@freenas.local anywhere in the e-mail settings tab.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,972

SilverJS

Patron
Joined
Jun 28, 2011
Messages
255
Did you edit your above post? I'm sure it used to say something like Table 3.3c -E-mail Settings or some such. =) In any case, it's all good, I followed step #2 above (THAT was the crucial missing link) and now everything works great. =)

Thanks!
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,972
Glad to help. It took me some extra time to figure out my DNS needed to be configured.
 

dumbbell

Dabbler
Joined
Jul 30, 2011
Messages
11
I have the same issue as the OP ("Your test email could not be sent: character mapping must return integer, None or unicode"). I followed joeschmuck's step-by-step guide (including changing root's mail address) but it didn't solve the problem.

On FreeNAS console, I tried to run msmtp(1) by hand and it worked:
  • "msmtp --serverinfo" can connect to the server and retrieve features and certificate
  • "msmtp recipient@domain.tld" sends a mail successfully

I tried to run the script "/etc/find_alias_for_msmtp.sh root" to verify that root's alias is correct and yes, the mail was sent (and received). So I'm confident that the configuration is correct.

Note: I needed to set "tls_starttls" to "off" in msmtprc.
 
Status
Not open for further replies.
Top