Lines 40-52
Link Here
|
40 |
# Where the rules for tcpserver will be kept: |
40 |
# Where the rules for tcpserver will be kept: |
41 |
TCPRULES_DIR=/etc/tcprules.d |
41 |
TCPRULES_DIR=/etc/tcprules.d |
42 |
|
42 |
|
43 |
if use vmail ; then |
|
|
44 |
# Set up this way so we can get $VMAILUSER during |
45 |
# pkg_config without having to pass more environtment |
46 |
# variables. This text will appear in the "comment" |
47 |
# field for $VMAILUSER in /etc/passwd |
48 |
vmailgecos="Virtual Mail user for qmail-ldap" |
49 |
fi |
50 |
|
43 |
|
51 |
pkg_setup() { |
44 |
pkg_setup() { |
52 |
|
45 |
|
Lines 142-147
Link Here
|
142 |
|
135 |
|
143 |
# What user/group name to use for the virtual user: |
136 |
# What user/group name to use for the virtual user: |
144 |
[ -z "${VMAILUSER}" ] && VMAILUSER="vmail" |
137 |
[ -z "${VMAILUSER}" ] && VMAILUSER="vmail" |
|
|
138 |
|
139 |
|
140 |
# What user/group name to use for the virtual user: |
141 |
[ -z "${VMAILUSER}" ] && VMAILUSER="vmail" |
145 |
|
142 |
|
146 |
# The home directory for $VMAILUSER. All user mail |
143 |
# The home directory for $VMAILUSER. All user mail |
147 |
# will be kept in a subdirectory of $VMAILHOME |
144 |
# will be kept in a subdirectory of $VMAILHOME |
Lines 267-276
Link Here
|
267 |
einfo "Modifying qmail-ldap to work with virtual mail accounts" |
264 |
einfo "Modifying qmail-ldap to work with virtual mail accounts" |
268 |
sed -i -e 's/"homeDirectory"/"notreallyahomeDirectory"/' ${S}/qmail-ldap.h |
265 |
sed -i -e 's/"homeDirectory"/"notreallyahomeDirectory"/' ${S}/qmail-ldap.h |
269 |
|
266 |
|
270 |
echo "11184" > ${WORKDIR}/ldapuid |
|
|
271 |
echo "2110" > ${WORKDIR}/ldapgid |
272 |
echo "${VMAILHOME}" > ${WORKDIR}/ldapmessagestore |
273 |
|
274 |
if [ -n "${VDOMAINS}" ] ; then |
267 |
if [ -n "${VDOMAINS}" ] ; then |
275 |
|
268 |
|
276 |
EPATCH_SINGLE_MSG="Applying patch to allow vpopmail-style virtual domains" \ |
269 |
EPATCH_SINGLE_MSG="Applying patch to allow vpopmail-style virtual domains" \ |
Lines 444-454
Link Here
|
444 |
use spp && doins ${FILESDIR}/control/smtpplugins |
437 |
use spp && doins ${FILESDIR}/control/smtpplugins |
445 |
newins ${FILESDIR}/dot_qmail defaultdelivery |
438 |
newins ${FILESDIR}/dot_qmail defaultdelivery |
446 |
use ssl && doins ${FILESDIR}/${PVR}/servercert.cnf |
439 |
use ssl && doins ${FILESDIR}/${PVR}/servercert.cnf |
447 |
if use vmail; then |
|
|
448 |
doins ${WORKDIR}/ldapuid |
449 |
doins ${WORKDIR}/ldapgid |
450 |
doins ${WORKDIR}/ldapmessagestore |
451 |
fi |
452 |
|
440 |
|
453 |
einfo "Adding qmail.schema to OpenLDAP's schema directory" |
441 |
einfo "Adding qmail.schema to OpenLDAP's schema directory" |
454 |
diropts -o root -g root -m 0755 |
442 |
diropts -o root -g root -m 0755 |
Lines 569-575
Link Here
|
569 |
|
557 |
|
570 |
if use vmail ; then |
558 |
if use vmail ; then |
571 |
enewgroup ${VMAILUSER} 2110 |
559 |
enewgroup ${VMAILUSER} 2110 |
572 |
enewuser "${VMAILUSER}" 11184 /bin/bash "${VMAILHOME}" "${VMAILUSER}" "-c${vmailgecos}" |
560 |
enewuser "${VMAILUSER}" 11184 /bin/bash "${VMAILHOME}" "${VMAILUSER}" "-cVirtual Mail user for qmail-ldap" |
573 |
diropts -m0770 -o ${VMAILUSER} -g ${VMAILUSER} |
561 |
diropts -m0770 -o ${VMAILUSER} -g ${VMAILUSER} |
574 |
keepdir ${VMAILHOME} |
562 |
keepdir ${VMAILHOME} |
575 |
fi |
563 |
fi |
Lines 605-613
Link Here
|
605 |
if ! use notlsbeforeauth ; then |
593 |
if ! use notlsbeforeauth ; then |
606 |
einfo "Enabling STARTTLS before SMTP AUTH" |
594 |
einfo "Enabling STARTTLS before SMTP AUTH" |
607 |
no_relay_string="${no_relay_string},SMTPAUTH=\"TLSREQUIRED\"" |
595 |
no_relay_string="${no_relay_string},SMTPAUTH=\"TLSREQUIRED\"" |
608 |
#else |
|
|
609 |
# ewarn "Enabling SMTP AUTH **WITHOUT** STARTTLS" |
610 |
# no_relay_string="${no_relay_string},SMTPAUTH=\"\"" |
611 |
fi |
596 |
fi |
612 |
else |
597 |
else |
613 |
ewarn "Enabling SMTP AUTH **WITHOUT** STARTTLS" |
598 |
ewarn "Enabling SMTP AUTH **WITHOUT** STARTTLS" |
Lines 681-685
Link Here
|
681 |
[ ! -f ${ROOT}var/qmail/control/ldaprebind ] && \ |
666 |
[ ! -f ${ROOT}var/qmail/control/ldaprebind ] && \ |
682 |
einfo "Allowing qmail-ldap to rebind to the LDAP server (allows for stricter ACLs on passwords)" && \ |
667 |
einfo "Allowing qmail-ldap to rebind to the LDAP server (allows for stricter ACLs on passwords)" && \ |
683 |
echo "1" > ${ROOT}var/qmail/control/ldaprebind |
668 |
echo "1" > ${ROOT}var/qmail/control/ldaprebind |
684 |
|
669 |
if use vmail ; then |
|
|
670 |
local `bzgrep ^VMAILUSER /var/db/pkg/${CATEGORY}/${PF}/environment.bz2` |
671 |
varray=( `egetent passwd ${VMAILUSER} |awk -F : {'print $3" "$4" "$6'}` ) |
672 |
|
673 |
[ ! -f ${ROOT}var/qmail/control/ldapuid ] && \ |
674 |
einfo "Setting ${VMAILUSER}'s uid in ${ROOT}var/qmail/control/ldapuid" |
675 |
echo "${varray[0]}" > ${ROOT}var/qmail/control/ldapuid |
676 |
[ ! -f ${ROOT}var/qmail/control/ldapgid ] && \ |
677 |
einfo "Setting ${VMAILUSER}'s gid in ${ROOT}var/qmail/control/ldapgid" |
678 |
echo "${varray[1]}" > ${ROOT}var/qmail/control/ldapgid |
679 |
[ ! -f ${ROOT}var/qmail/control/ldapmessagestore ] && \ |
680 |
einfo "Setting ${VMAILUSER}'s home directory in ${ROOT}var/qmail/control/ldapmessagestore" |
681 |
echo "${varray[2]}" > ${ROOT}var/qmail/control/ldapmessagestore |
682 |
fi |
685 |
} |
683 |
} |