diff options
author | Valery Kartel <valery.kartel@gmail.com> | 2017-04-24 23:45:41 +0300 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-04-25 08:40:59 +0000 |
commit | d93a16e6ddac2cdebdc59adcf0d755a5d85c65bb (patch) | |
tree | 4fb4aef5607e9bbbd4f983676ef0c1e2b5466551 /community | |
parent | e526a03906bcc61aefa7729e23fdfc5f1579f3d8 (diff) | |
download | aports-d93a16e6ddac2cdebdc59adcf0d755a5d85c65bb.tar.bz2 aports-d93a16e6ddac2cdebdc59adcf0d755a5d85c65bb.tar.xz |
community/exim: move from testing
It works pretty fine.
So, I think, it's time to move it from testing.
Diffstat (limited to 'community')
-rw-r--r-- | community/exim/APKBUILD | 108 | ||||
-rw-r--r-- | community/exim/exim.Makefile | 72 | ||||
-rw-r--r-- | community/exim/exim.confd | 8 | ||||
-rw-r--r-- | community/exim/exim.gencert | 78 | ||||
-rw-r--r-- | community/exim/exim.initd | 29 | ||||
-rw-r--r-- | community/exim/exim.logrotate | 13 | ||||
-rw-r--r-- | community/exim/exim.pre-install | 7 |
7 files changed, 315 insertions, 0 deletions
diff --git a/community/exim/APKBUILD b/community/exim/APKBUILD new file mode 100644 index 0000000000..df470441d3 --- /dev/null +++ b/community/exim/APKBUILD @@ -0,0 +1,108 @@ +# Contributor: Stuart Cardall <developer@it-offshore.co.uk> +# Contributor: Ash Berlin-Taylor <ash.berlin@gmail.com> +# Contributor: Valery Kartel <valery.kartel@gmail.com> +# Contributor: Ćukasz Jendrysik <scadu@yandex.com> +# Contributor: Jesse Young <jlyo@jlyo.org> +# Maintainer: Jesse Young <jlyo@jlyo.org> +pkgname=exim +pkgver=4.89 +pkgrel=4 +pkgdesc="A Message Transfer Agent" +url="http://www.exim.org/" +arch="all" +license="GPL2" +options="!check suid" +depends="ca-certificates" +pkgusers="exim" +pkggroups="exim" +makedepends="bash gawk perl $depends_dev db-dev pcre-dev libressl-dev libspf2-dev mariadb-dev + postgresql-dev sqlite-dev libidn-dev linux-headers" +install="exim.pre-install" +subpackages="$pkgname-cdb $pkgname-dbmdb $pkgname-dnsdb $pkgname-sqlite $pkgname-mysql $pkgname-postgresql + $pkgname-utils $pkgname-scripts::noarch $pkgname-doc" +source="ftp://ftp.exim.org/pub/exim/exim4/$pkgname-$pkgver.tar.xz + exim.Makefile + exim.confd + exim.initd + exim.logrotate + exim.gencert" +builddir="$srcdir/$pkgname-$pkgver" + +prepare() { + default_prepare || return 1 + + cd "$builddir" + cp "$srcdir"/$pkgname.Makefile Local/Makefile || return 1 + sed -i \ + -e 's/-lnsl//g' \ + -e 's/^HAVE_ICONV.*$//' \ + OS/Makefile-Linux +} + +build() { + cd "$builddir" + make makefile || return 1 + make -j1 || return 1 +} + +package() { + cd "$builddir" + install -m750 -D -g mail -d "$pkgdir"/etc/mail + make DESTDIR="$pkgdir" INSTALL_ARG="-no_symlink -no_chown exim" install || return 1 + install -D -m644 doc/exim.8 "$pkgdir"/usr/share/man/man8/exim.8 + cd "$pkgdir"/usr/sbin + mv exim-${pkgver%.*}* exim + chmod u+s exim + for i in mailq rmail rsmtp runq sendmail newaliases; do + ln -s exim $i + done + install -Dm644 "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname + install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname + install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + # Fix clamav local socket path, Add variant to spamd address + sed -i \ + -e 's~# av_scanner = clamd:/tmp/clamd~# av_scanner = clamd:/run/clamav/clamd.sock~' \ + -e '/# spamd_address = 127.0.0.1 783/a# spamd_address = 127.0.0.1 11333 variant=rspamd' \ + "$pkgdir"/etc/$pkgname/$pkgname.conf +} + +scripts() { + pkgdesc="exim scripts" + depends="exim perl" + cd "$builddir" + make DESTDIR="$subpkgdir" \ + INSTALL_ARG="exicyclog exim_checkaccess eximstats exiqgrep exigrep exinext exiqsumm exipick exiwhat convert4r3 convert4r4" \ + install || return 1 + rm -fr "$subpkgdir"/etc +} + +utils() { + pkgdesc="exim utils" + depends="exim" + cd "$builddir" + make DESTDIR="$subpkgdir" \ + INSTALL_ARG="exim_dbmbuild exim_dumpdb exim_tidydb exim_fixdb exim_lock" \ + install || return 1 + install -m755 "$srcdir"/exim.gencert "$subpkgdir"/usr/sbin/exim_gencert || return 1 + rm -fr "$subpkgdir"/etc +} + +_mv_ext() { + pkgdesc="EXIM extension: $1" + depends="$pkgname" + install -D -m755 "$builddir"/build-Linux-*/lookups/$1.so "$subpkgdir"/usr/lib/$pkgname/$1.so +} + +sqlite() { _mv_ext sqlite; } +mysql() { _mv_ext mysql; } +postgresql() { _mv_ext pgsql; } +cdb() { _mv_ext cdb; } +dbmdb() { _mv_ext dbmdb; } +dnsdb() { _mv_ext dnsdb; } + +sha512sums="ce5faef3847a5baf1b4fec1ffe46ce7efaafb24e63bcc52a61f38e8312a88eccaa816c3947ba428bef3eed38b1e91e606f6ed07bc0a3e14c6a6ed0ecb41eb9fa exim-4.89.tar.xz +e9524d3a2cc230b4ecb3b098f53247121b9582fc7807b1549c5a3fd54bb416b837c4e09476f2e01dca03d590a968c40bf90d4b6a9f8a4abad082fdec91916a0f exim.Makefile +bb6f5ead067af19ace661cc92bcd428da97570aedd1f9dc5b61a34e7e3fb3e028be6c96d51df73353bdfcaf69a3ee053fb03d245f868d63ebf518aa96ec82d66 exim.confd +8d0c594c5e3834ddd3a7743c025caf3f5c04f6ac17e25f2278e7a36b726150f0f8e36a1c76cd1a4b454edcb163181ee05ea40a6b61a0e9172c600e4808ccc80f exim.initd +28e748693a6a72d9943fa9c342ff041fe650fa6977f468dee127e845e6c2a91872ce33fb6f5698838906bde3ed92de7a91cdb0349cedc40b806261867e8c06cb exim.logrotate +abdaf749ed3947a75b997caa300bf9f27ef82760f1854aa4521a9ac0f322f1655b65a375bc7a709259daea88bf93cfab5289997fa8e376fac9a3477f09bab642 exim.gencert" diff --git a/community/exim/exim.Makefile b/community/exim/exim.Makefile new file mode 100644 index 0000000000..45e21d6040 --- /dev/null +++ b/community/exim/exim.Makefile @@ -0,0 +1,72 @@ +BIN_DIRECTORY=/usr/sbin +CONFIGURE_FILE=/etc/exim/exim.conf +EXIM_USER=ref:exim +SPOOL_DIRECTORY=/var/spool/exim +ROUTER_ACCEPT=yes +ROUTER_DNSLOOKUP=yes +ROUTER_IPLITERAL=yes +ROUTER_MANUALROUTE=yes +ROUTER_QUERYPROGRAM=yes +ROUTER_REDIRECT=yes +ROUTER_IPLOOKUP=yes +TRANSPORT_APPENDFILE=yes +TRANSPORT_AUTOREPLY=yes +TRANSPORT_PIPE=yes +TRANSPORT_SMTP=yes +TRANSPORT_LMTP=yes +SUPPORT_MAILDIR=yes +LOOKUP_MODULE_DIR=/usr/lib/exim/ +CFLAGS_DYNAMIC=-shared -rdynamic -fPIC +LOOKUP_DBM=2 +LOOKUP_LSEARCH=yes +LOOKUP_DSEARCH=yes +LOOKUP_CDB=2 +LOOKUP_DNSDB=2 +LOOKUP_PASSWD=yes +LOOKUP_MYSQL=2 +LOOKUP_MYSQL_INCLUDE=-I/usr/include/mysql +LOOKUP_MYSQL_LIBS=-Wl,--no-as-needed -lmysqlclient +LOOKUP_PGSQL=2 +LOOKUP_PGSQL_INCLUDE=-I/usr/include/postgresql +LOOKUP_PGSQL_LIBS=-Wl,--no-as-needed -lpq +LOOKUP_SQLITE=2 +LOOKUP_SQLITE_LIBS=-Wl,--no-as-needed -lsqlite3 +PCRE_CONFIG=yes +PCRE_LIBS=-lpcre +WITH_CONTENT_SCAN=yes +WITH_OLD_DEMIME=yes +EXPERIMENTAL_SPF=yes +LDFLAGS += -lspf2 +EXPERIMENTAL_EVENT=yes +EXPERIMENTAL_PROXY=yes +EXPERIMENTAL_CERTNAMES=yes +EXPERIMENTAL_SOCKS=yes +EXPERIMENTAL_INTERNATIONAL=yes +LDFLAGS += -lidn +FIXED_NEVER_USERS=root +AUTH_CRAM_MD5=yes +AUTH_DOVECOT=yes +AUTH_PLAINTEXT=yes +AUTH_SPA=yes +AUTH_TLS=yes +HEADERS_CHARSET="ISO-8859-1" +EXTRALIBS_EXIM=-export-dynamic -rdynamic -ldl +SUPPORT_TLS=yes +USE_OPENSSL_PC=openssl +LOG_FILE_PATH=/var/log/exim/%slog +SYSLOG_LOG_PID=no +EXICYCLOG_MAX=10 +COMPRESS_COMMAND=/bin/gzip +COMPRESS_SUFFIX=gz +ZCAT_COMMAND= +EXPAND_DLFUNC=yes +NO_SYMLINK=yes +SYSTEM_ALIASES_FILE=/etc/mail/aliases +TMPDIR="/tmp" +MAKE_SHELL=/bin/bash +PID_FILE_PATH=/run/exim.pid +HAVE_IPV6=YES +CONFIGURE_FILE_USE_NODE=yes +CONFIGURE_FILE_USE_EUID=yes +SUPPORT_MOVE_FROZEN_MESSAGES=yes +SUPPORT_CRYPTEQ=yes diff --git a/community/exim/exim.confd b/community/exim/exim.confd new file mode 100644 index 0000000000..316674f26b --- /dev/null +++ b/community/exim/exim.confd @@ -0,0 +1,8 @@ +# Command-line options for running exim +#command_args="-bd -q15m" + +# Where to log startup configuration checking +# - /dev/null - silent (default) +# - /dev/tty - show output on curent terminal +# - /path/filename - append to specified logfile +#startuplog=/var/log/exim/startup.log diff --git a/community/exim/exim.gencert b/community/exim/exim.gencert new file mode 100644 index 0000000000..98d04bda1e --- /dev/null +++ b/community/exim/exim.gencert @@ -0,0 +1,78 @@ +#!/bin/sh +set -e + +if [ -n "$EX4DEBUG" ]; then + echo "now debugging $0 $@" + set -x +fi + +DIR=/etc/exim +CERT=$DIR/exim.crt +KEY=$DIR/exim.key + +if ! which openssl > /dev/null ;then + echo "$0: openssl is not installed, exiting" 1>&2 + exit 1 +fi + +if [ "$1" != "--force" ] && [ -f $CERT ] && [ -f $KEY ]; then + echo "[*] $CERT and $KEY exists!" + printf "\n Use \"$0 --force\" to force generation!\n" + exit 0 +fi + +case "$1" in + --force) shift;; + --help) echo "Usage: $0 -or- $0 days keysize"; exit 0;; +esac + +DAYS=${1:-1095} +KEYSIZE=${2:-4096} +SSLEAY="$(mktemp)" && chmod 600 "$SSLEAY" + +cat > "$SSLEAY" <<-EOF + RANDFILE = $HOME/.rnd + [ req ] + default_bits = $KEYSIZE + default_keyfile = exim.key + distinguished_name = req_distinguished_name + [ req_distinguished_name ] + countryName = Country Code (2 letters) + countryName_default = US + countryName_min = 2 + countryName_max = 2 + stateOrProvinceName = State or Province Name (full name) + localityName = Locality Name (eg, city) + organizationName = Organization Name (eg, company; recommended) + organizationName_max = 64 + organizationalUnitName = Organizational Unit Name (eg, section) + organizationalUnitName_max = 64 + commonName = Server name (eg. ssl.domain.tld; required!!!) + commonName_max = 64 + emailAddress = Email Address + emailAddress_max = 40 +EOF + +cat <<-EOF + + [*] Generating a self signed SSL certificate for Exim: + + Key Size = $KEYSIZE Validity = $DAYS days + Key File = $KEY + Cert File = $CERT + +EOF +read -p 'Continue [ Y/n ] ? : ' ans + +case "$ans" in + n*|N*) exit 0;; + *) printf "\n Please enter the hostname of your MTA at the Common Name (CN) prompt:\n" + openssl req -config "$SSLEAY" -x509 -newkey rsa:$KEYSIZE -keyout $KEY -out $CERT -days $DAYS -nodes + rm -f "$SSLEAY" + + chown root:exim $KEY $CERT $DH + chmod 640 $KEY $CERT $DH + + printf "\n[*] Done generating self signed certificates for exim!" + ;; +esac diff --git a/community/exim/exim.initd b/community/exim/exim.initd new file mode 100644 index 0000000000..275279e168 --- /dev/null +++ b/community/exim/exim.initd @@ -0,0 +1,29 @@ +#!/sbin/openrc-run + +description="EXIM internet mailer" +cfgfile=/etc/exim/exim.conf +pidfile=/run/exim.pid +command=/usr/sbin/exim +command_args=${command_args:--bd -q15m} +required_files="$cfgfile" +extra_started_commands="reload" +description_reload="Reload configuration" + +depend() { + use antivirus net + provide mta +} + +start_pre() { + ebegin + checkpath -d -o exim:mail -m750 "/var/log/exim" + checkpath -d -o exim:mail -m750 "/usr/lib/exim" + $command -bV >/dev/null 2>>${startuplog:-/dev/null} + eend $? +} + +reload() { + ebegin "Reloading $RC_SVCNAME" + start-stop-daemon --signal HUP --pidfile $pidfile + eend $? +} diff --git a/community/exim/exim.logrotate b/community/exim/exim.logrotate new file mode 100644 index 0000000000..fb5f5d07d2 --- /dev/null +++ b/community/exim/exim.logrotate @@ -0,0 +1,13 @@ +/var/log/exim/*log { + daily + missingok + rotate 28 + compress + delaycompress + notifempty + create 640 exim mail + sharedscripts + postrotate + /etc/init.d/exim --quiet --ifstarted reload + endscript +} diff --git a/community/exim/exim.pre-install b/community/exim/exim.pre-install new file mode 100644 index 0000000000..fc5167ca7d --- /dev/null +++ b/community/exim/exim.pre-install @@ -0,0 +1,7 @@ +#!/bin/sh + +addgroup -S exim 2>/dev/null +adduser -S -D -H -h /var/spool/exim -s /sbin/nologin -G exim -g exim exim 2>/dev/null +adduser exim mail 2>/dev/null + +exit 0 |