News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

Mailx Send Email

Started by foogee, August 01, 2012, 02:50:23 PM

Previous topic - Next topic

foogee

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

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 [url=http://wiki.linuxmce.org/index.php/User:Armorgnome2]here[/url] to check out my system.

tschak909

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

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

is there a Mailx binary in /usr/pluto/bin ?

-Thom

foogee

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

*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

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

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

Ok, this leaves postfix. Is postfix running? Do you see anything interesting in syslog, after you execute the messagesend ?

-Tom

foogee

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

What was the error in the mail log?

-Thom

foogee

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

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

Marie.O

fogee,

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

Thanks.
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]