Alambic has its configuration in a single configuration file. We recommend you use the provided template to create your custom configuration file.

The configuration is set up by giving values to primitives in the config file. Those values are given by adding a line of the form PRIMITIVE=VALUE to the configuration file (no space around the equal sign). The last value appearing for a given primitive is the one used by Alambic.

Lines not containing a valid primitive are ignored.

The configuration primitives are described below:

Lang

This primitive selects the language Alambic will use for its output and log messages. For now only french (fr), german (de) and english (en) are possible values. If an unsupported value is given for this primitive, Alambic will fallback to english.
WorkDir
The value of this primitive is the name of a directory in which Alambic will create all of its work files. Those files include the message files sent to the users, the temporary PostScript files created before PDF creation, and the resulting PDF files, be they temporary or not. This directory must be writable by the root user and have sufficient free space for Alambic to operate properly.
URLPrefix
This primitive must appear in the configuration file if you wish to offer the HTTP retrieval of the generated PDF documents. Its value is the URL prefix to prepend to the URLs for PDF files. If this primitive is set, the WorkDir directory must contain a subdirectory htdocs in which the PDF files to be retrieved by HTTP will be created. Please see the documentation on configuring Apache to run with Alambic. Also note that if HTTP retrieval is enabled, you should set up a periodic purge of the htdocs directory (for example by removing files older than 2 hours).
UserCf
This primitive selects the method by which email addresses are associated with a username. The value of this primitive is either a path to a program or script to call or a string of the form builtin:/PATH/TO/USER/DATABASE. The file /PATH/TO/USER/DATABASE contains lines of the form username:emails where emails is a list of email addresses to which to send PDF documents requested by username. If an empty username appears in the file, the associated emails field will be the default list of addresses for user names not appearing elsewhere in the file. If this list contains several addresses, they must be separated by a space. In case a program or script is specified, it will be called with the requesting username as single argument, it must then output data in the same format as that of the /PATH/TO/USER/DATABASE file.
PDFGen
The value of this primitive is the command to use for the PostScript to PDF conversion. The first occurence of %s in this string will be replaced with the path of the PostScript file, the second with that of the PDF file. If you use Ghostscript for example, this value could be ps2pdf %s %s.
LogFile
This primitive sets the log file Alambic should use. If no log file is set, logging will be done to syslog is the related syslog primitives were set, or to the standard error if not. This file is open and closed by each invocation of Alambic, it can therefore easily be rotated by renaming it using the mv unix command.
SyslogHost
The value of this primitive determines the host to send syslog messages to. If not set logging will be done in the specified log file or onto the standard error.
SyslogPort
The value of this primitive sets the port to use for syslog messages. This primitive should most of the time be omitted, the default syslog port (514) would then be used.
SyslogFacility
This primitive sets the syslog facility used by Alambic for its syslog messages. The value should be one of auth, authpriv, cron, daemon, kern, lpr, mail, news, syslog, user, uucp, ftp and local0 through local7. If no facility is specified, the lpr facility will be used.
SMTPHost
The value of this primitive is the host name or IP address of the SMTP server Alambic will use to send its email messages.
SMTPPort
This primitive sets the port to use to contact the SMTP server. This primitive should usually be omitted, the default port (25) will then be used.
SMTPMax
This primitive sets the maximum size in bytes of the PDF files which will be sent by email. If a generated PDF file has a size greater than this limit and URLPrefix was specified, then the PDF file will be stored on the Alambic server and a link to it will be sent to the requesting user. If the value of SMTPMax is set to 0, no limit will be enforced and all PDF files will be sent by email, even if URLPrefix was specified. If SMTPMax is not set in the configuration file, then only HTTP retrieval will be possible, if URLPrefix was not set either, then Alambic will be unable to distribute the generated PDF files.
MailFrom
This sets the address appearing in the From: header of all the emails Alambic will generate. This address should be a valid address to which users of the service could send messages in case of problems.
KeepBadPS
This primitive of type boolean determines what to do with the PostScript files that could not be converted to PDF. If no value is specified or if the value is false, the PostScript files will be deleted. If the value is true, they will be renamed after the requesting user and the timestamp of the request and left in WorkDir.

Now that you know everything about the configuration file, you can learn how to configure CUPS to operate with Alambic.