Skip to content

Commit f97c847

Browse files
authored
Merge pull request #428 from hadfl/dma
dma added (as default MTA)
2 parents f79a486 + 459e9a8 commit f97c847

File tree

11 files changed

+559
-1
lines changed

11 files changed

+559
-1
lines changed

build/dma/build.sh

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#!/usr/bin/bash
2+
#
3+
# {{{ CDDL HEADER
4+
#
5+
# This file and its contents are supplied under the terms of the
6+
# Common Development and Distribution License ("CDDL"), version 1.0.
7+
# You may only use this file in accordance with the terms of version
8+
# 1.0 of the CDDL.
9+
#
10+
# A full copy of the text of the CDDL should have accompanied this
11+
# source. A copy of the CDDL is also available via the Internet at
12+
# http://www.illumos.org/license/CDDL.
13+
# }}}
14+
#
15+
# Copyright 2017 OmniOS Community Edition (OmniOSce) Association.
16+
#
17+
#
18+
# Load support functions
19+
. ../../lib/functions.sh
20+
21+
PROG=dma
22+
VER=0.11
23+
VERHUMAN=$VER
24+
PKG=service/network/smtp/dma
25+
SUMMARY="The DragonFly Mail Agent"
26+
DESC="$SUMMARY"
27+
28+
BUILDARCH=32
29+
30+
# adding ASLR flags to compiler and linker since
31+
# dma: gets ASLR if linker flag is set
32+
# dma-mbox-create: gets ASLR if compiler flag is set
33+
export CFLAGS="-O -pipe -Wl,-z,aslr -DHAVE_STRLCPY -DHAVE_GETPROGNAME"
34+
export LDADD="-Wl,-z,aslr -lssl -lcrypto -lresolv -lsocket -lnsl"
35+
36+
export PREFIX=/usr
37+
export SBIN=${PREFIX}/lib/smtp/dma
38+
export LIBEXEC=${PREFIX}/lib/smtp/dma
39+
40+
# No configure
41+
configure32() {
42+
export CC=gcc
43+
export YACC=bison
44+
export LEX=flex
45+
}
46+
47+
make_install() {
48+
logmsg "--- make install"
49+
logcmd $MAKE DESTDIR=${DESTDIR} install install-spool-dirs install-etc || \
50+
logerr "--- Make install failed"
51+
52+
logmsg "--- copying aliases template"
53+
logcmd mkdir -p $DESTDIR/etc/dma || logerr "--- failed to create dir"
54+
logcmd cp $SRCDIR/files/aliases $DESTDIR/etc/dma/aliases || \
55+
logerr "--- failed to copy aliases"
56+
}
57+
58+
init
59+
download_source $PROG "v$VER"
60+
patch_source
61+
prep_build
62+
build
63+
make_isa_stub
64+
make_package
65+
clean_up
66+
67+
# Vim hints
68+
# vim:ts=4:sw=4:et:fdm=marker

build/dma/files/aliases

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
##
2+
# The aliases file is of the format
3+
# nam: dest1 dest2 ...
4+
# In this case, mails to nam will instead be delivered to dest1 and
5+
# dest2, which in turn could be entries in /etc/aliases. The special
6+
# name ‘*’ can be used to create a catch-all alias, which gets used
7+
# if no other matching alias is found. Use the catch-all alias only
8+
# if you don't want any local mail to be delivered.
9+
##
10+

build/dma/local.mog

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# CDDL HEADER START
2+
#
3+
# The contents of this file are subject to the terms of the
4+
# Common Development and Distribution License, Version 1.0 only
5+
# (the "License"). You may not use this file except in compliance
6+
# with the License.
7+
#
8+
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9+
# or http://www.opensolaris.org/os/licensing.
10+
# See the License for the specific language governing permissions
11+
# and limitations under the License.
12+
#
13+
# When distributing Covered Code, include this CDDL HEADER in each
14+
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15+
# If applicable, add the following below this CDDL HEADER, with the
16+
# fields enclosed by brackets "[]" replaced with your own identifying
17+
# information: Portions Copyright [yyyy] [name of copyright owner]
18+
#
19+
# CDDL HEADER END
20+
#
21+
#
22+
# Copyright 2017 OmniOS Community Edition. All rights reserved.
23+
# Use is subject to license terms.
24+
user username=dma uid=26 group=mail gcos-field="DragonFly Mail Agent" \
25+
home-dir=/ password=NP
26+
27+
<transform dir path=var/mail$ -> drop>
28+
<transform file path=etc/dma/ -> set preserve renamenew>
29+
<transform file dir path=etc/dma -> set group mail>
30+
<transform file path=usr/lib/smtp/dma -> set group mail>
31+
<transform file path=usr/lib/smtp/dma/dma -> set mode 2755>
32+
<transform file path=usr/lib/smtp/dma/dma-mbox-create -> set mode 4754>
33+
<transform dir path=var/spool/dma -> set mode 0770>
34+
<transform dir path=var/spool/dma -> set group mail>
35+
36+
# Mediated symlinks
37+
link path=usr/bin/mailq mediator=mta mediator-implementation=dma \
38+
mediator-priority=vendor target=../lib/smtp/dma/dma
39+
link path=usr/lib/sendmail mediator=mta mediator-implementation=dma \
40+
mediator-priority=vendor target=../lib/smtp/dma/dma
41+
link path=usr/sbin/sendmail mediator=mta mediator-implementation=dma \
42+
mediator-priority=vendor target=../lib/smtp/dma/dma
43+
link path=usr/sbin/newaliases mediator=mta mediator-implementation=dma \
44+
mediator-priority=vendor target=../lib/smtp/dma/dma
45+
link path=etc/aliases mediator=mta mediator-implementation=dma \
46+
mediator-priority=vendor target=./dma/aliases
47+
48+
license LICENSE license=BSD

0 commit comments

Comments
 (0)