Page 1 of 1

XMPP client on iOS

Posted: Thu May 26, 2016 1:30 pm
by sajbersapiens
I managed to setup two xmpp accounts.
Nethome is sending messages OK to "my" account as long as my client is active.

On my Windows PC I tried "Pidgin" http://pidgin.im/
Works fine! Client is online in the background an recieves messages.

On my iPhone I chosed "ChatSecure" https://chatsecure.org/
Works as long as the client is online. But it gets off-line if I´m not active so "MessageInteractor" send-recieve works fine, but not trigger-sebd.

Any ideas on a better iOS client?

Re: XMPP client on iOS

Posted: Fri May 27, 2016 10:48 pm
by stefangsbb
It seems hard finding a decent one for ios, try Trillian

Re: XMPP client on iOS

Posted: Sat May 28, 2016 3:00 pm
by sajbersapiens
AstraChat works better, but only as long as the app is started. Good enough for now.

Still no success in sending mail though..

I tried to give user Nethome sudo rights on ssmtp command but no mail.

On LXterminal this works fine:
sudo smtp mymail@adress.com < /home/pi/message.txt

But the same command in a trigger in Nethome won´t work. Why??

Re: XMPP client on iOS

Posted: Sun May 29, 2016 1:59 pm
by stefangsbb
It may not be enough to have the right to run the program, it may require other accesses as well. Try to write:

Code: Select all

sudo su nethome
to act as nethome, and then try to send the mail. Then you will see what kind of error you get.

Re: XMPP client on iOS

Posted: Sun May 29, 2016 6:57 pm
by sajbersapiens
stefangsbb wrote:It may not be enough to have the right to run the program, it may require other accesses as well. Try to write:

Code: Select all

sudo su nethome
to act as nethome, and then try to send the mail. Then you will see what kind of error you get.

Code: Select all

sudo su nethome
Works fine!

Then

Code: Select all

sudo smtp mymail@adress.com < /home/pi/message.txt
I get this message:
We trust you have received the usual lecture...
and so on..
And then I need the password for nethome :-(

Re: XMPP client on iOS

Posted: Thu Jun 02, 2016 8:36 pm
by stefangsbb
Well, you cannot do "sudo" in a automated script or any command that Nethome is running. Sudo requires that you are running in an interactive session where the user can enter the root password. After you have done the sudo su nethome, you should try to do the "smtp mymail@adress.com < /home/pi/message.txt" and see what fails. I guess you need to add the nehome user to some groups to allow this.

Re: XMPP client on iOS

Posted: Sat Jun 04, 2016 7:58 pm
by sajbersapiens
Nothing fails when I do the command

Code: Select all

ssmtp mymail@adress.com < /home/pi/message.txt
in the terminal window as nethome@raspberrypi.
The mail is working.

But when I do a ValueTrigger with this command:

Code: Select all

exec,ssmtp mymail@adress.com < /home/pi/message.txt
nothing happens.

WHere can I find a error log? No error in Nethome log.

Re: XMPP client on iOS

Posted: Sun Jun 05, 2016 2:27 pm
by stefangsbb
Unfortunately, you cannot see those logs. I suspect the problem is that since the command is not running in a shell, it does to have any $PATH, so it does not find the ssmtp-command. Try specifying the whole path to the ssmtp-command.

Re: XMPP client on iOS

Posted: Mon Jun 06, 2016 8:45 pm
by sajbersapiens
OK, I tried to add

Code: Select all

/usr/sbin/ssmtp mail@adrss.com > /home/pi/message.txt
but no success.
It worked in the command line on the RPi