Package: infrae.maildrophost
infrae.maildrophostis used to configure a maildrophost server andMaildropHostproduct using the same configuration, and create a
management script for the maildrophost server.In addition to those tasks, it used to download and installMaildropHostwhen it was not distributed as an egg. If you are
looking for those features, please have a look at the version 1.x of
this recipe.Example in buildout:[buildout]
parts =
    maildrophost
    instance

[maildrophost]
recipe = infrae.maildrophost
smtp_host = localhost
smtp_port = 25

[instance]
...
eggs +=
   Products.MaildropHost
zope-conf-additional +=
<product-config maildrophost>
  config-path-application ${maildrophost:maildrophost.cfg}
</product-config>This will create the configuration filemaildrophost.cfgfor the
daemon, and put a start/stop script in thebindirectory of the
buildout tree.Spool and PID files are put by default in thevar/maildropdirectory, so data is preserved when update (if there is any data).SettingsYou can customize some of settings ofMaildropHost:mail_dirDirectory to use ashome directoryfor the deamon. By default it’s${buildout:directory}/var/maildropIt will be created if it
doesn’t exists.spool_dirDirectory to use as a spool. By default it will be${mail_dir}/spool. The directory will be created if it doesn’t
exist already.pid_filePID file to use for the daemon. By default it will be${mail_dir}/maildrop.pid.smtp_hostSMTP server to use. Default to localhost.smtp_portPort to use. Default to default SMTP port, 25.loginIf the SMTP server require authentication, login to use.passwordIf the SMTP server require authentication, password to use.tlsIf 1,MaildropHostwill be speaking to a TLS enabled SMTP server.batchSetMAILDROP_BATCH.add_messageidAdd a message id to the sent mail.pool_intervalMust be an integer which define the interval in seconds between two
check for new mail in the spool directory. Default is 120 seconds.wait_intervalMust be an interger or float which say how much time the daemon
should wait between sending two mails to the mail server.supervised_daemonIf 1, the internal maildrop script will remain running in the
foreground.  This is mostly useful when you start the main
maildrophost script itself on the foreground withbin/maildrophost fg.  See theConfiguration for supervisorsection.maildrophost.cfgSpecify an alternative path for storing the generatedmaildrophost.cfgfile.  Note that this file gets rewritten each
time you run buildout.  The default value is${buildout:directory}/maildrophost.cfg.Configuration for supervisorBuildout generates abin/maildrophostscript (if you usemaildrophostas the name of the buildout section).  When callingbin/maildrophost startthis script does some checks and basically
callspython maildrop.py maildrophost.cfgand quits, without
waiting to for themaildrop.pyscript to exit properly.  Themaildrop.pyscript creates a fork of itself and exits.This is not helpful when you want to use maildrophost in combination
withsupervisor.  If you want to do that
you should enable thesupervised_daemonoption and let supervisor
start the maildrophost script on the foreground.  Sample config would
be this:[maildrophost]
recipe = infrae.maildrophost
smtp_host = localhost
smtp_port = 25
supervised_daemon = 1

[supervisor]
recipe = collective.recipe.supervisor
...
programs =
    ...
    40 maildrop ${buildout:directory}/bin/maildrophost [fg] trueLatest versionThe latest version is available in aSubversion repository.History2.2 (2013-10-07)Addfgcommand line option to start the script on the
foreground.  For best results, combine this with enabling thesupervised_daemonoption. Patch provided by Maurits van Rees
from Zest Software.2.1 (2013-08-19)Update recipe to include the deamon script itself and update it to
work with Python 2.6 and 2.7. This script used to require Python
2.4.Update the start/stop script to be more reliable with the help ofpsutil.2.0 (2012-08-23)Update recipe to work with the egg distribution of MaildropHost,
still creating the configuration and start/stop script for the
daemon in buildout.1.2 (2009-02-13)Fixdownload-cachevsdownload-directory. Don’t assume the
user already set it.Add optionswait_interval,add_messageid,batch,tls,pid_file,spool_dir,mail_dir.Remove the relative to buildout directory optionmail-dirwhich
was almost useless.Improve the control script.1.1 (2009-01-23)Added support for MaildropHost >= 1.22 (added a version option, so
the recipe can guess the config file name)1.0.1Fix the config file for Windows paths.1.0Define thelocationin options, so you could refer to the
product folder with${maildrophost:location}for exemple.Add thetargetoption to use a specific destination folder for
the product.Add maildrophost optionslogin,password, andpoll_interval.0.1First release, download and install MaildropHost product, make aconfig.pyand create simple script for start and stop purpose.