FabriceColin/givemail
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Givemail https://github.com/FabriceColin/givemail previously hosted at https://code.google.com/p/givemail/ Copyright 2009-2025 Fabrice Colin Copyright 2008 Global Sign In Base64.cc includes code Copyright 2005 Nokia Corporation. QuotedPrintable.cc includes code Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007 Free Software Foundation, Inc. Dependencies ------------ The following packages are required: autotools and g++ toolchain ctemplate >= 0.95 http://code.google.com/p/google-ctemplate/ cyrus-sasl https://www.cyrusimap.org/sasl/ doxygen http://www.stack.nl/~dimitri/doxygen/index.html fcgi http://www.fastcgi.com/ help2man http://www.gnu.org/software/help2man libopendkim >= 2.10.0 http://opendkim.org/ libxml2 http://xmlsoft.org/ mod_fcgid >= 2.2 http://fastcgi.coremail.cn/ MySQL >= 8.0 http://www.mysql.com/ OpenSSL >= 0.9.7 http://www.openssl.org/ as well as one of: libesmtp >= 1.0.6 http://www.stafford.uklinux.net/libesmtp/ libetpan >= 1.9.4 http://www.etpan.org/ and one of: curl https://curl.se/ neon https://notroj.github.io/neon/ Building Givemail ----------------- From the source repository : 1. Check out the source code 2. Generate configure and the initial make files For instance : $ ./autogen.sh --prefix=/usr --libdir=/usr/lib64 --enable-debug=yes \ --enable-libetpan=yes Append "--enable-fastcgi=yes" to add support for FastCGI and build the WebAPI. 3. Run make From a source tarball : 1. Untar the source code 2. Run configure For instance : $ ./configure --prefix=/usr --libdir=/usr/lib64 --enable-debug=yes \ --enable-libetpan=yes 3. Run make Installing Givemail ------------------- After building from source, run : $ make install or generate a source tarball of the current code, and build RPMs with : $ make dist $ rpmbuild -ts givemail-version_number.tar.gz $ rpmbuild --rebuild /path/to/rpmtree/SRPMS/givemail-version_number.distro.src.rpm Append "--with debug" to enable DEBUG mode, and "--with fastcgi" to build the WebAPI. If upgrading from an older version, make sure the givemail service is stopped and your configuration is backed up. After upgrade, restore your configuration and restart the service. Configuring Givemail -------------------- The service script will start an instance of givemaild for each .conf file found in the directory "/etc/givemail/conf.d". For each database to be served by givemaild, create a new .conf file and edit the database block : <?xml version="1.0" encoding="utf-8"?> <givemail> <database> <hostname>db.mydomain.com</hostname> <databasename>MyGiveMailDB</databasename> <username>toto</username> <password>titi</password> </database> ... </givemail> Miscellaneous ------------- To generate the doxygen documentation, run : $ make documentation To generate the manual pages, run : $ make manuals To enable debugging (libetpan only), run : $ export GIVEMAIL_DEBUG=Y To enable the verification of all signatures, run : $ export GIVEMAIL_VERIFY_SIGNATURES=Y To disable sending of any message, run : $ export GIVEMAIL_DONT_SEND=Y To protect libesmtp sessions with a mutex, run : $ export GIVEMAIL_MUTEX_SESSIONS=Y To specify a SMTP relay, run : $ export GIVEMAIL_RELAY_ADDRESS=smtp.mydomain.com $ export GIVEMAIL_RELAY_PORT=25 $ export GIVEMAIL_RELAY_STARTTLS=Y|N $ export GIVEMAIL_RELAY_INTERNAL_DOMAIN=mydomain.com $ export GIVEMAIL_RELAY_USER_NAME=username $ export GIVEMAIL_RELAY_PASSWORD=password To test the engine, run : $ ./src/givemail -c sample-emails/givemail.conf -x sample-emails/test-email.xml -u 1:me mailinator.com bozotheclown@mailinator.com Bozo To test DKIM signatures, run : $ GIVEMAIL_VERIFY_SIGNATURES=Y GIVEMAIL_DONT_SEND=Y ./src/givemail -c sample-emails/givemail.conf -x sample-emails/plain-only.xml -m TestPrefixId -e mailinator.com bozotheclown@mailinator.com Bozo To sign a message prior to posting to the WebAPI, run : $ webapi-key-manager --conf sample-emails/givemail.conf --sign sample-api-calls/list-campaigns.xml 1a60838a-7c5c-102b-af7a-0030485eff82 and follow the instructions given by webapi-key-manager. To test the WebAPI on the command line, run : $ WEBAPI_NO_FCGI=Y webapi.fcgi < sample-api-calls/list-campaigns.xml To override the configuration file to be used by the WebAPI, edit /etc/httpd/conf.d/fcgid.conf and add : DefaultInitEnv WEBAPI_CONFIGURATION_FILE /path/to/givemail.conf then restart httpd.