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