1 <samba:parameter name="message command"
4 advanced="1" developer="1"
5 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
7 <para>This specifies what command to run when the
8 server receives a WinPopup style message.</para>
10 <para>This would normally be a command that would
11 deliver the message somehow. How this is to be done is
12 up to your imagination.</para>
16 <command moreinfo="none">message command = csh -c 'xedit %s;rm %s' &</command>
20 <para>This delivers the message using <command moreinfo="none">xedit</command>, then
21 removes it afterwards. <emphasis>NOTE THAT IT IS VERY IMPORTANT
22 THAT THIS COMMAND RETURN IMMEDIATELY</emphasis>. That's why I
23 have the '&' on the end. If it doesn't return immediately then
24 your PCs may freeze when sending messages (they should recover
25 after 30 seconds, hopefully).</para>
27 <para>All messages are delivered as the global guest user.
28 The command takes the standard substitutions, although <parameter moreinfo="none">
29 %u</parameter> won't work (<parameter moreinfo="none">%U</parameter> may be better
32 <para>Apart from the standard substitutions, some additional
33 ones apply. In particular:</para>
37 <para><parameter moreinfo="none">%s</parameter> = the filename containing
42 <para><parameter moreinfo="none">%t</parameter> = the destination that
43 the message was sent to (probably the server name).</para>
47 <para><parameter moreinfo="none">%f</parameter> = who the message
52 <para>You could make this command send mail, or whatever else
53 takes your fancy. Please let us know of any really interesting
54 ideas you have.</para>
57 Here's a way of sending the messages as mail to root:
59 <command moreinfo="none">message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s</command>
63 <para>If you don't have a message command then the message
64 won't be delivered and Samba will tell the sender there was
65 an error. Unfortunately WfWg totally ignores the error code
66 and carries on regardless, saying that the message was delivered.
70 If you want to silently delete it then try:
72 <command moreinfo="none">message command = rm %s</command>
77 <value type="default"></value>
78 <value type="example">csh -c 'xedit %s; rm %s' &</value>