Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dma added (as default MTA) #428

Merged
merged 2 commits into from
Dec 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions build/dma/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/usr/bin/bash
#
# {{{ CDDL HEADER
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
# }}}
#
# Copyright 2017 OmniOS Community Edition (OmniOSce) Association.
#
#
# Load support functions
. ../../lib/functions.sh

PROG=dma
VER=0.11
VERHUMAN=$VER
PKG=service/network/smtp/dma
SUMMARY="The DragonFly Mail Agent"
DESC="$SUMMARY"

BUILDARCH=32

# adding ASLR flags to compiler and linker since
# dma: gets ASLR if linker flag is set
# dma-mbox-create: gets ASLR if compiler flag is set
export CFLAGS="-O -pipe -Wl,-z,aslr -DHAVE_STRLCPY -DHAVE_GETPROGNAME"
export LDADD="-Wl,-z,aslr -lssl -lcrypto -lresolv -lsocket -lnsl"

export PREFIX=/usr
export SBIN=${PREFIX}/lib/smtp/dma
export LIBEXEC=${PREFIX}/lib/smtp/dma

# No configure
configure32() {
export CC=gcc
export YACC=bison
export LEX=flex
}

make_install() {
logmsg "--- make install"
logcmd $MAKE DESTDIR=${DESTDIR} install install-spool-dirs install-etc || \
logerr "--- Make install failed"

logmsg "--- copying aliases template"
logcmd mkdir -p $DESTDIR/etc/dma || logerr "--- failed to create dir"
logcmd cp $SRCDIR/files/aliases $DESTDIR/etc/dma/aliases || \
logerr "--- failed to copy aliases"
}

init
download_source $PROG "v$VER"
patch_source
prep_build
build
make_isa_stub
make_package
clean_up

# Vim hints
# vim:ts=4:sw=4:et:fdm=marker
10 changes: 10 additions & 0 deletions build/dma/files/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
##
# The aliases file is of the format
# nam: dest1 dest2 ...
# In this case, mails to nam will instead be delivered to dest1 and
# dest2, which in turn could be entries in /etc/aliases. The special
# name ‘*’ can be used to create a catch-all alias, which gets used
# if no other matching alias is found. Use the catch-all alias only
# if you don't want any local mail to be delivered.
##

48 changes: 48 additions & 0 deletions build/dma/local.mog
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2017 OmniOS Community Edition. All rights reserved.
# Use is subject to license terms.
user username=dma uid=26 group=mail gcos-field="DragonFly Mail Agent" \
home-dir=/ password=NP

<transform dir path=var/mail$ -> drop>
<transform file path=etc/dma/ -> set preserve renamenew>
<transform file dir path=etc/dma -> set group mail>
<transform file path=usr/lib/smtp/dma -> set group mail>
<transform file path=usr/lib/smtp/dma/dma -> set mode 2755>
<transform file path=usr/lib/smtp/dma/dma-mbox-create -> set mode 4754>
<transform dir path=var/spool/dma -> set mode 0770>
<transform dir path=var/spool/dma -> set group mail>

# Mediated symlinks
link path=usr/bin/mailq mediator=mta mediator-implementation=dma \
mediator-priority=vendor target=../lib/smtp/dma/dma
link path=usr/lib/sendmail mediator=mta mediator-implementation=dma \
mediator-priority=vendor target=../lib/smtp/dma/dma
link path=usr/sbin/sendmail mediator=mta mediator-implementation=dma \
mediator-priority=vendor target=../lib/smtp/dma/dma
link path=usr/sbin/newaliases mediator=mta mediator-implementation=dma \
mediator-priority=vendor target=../lib/smtp/dma/dma
link path=etc/aliases mediator=mta mediator-implementation=dma \
mediator-priority=vendor target=./dma/aliases

license LICENSE license=BSD
Loading