##############################################################################
# Buildout to install the lamson mailserver in logging only mode
#
##############################################################################

[buildout]

parts +=
    lamson
    mailserver_install
    mailserver_bin

lamson-supervisor =   
    25 lamson (redirect_stderr=true stdout_logfile=var/log/lamson.log stderr_logfile=NONE) ${buildout:directory}/bin/lamson-logger


[ports]
mailserver_port = 8825


[lamson]
recipe = minitage.recipe.scripts
eggs = lamson


[mailserver_install]
recipe = plone.recipe.command
command =
# generate lamson projekt
    cd ${buildout:parts-directory}
    ${buildout:directory}/bin/lamson gen -project mailserver -FORCE
# how to use the lamson mailserver
    echo -e "\n\nLAMSON MAILSERVER LOGGER\n\n"

    echo -e "Read sent emails:"
    echo -e "$ cd ${buildout:parts-directory}/mailserver/ "
    echo -e "$ mutt -F muttrc \n"

update-command = ${mailserver_install:command}


[mailserver_bin]
recipe = minitage.recipe.scripts
eggs = lamson
initialization =
        import sys, os
        from lamson import utils
        os.chdir('${buildout:directory}/parts/mailserver')
        settings = utils.make_fake_settings('127.0.0.1', ${ports:mailserver_port})
        settings.receiver.start()
interpreter = lamson-logger
scripts = lamson-logger


[supervisor]
programs +=
    ${buildout:lamson-supervisor}

##############################################################################
# Buildout to install the lamson mailserver in logging only mode
#
##############################################################################

[buildout]

parts +=
    lamson
    mailserver_install
    mailserver_bin

lamson-supervisor =   
    25 lamson (redirect_stderr=true stdout_logfile=var/log/lamson.log stderr_logfile=NONE) ${buildout:directory}/bin/lamson-logger


[ports]
mailserver_port = 8825


[lamson]
recipe = minitage.recipe.scripts
eggs = lamson


[mailserver_install]
recipe = plone.recipe.command
command =
    cd ${buildout:parts-directory}
    ${buildout:directory}/bin/lamson gen -project mailserver -FORCE
    echo>/dev/null '
        LAMSON MAILSERVER LOGGER
    -------------------------------
    Read sent emails:
    $ cd ${buildout:parts-directory}/mailserver/
    $ mutt -F muttrc
    '

update-command = ${mailserver_install:command}


[mailserver_bin]
recipe = minitage.recipe.scripts
eggs = lamson
initialization =
        import sys, os
        from lamson import utils
        os.chdir('${buildout:directory}/parts/mailserver')
        settings = utils.make_fake_settings('127.0.0.1', ${ports:mailserver_port})
        settings.receiver.start()
interpreter = lamson-logger
scripts = lamson-logger


[supervisor]
programs +=
    ${buildout:lamson-supervisor}

Simplify lamson documentation Note that this never worked, as -e is not an option to a POSIX shell echo built-in, but only to /bin/echo
Simplify lamson documentation
Note that this never worked, as -e is not an option to a POSIX shell echo built-in, but only to /bin/echo
