Skip to content

Commit cb83999

Browse files
committed
dma added
1 parent 310404f commit cb83999

File tree

10 files changed

+613
-1
lines changed

10 files changed

+613
-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: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#
2+
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
3+
# Use is subject to license terms.
4+
#
5+
# CDDL HEADER START
6+
#
7+
# The contents of this file are subject to the terms of the
8+
# Common Development and Distribution License, Version 1.0 only
9+
# (the "License"). You may not use this file except in compliance
10+
# with the License.
11+
#
12+
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13+
# or http://www.opensolaris.org/os/licensing.
14+
# See the License for the specific language governing permissions
15+
# and limitations under the License.
16+
#
17+
# When distributing Covered Code, include this CDDL HEADER in each
18+
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19+
# If applicable, add the following below this CDDL HEADER, with the
20+
# fields enclosed by brackets "[]" replaced with your own identifying
21+
# information: Portions Copyright [yyyy] [name of copyright owner]
22+
#
23+
# CDDL HEADER END
24+
#
25+
#
26+
#ident "%Z%%M% %I% %E% SMI"
27+
28+
##
29+
# Aliases can have any mix of upper and lower case on the left-hand side,
30+
# but the right-hand side should be proper case (usually lower)
31+
#
32+
# >>>>>>>>>> The program "newaliases" must be run after
33+
# >> NOTE >> this file is updated for any changes to
34+
# >>>>>>>>>> show through to sendmail.
35+
##
36+
37+
##
38+
# The aliases file is of the format
39+
# nam: dest1 dest2 ...
40+
# In this case, mails to nam will instead be delivered to dest1 and
41+
# dest2, which in turn could be entries in /etc/aliases. The special
42+
# name ‘*’ can be used to create a catch-all alias, which gets used
43+
# if no other matching alias is found. Use the catch-all alias only
44+
# if you don't want any local mail to be delivered.
45+
##
46+
47+
# The following alias is required by the mail protocol, RFC 2821
48+
# Set it to the address of a HUMAN who deals with this system's mail problems.
49+
postmaster: root
50+
51+
# Alias for mailer daemon; returned messages from our MAILER-DAEMON
52+
# should be routed to our local Postmaster.
53+
MAILER-DAEMON: postmaster
54+
55+
# General redirections for pseudo accounts.
56+
bin: root
57+
daemon: root
58+
system: root
59+
toor: root
60+
uucp: root
61+
62+
# Well-known aliases.
63+
manager: root
64+
dumper: root
65+
operator: root
66+
67+
# trap decode to catch security attacks
68+
decode: root
69+
70+
# Aliases to handle mail to programs or files, eg news or vacation
71+
nobody: /dev/null
72+
73+
# Sample aliases:
74+
75+
# Alias for distribution list, members specified here:
76+
#staff:wnj,mosher,sam,ecc,mckusick,sklower,olson,rwh@ernie
77+
78+
# Alias for distribution list, members specified elsewhere:
79+
#keyboards: :include:/usr/jfarrell/keyboards.list
80+
81+
# Alias for a person, so they can receive mail by several names:
82+
#epa:eric
83+
84+
#######################
85+
# Local aliases below #
86+
#######################
87+

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)