Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 28637 Details for
Bug 36060
MailScanner ebuild
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
initd.mailscanner-mta
mailscanner-mta (text/plain), 5.62 KB, created by
Kevin Spicer
on 2004-04-03 11:26:43 UTC
(
hide
)
Description:
initd.mailscanner-mta
Filename:
MIME Type:
Creator:
Kevin Spicer
Created:
2004-04-03 11:26:43 UTC
Size:
5.62 KB
patch
obsolete
>#!/sbin/runscript ># Tis init script takes care of starting the MTA processes for use ># with MailScanner. > >opts="${opts} status reload startin startout stopin stopout restartin restartout" > >checkmta() { > ebegin "checking MTA availability for MailScanner" > if [ ${MTA} = 'sendmail' ]; then > if [ -f ${SENDMAIL} ]; then > eend 0 > return > else > echo "Cannot find sendmail, check /etc/conf.d/mailscanner-mta" > eend 1 > exit > fi > elif [ ${MTA} = "postfix" ]; then > if test -x ${POSTFIX} -a -f ${POSTFIXINCF}/main.cf \ > -a -f ${POSTFIXOUTCF}/main.cf ; then > eend 0 > return > else > echo "Cannot find postfix and/or postfix configuration files," > echo "Check /etc/conf.d/mailscanner-mta" > eend 1 > exit > fi > elif [ ${MTA} = "exim" ]; then > if test -x ${EXIM} -a -f ${EXIMINCF} -a -f ${EXIMSENDCF}; then > eend 0 > return > else > echo "Cannot find exim and/or exim configuration files," > echo "Check /etc/conf.d/mailscanner-mta" > eend 1 > exit > fi > else > echo "Invalid MTA in /etc/conf.d/mailscanner-mta" > eend 1 > exit > fi >} >aliasesetc() { > /usr/bin/newaliases > /dev/null 2>&1 > retval=$? > if test -x /usr/bin/make -a -f /etc/mail/Makefile ; then > make -C /etc/mail -s > let retval+=$? > else > for i in virtusertable access domaintable mailertable ; do > if [ -f /etc/mail/$i ] ; then > makemap hash /etc/mail/$i < /etc/mail/$i > let retval+=$? > fi > done > fi > return ${retval} >} > >startinreal () { > if [ ${MTA} = "sendmail" ]; then > ( cd /var/spool/mqueue.in; rm -f xf*) > aliasesetc > ${SENDMAIL} -bd -OPrivacyOptions=noetrn \ > -ODeliveryMode=queueonly \ > -OQueueDirectory=${INQDIR} \ > -OPidFile=${INPID} > retval=$? > touch ${SMPID} > chown ${MSPUSER}:${MSPGROUP} ${SMPID} 2> /dev/null > ${SENDMAIL} -L sm-msp-queue -Ac -q15m -OPidFile=${SMPID} 2> /dev/null > let retval+=$? > return ${retval} > elif [ ${MTA} = "postfix" ]; then > ${POSTFIX} -c ${POSTFIXINCF} start 2> /dev/null > return $? > elif [ ${MTA} = "exim" ]; then > ${EXIM} -c ${EXIMINCF} start 2> /dev/null > return $? > fi >} > >startoutreal() { > if [ ${MTA} = "sendmail" ]; then > ${SENDMAIL} $([ -n "${QUEUETIME}" ] && echo -q${QUEUETIME}) \ > -OPidFile=${OUTPID} > return $? > elif [ ${MTA} = "postfix" ]; then > ${POSTFIX} -c ${POSTFIXOUTCF} start 2> /dev/null > return $? > elif [ ${MTA} = "exim" ]; then > ${EXIM} -c ${EXIMSENDCF} -q15m 2> /dev/null > return $? > fi >} > >stopinreal() { > if [ ${MTA} = "sendmail" ]; then > kill ${KILL_OPTS} `head -1 ${INPID}` 2> /dev/null > retval=$? > kill ${KILL_OPTS} `head -1 ${SMPID}` 2> /dev/null > let retval+=$? > return ${retval} > elif [ ${MTA} = "postfix" ]; then > ${POSTFIX} -c ${POSTFIXINCF} stop 2> /dev/null > return $? > fi >} > >stopoutreal() { > if [ ${MTA} = "sendmail" ]; then > kill ${KILL_OPTS} `head -1 ${OUTPID}` 2> /dev/null > return $? > elif [ ${MTA} = "postfix" ]; then > ${POSTFIX} -c ${POSTFIXOUTCF} stop 2> /dev/null > return $? > fi >} > > > > >depend() { > need net > use logger dns > provide mta >} > >start() { > checkmta > ebegin "Starting incoming ${MTA}" > startinreal > retval=$? > eend ${retval} > if [ ${retval} -gt 0 ]; then > exit > fi > ebegin "Starting outgoing ${MTA}" > startoutreal > retval=$? > eend ${retval} > if [ ${retval} -gt 0 ]; then > echo "Will attempt to stop incoming ${MTA}" > stopinreal > fi >} > >stop() { > checkmta > if [ ${MTA} = "exim" ]; then > ebegin "Stopping exim" > killall ${KILL_OPTS} exim > eend $? > else > ebegin "Stopping incoming ${MTA}" > stopinreal > eend $? > ebegin "Stopping outgoing ${MTA}" > stopoutreal > eend $? > fi >} > >startin() { > checkmta > ebegin "Starting incoming ${MTA}" > startinreal > eend $? >} > >startout() { > checkmta > ebegin "Starting outgoing ${MTA}" > startoutreal > eend $? >} > >stopin() { > checkmta > if [ ${MTA} = "exim" ]; then > ebegin "Stopping incoming exim" > echo "It is not possible to stop only the incoming exim."; > echo "Please use the stop option, then use startin or startout to restart" > echo "the incoming or outgoing process." > eend 1 > else > ebegin "Stopping incoming ${MTA}" > stopinreal > eend $? > fi >} > >stopout() { > checkmta > if [ ${MTA} = "exim" ]; then > ebegin "Stopping outgoing exim" > echo "It is not possible to stop only the outgoing exim."; > echo "Please use the stop option, then use startin or startout to restart" > echo "the incoming or outgoing process." > eend 1 > else > ebegin "Stopping outgoing ${MTA}" > stopoutreal > eend $? > fi >} > >restartin() { > stopin > startin >} > >restartout() { > stopout > startout >} > >status() { > if [ ${MTA} = 'sendmail' ]; then > ebegin "Incoming Sendmail status" > pid=`head -1 ${INPID}` > alive=`ps ax | awk '{ print $1 }' | grep '^'$pid'$'` > if [ -z "${alive}" ]; then eend 1; else eend 0; fi > ebegin "Client submission Sendmail status" > pid=`head -1 ${SMPID}` > alive=`ps ax | awk '{ print $1 }' | grep '^'$pid'$'` > if [ -z "${alive}" ]; then eend 1; else eend 0; fi > ebegin "Outgoing Sendmail status" > pid=`head -1 ${OUTPID}` > alive=`ps ax | awk '{ print $1 }' | grep '^'$pid'$'` > if [ -z "${alive}" ]; then eend 1; else eend 0; fi > elif [ ${MTA} = 'postfix' ]; then > echo "Sorry: status is not supported for postfix" > elif [ ${MTA} = 'exim' ]; then > echo "Sorry: status is not supported for exim" > else > echo "Invalid MTA in /etc/conf.d/mailscanner-mta" > exit > fi > >} > >reload() { > if [ ${MTA} = 'sendmail' ]; then > ebegin "Reloading Sendmail configuration" > aliasesetc > eend $? > elif [ ${MTA} = 'postfix' ]; then > ebegin "Reloading Incoming Postfix" > ${POSTFIX} -c ${POSTFIXINCF} reload > /dev/null > eend $? > ebegin "Reloading Outgoing Postfix" > ${POSTFIX} -c ${POSTFIXOUTCF} reload > /dev/null > eend $? > elif [ ${MTA} = 'exim' ]; then > echo "Sorry: reload is not supported for exim" > else > echo "Invalid MTA in /etc/conf.d/mailscanner-mta" > exit > fi >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 36060
:
24603
|
24604
|
24614
|
28047
|
28381
|
28382
|
28416
|
28417
|
28418
|
28419
|
28420
|
28428
|
28437
|
28454
|
28626
|
28627
|
28628
|
28629
|
28630
|
28631
|
28632
|
28633
|
28634
|
28637
|
28638
|
28703
|
28704
|
28705
|
30474
|
30508
|
30509
|
30510
|
30511
|
30512
|
32915
|
38156
|
41020
|
41027
|
43548
|
50093
|
52388
|
60570
|
61111
|
79605
|
79648
|
89523
|
90694
|
92779
|
96524
|
96990
|
96992