lhost / sendxmpp

perl-script to send xmpp (jabber), similar to what mail(1) does for mail.
64 stars 22 forks source link

Accept user linux as a recipient (like sendmail) #14

Open s-nt-s opened 9 years ago

s-nt-s commented 9 years ago

Hi

I have done a script to use sendxmpp to send messages between linux users You can see there https://github.com/cyttorak/say/blob/master/say and for example sudo say --to juan Hi, Juan send the messages "Hi, Juan" from root (using /root/.sendxmpprc) to juan (using /home/juan/.toxmpp) and I thing maybe you would like to add this feature in sendxmpp Also say --group sudo Hi, sudoers send a messages to all user in a group.

I hope you'll find it interesting. Thank.

lhost commented 9 years ago

Hi,

nice to hear about sendxmpp usage, but your shell script has spanish comments. It is possible to translate messages into english language?

Thanks, LH

s-nt-s commented 9 years ago

Ok, this would be the messages in English: Line 7: There is no recipient available Line 17: There is no members in group $1 Line 22: There is no recipient available in group $1 Line 35: User $TO don't have xmpp account Line 42: $TO is not a recipient. You can try with xmpp account, file, user or group Lines 52-60: Examples: say file.txt cat file.txt | say say < file.txt say Hi, I am a message Use --to to set a recipient. Values admitted: xmpp account, file with xmpp account inside, user or group Use --all to send a message to all the available user in the system Use --group to send a message to all the available user in a group In other case the default recipient is root

ZLightning commented 9 years ago

@santos82

Some Linux/Unix distributions may have different paths for ~/ when using sudo. On some Linux distros, such as Ubuntu, ~/ is the sudo user's own home directory, while on others it would be root's home directory.