The ‘echo’ command

The mail command ‘echo’ simply replies with the original command and arguments to the sender.

>>> command = config.commands['echo']
>>> command.name
'echo'
>>> command.argument_description
'[args]'
>>> print command.description
Echo an acknowledgement.  Arguments are return unchanged.

The original message is ignored, but the results receive the echoed command.

>>> mlist = create_list('test@example.com')

>>> from mailman.queue.command import Results
>>> results = Results()

>>> from mailman.email.message import Message
>>> print command.process(mlist, Message(), {}, ('foo', 'bar'), results)
ContinueProcessing.yes
>>> print unicode(results)
The results of your email command are provided below.
<BLANKLINE>
echo foo bar
<BLANKLINE>

Previous topic

Command line list creation

Next topic

The ‘end’ command

This Page