Author Topic: Mailx Send Email  (Read 2489 times)

foogee

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
    • vps
Mailx Send Email
« on: August 01, 2012, 02:50:23 pm »
hi,

new here. i hope i can get some help.

i am having trouble sending out email alerts.

Wizard > basic info > Email setup is tested and working.

i created a child device "Mailx" under the Core.

When testing i see this in the error logs. Please point me in the right direction!



test from send command to mailx

==> DCERouter.log <==
08 08/01/12 8:21:44.453  Received Message from 0 (unknown / ) to 49 (Mailx / basement), type 1 id 1075 Command:Send Email, retry none, parameters: <0x4aab1b70>
08 08/01/12 8:21:44.453    Parameter 282(To): myemail@removed.com <0x4aab1b70>
08 08/01/12 8:21:44.453    Parameter 283(Subject): test <0x4aab1b70>
08 08/01/12 8:21:44.453    Parameter 284(MessageBody): test <0x4aab1b70>
05 08/01/12 8:21:44.453  The target device 49 (routed to 49) has not registered. <0xb7700b70>
05 08/01/12 8:21:44.503  Socket::ReceiveData 0x7b767720 failed, bytes left 0 start: 25050000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 161 Incoming_Conn Socket 161 127.0.0.1 <0x4aab1b70>
05 08/01/12 8:21:44.503  Socket::ReceiveString2 ReceiveData failed m_Socket: -1 Incoming_Conn Socket 161 127.0.0.1 <0x4aab1b70>
05 08/01/12 8:21:44.503  TCPIP: Closing connection to -1003 (Router Dev #0) 0x7b767720 m_Socket: -1 <0x4aab1b70>
05 08/01/12 8:21:44.503  Router::RemoveAndDeleteSocket 0x7b767720 -1003 <0x4aab1b70>

==> webExecLog.log <==

01-08-2012 08:21:44 /usr/pluto/bin/MessageSend localhost  0 49 1 1075 282 "myemail@removed.com" 283 "test" 284 "test"\


test from respond to events.
==> DCERouter.log <==
05 08/01/12 8:27:54.532  Socket::ReceiveData 0x7b767050 failed, bytes left 0 start: 25250000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 161 Incoming_Conn Socket 161 192.168.80.1 <0x496afb70>
05 08/01/12 8:27:54.532  Socket::ReceiveString2 ReceiveData failed m_Socket: -1 Incoming_Conn Socket 161 192.168.80.1 <0x496afb70>
05 08/01/12 8:27:54.532  TCPIP: Closing connection to -1003 (Router Dev #0) 0x7b767050 m_Socket: -1 <0x496afb70>
05 08/01/12 8:27:54.532  Router::RemoveAndDeleteSocket 0x7b767050 -1003 <0x496afb70>

==> webExecLog.log <==
01-08-2012 08:27:54 /usr/pluto/bin/MessageSend dcerouter -targetType device 0 49 1 1075 284 DOOR TRIPPED 283 DOOR TRIPPED 282 myemail@removed.com




Armor Gnome

  • Guru
  • ****
  • Posts: 304
    • View Profile
Re: Mailx Send Email
« Reply #1 on: August 02, 2012, 05:31:30 am »
Thank you for posting this, you have made it farther than I have in getting emails to work.  I will be watching this thread and hoping whatever solves your issue works on my install as well.

I am curious when you said "Wizard > basic info > Email setup is tested and working."  how you managed to get that far?  Did you confirm something was sent and arrived in an outside email box or are you saying that no errors came up when you hit test?

I made a wiki!  Click here to check out my system.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Re: Mailx Send Email
« Reply #2 on: August 02, 2012, 09:03:19 am »
05 08/01/12 8:21:44.453  The target device 49 (routed to 49) has not registered. <0xb7700b70>

This is the key line. It means the mailx device isn't running.

Look in Advanced > Devices > find the MailX device, and look at it's Registered: line. It should say Registered: Yes

if it doesn't, this means the device isn't running. select Follow Log, and paste the results.

-Thom

foogee

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
    • vps
Re: Mailx Send Email
« Reply #3 on: August 02, 2012, 02:38:17 pm »
I thought that might be the problem.

It says registered no.

There is no log file.



Device Mailx, # 49   
Device Template Mailx, device category Other apps, manufacturer Pluto.   
Log not found: /var/log/pluto/49_Mailx.log


I tried to delete and create mailx again. Reboot. Same result.

Is there a service I need to start?

That's the difference between mailx and Core > dcerouter > general info plugin > send mail?

Both are giving the same error.


tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Re: Mailx Send Email
« Reply #4 on: August 02, 2012, 05:20:11 pm »
is there a Mailx binary in /usr/pluto/bin ?

-Thom

foogee

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
    • vps
Re: Mailx Send Email
« Reply #5 on: August 02, 2012, 06:09:26 pm »
the binary is not there. i symlinked it to /usr/bin/mailx . same result. it does not register.

==> DCERouter.log <==
05      08/02/12 12:06:14.803           The target device 49 (routed to 49) has not registered. <0x5e9a0b70>
05      08/02/12 12:06:14.853           Socket::ReceiveData 0x9a089d10 failed, bytes left 0 start: 6580000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 161 Incoming_Conn Socket 161 127.0.0.1 <0x5e9a0b70>
05      08/02/12 12:06:14.854           Socket::ReceiveString2 ReceiveData failed m_Socket: -1 Incoming_Conn Socket 161 127.0.0.1 <0x5e9a0b70>
05      08/02/12 12:06:14.854           TCPIP: Closing connection to -1003 (Router Dev #0) 0x9a089d10 m_Socket: -1 <0x5e9a0b70>
05      08/02/12 12:06:14.854           Router::RemoveAndDeleteSocket 0x9a089d10 -1003 <0x5e9a0b70>

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Re: Mailx Send Email
« Reply #6 on: August 02, 2012, 06:15:10 pm »
*thwap-you-really-really-really-really-hard*

Don't do that. Mailx is NOT the mailx binary, but a DCE device we need to talk to. Remove that symlink immediately.

Sorry, I've checked the package repository, and for some reason, the Mailx device isn't being built on 1004. I will coordinate and get this resolved.

-Thom

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Re: Mailx Send Email
« Reply #7 on: August 02, 2012, 07:02:13 pm »
Actually, it looks like the author of mailx moved this to the General Info Plugin:

http://svn.linuxmce.org/trac.cgi/changeset/23074

Sorry, You should use that command instead.
-Thom

foogee

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
    • vps
Re: Mailx Send Email
« Reply #8 on: August 02, 2012, 07:09:44 pm »
link removed! sorry!

tried with general info plugin. (general info plugin is registered)

==> DCERouter.log <==
08      08/02/12 13:07:11.551           Received Message from 0 (unknown / ) to 4 (General Info Plug-in / Living Room/Family Room), type 1 id 1075 Command:Send Email, retry none, parameters: <0x5e9a0b70>
08      08/02/12 13:07:11.551             Parameter 282(To): my@email.com <0x5e9a0b70>
08      08/02/12 13:07:11.551             Parameter 283(Subject): test <0x5e9a0b70>
08      08/02/12 13:07:11.551             Parameter 284(MessageBody): test <0x5e9a0b70>
05      08/02/12 13:07:11.601           Socket::ReceiveData 0x9a089d10 failed, bytes left 0 start: 8230000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 161 Incoming_Conn Socket 161 127.0.0.1 <0x5e9a0b70>
05      08/02/12 13:07:11.601           Socket::ReceiveString2 ReceiveData failed m_Socket: -1 Incoming_Conn Socket 161 127.0.0.1 <0x5e9a0b70>
05      08/02/12 13:07:11.601           TCPIP: Closing connection to -1003 (Router Dev #0) 0x9a089d10 m_Socket: -1 <0x5e9a0b70>
05      08/02/12 13:07:11.601           Router::RemoveAndDeleteSocket 0x9a089d10 -1003 <0x5e9a0b70>

==> webExecLog.log <==
02-08-2012 13:07:11     /usr/pluto/bin/MessageSend localhost  0 4 1 1075 282 "mike@interserver.net" 283 "test" 284 "test"

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Re: Mailx Send Email
« Reply #9 on: August 02, 2012, 07:13:48 pm »
Ok, this leaves postfix. Is postfix running? Do you see anything interesting in syslog, after you execute the messagesend ?

-Tom

foogee

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
    • vps
Re: Mailx Send Email
« Reply #10 on: August 02, 2012, 08:12:34 pm »
OK! im fixed. saw the error in maillog form postfix that was an easy fix. the Mailx in wiki had me going in the wrong direction.  thanks for the help Thom!

just to recap for anyone else having trouble in 1004

step 1.
Wizard > basic info > Email setup
make sure this is working. try to configure your PC with outlook and the same settings and test there first.

Test if it works.
Home > My Devices > Core > DCERouter > General Info Plug-in > send command to device > Send Mail

if it does not work.....

test directly in command line:

mail -v test@test.com
Subject: asdf
just add a period and enter after this line
.
EOT
Mail Delivery Status Report will be mailed to <root>.

see if postfix is running

 pstree | grep master
     |-master-+-pickup

logs go watch.
/var/log/pluto/DCERouter.log
/var/log/mail.log
/var/log/syslog


tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Re: Mailx Send Email
« Reply #11 on: August 02, 2012, 08:16:43 pm »
What was the error in the mail log?

-Thom

foogee

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
    • vps
Re: Mailx Send Email
« Reply #12 on: August 02, 2012, 08:31:04 pm »
it looks like the remote mail server was failing sender verification because the FROM address is root@dcerouter.org. i whitelisted my home ip on the email server for now. now i need to look at how to change root@dcerouter.org to the actual email address. Inside Wizard > Email Setup my from address is setup correctly.


Aug  2 13:46:07 dcerouter postfix/smtp[10303]: 2B62142028C0: to=<my@emailhere.com>, relay=myrelayhere.net[123.123.123.123]:25, delay=0.49, delays=0.15/0/0.17/0.16, dsn=5.0.0, status=bounced (host myrelayhere.net[123.123.123.123] said: 550-Verification failed for <root@dcerouter.org> 550-The mail server could not deliver mail to root@dcerouter.org.  The account or domain may not exist, they may be blacklisted, or missing the proper dns entries. 550 Sender verify failed (in reply to RCPT TO command))

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Re: Mailx Send Email
« Reply #13 on: August 02, 2012, 08:34:28 pm »
This needs to be whatever the hostname is set to, in the Dynamic DNS section, or the external hostname that we derive in the network settings. Anyone want to make a patch?

-Thom

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3012
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Mailx Send Email
« Reply #14 on: August 02, 2012, 08:54:56 pm »
fogee,

please update the wiki page with your findings, and remove the mailx reference.

Thanks.