SPECS: policyd.spec, updates
Mikolaj Kucharski
build w kompuart.pl
Pon, 7 Lis 2005, 11:16:28 CET
Witam,
Prosze o dodanie zalaczonych zmian do CVS'u.
--
best regards
q#
-------------- następna część ---------
Index: policyd.conf
===================================================================
RCS file: /cvsroot/SOURCES/policyd.conf,v
retrieving revision 1.2
diff -u -r1.2 policyd.conf
--- policyd.conf 28 Oct 2005 09:56:22 -0000 1.2
+++ policyd.conf 28 Oct 2005 19:42:12 -0000
@@ -470,7 +470,7 @@
# 3=192.168.0 <- default/recommended
# 4=192.168.0.1
#
-GREYLIST_HOSTADDR=4 <- default/recommended
+GREYLIST_HOSTADDR=3 <- default/recommended
#
# train database: default: off
-------------- następna część ---------
Index: policyd.cron
===================================================================
RCS file: /cvsroot/SOURCES/policyd.cron,v
retrieving revision 1.1
diff -u -r1.1 policyd.cron
--- policyd.cron 28 Oct 2005 08:29:43 -0000 1.1
+++ policyd.cron 28 Oct 2005 19:42:33 -0000
@@ -1,14 +1,3 @@
#!/bin/sh
-if [ -r /etc/sysconfig/policyd ]; then
- . /etc/sysconfig/policyd
-else
- # set default file
- POLICYD_CONF="/etc/policyd/policyd.conf"
-fi
-
-if [ ! -r /var/run/policyd.lck -a -r "${POLICYD_CONF}" ]; then
- touch /var/run/policyd.lck
- /usr/lib/policyd/cleanup -c "${POLICYD_CONF}"
- rm -f /var/run/policyd.lck
-fi
+exec /etc/rc.d/init.d/policyd cron
-------------- następna część ---------
Index: policyd.init
===================================================================
RCS file: /cvsroot/SOURCES/policyd.init,v
retrieving revision 1.1
diff -u -r1.1 policyd.init
--- policyd.init 28 Oct 2005 08:29:43 -0000 1.1
+++ policyd.init 28 Oct 2005 19:42:22 -0000
@@ -56,12 +56,7 @@
msg_not_running PolicyD
fi
;;
- restart)
- $0 stop
- $0 start
- exit $?
- ;;
- reload|force-reload)
+ restart|reload|force-reload)
$0 stop
$0 start
exit $?
@@ -70,7 +65,7 @@
status policyd
exit $?
;;
- cleanup)
+ cleanup|cron)
if [ -r /var/run/policyd.lck ]; then
echo "PolicyD cleanup process already running." 1>&2
RETVAL=1
@@ -84,8 +79,39 @@
rm -f /var/run/policyd.lck
fi
;;
+ init)
+ echo ''
+ echo 'You must login as mysql administrator and setup policyd user as follows:'
+ echo ''
+ echo 'mysql> GRANT ALL ON policyd.* TO policyd w localhost IDENTIFIED BY '\''secret_password'\'';'
+ echo 'mysql> GRANT USAGE ON *.* TO policyd w localhost IDENTIFIED BY '\''secret_password'\'';'
+ echo ''
+ echo ''
+ echo 'Next create database structure:'
+ echo ''
+ echo '$ zcat /usr/share/doc/policyd-*/DATABASE.mysql.gz | mysql -p -u policyd'
+ echo ''
+ echo ''
+ echo 'After database is fully configured edit ``policyd.conf'\'\'' and set correct'
+ echo 'mysql username and password. Example configuration for postfix from'
+ echo '``main.cf'\'\'' file:'
+ echo ''
+ echo 'smtpd_recipient_restrictions ='
+ echo ' permit_mynetworks'
+ echo ' permit_sasl_authenticated'
+ echo ' reject_unauth_destination'
+ echo ' reject_unlisted_recipient'
+ echo ' check_policy_service inet:127.0.0.1:10031'
+ echo ''
+ echo ''
+ echo 'Start policyd daemon and then reload postfix configuration:'
+ echo ''
+ echo '# /etc/rc.d/init.d/policyd start'
+ echo '# postfix reload'
+ echo ''
+ ;;
*)
- msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+ msg_usage "$0 {start|stop|restart|cron|init|status}"
exit 3
esac
-------------- następna część ---------
Index: policyd.spec
===================================================================
RCS file: /cvsroot/SPECS/policyd.spec,v
retrieving revision 1.3
diff -u -r1.3 policyd.spec
--- policyd.spec 28 Oct 2005 17:53:35 -0000 1.3
+++ policyd.spec 28 Oct 2005 19:41:46 -0000
@@ -1,18 +1,14 @@
# $Id: policyd.spec,v 1.3 2005/10/28 17:53:35 qboosh Exp $
#
# TODO: optflags
-# TODO: mysql info
-# mysql> GRANT ALL ON policyd.* TO policyd w localhost IDENTIFIED BY 'secret_password';
-# mysql> GRANT USAGE ON *.* TO policyd w localhost IDENTIFIED BY 'secret_password';
-# $ zcat /usr/share/doc/policyd-%{Version}/DATABASE.mysql.gz | mysql -p -u policyd
#
-# TODO: postfix info
-#smtpd_recipient_restrictions =
-# permit_mynetworks
-# permit_sasl_authenticated
-# reject_unauth_destination
-# reject_unlisted_recipient
-# check_policy_service inet:127.0.0.1:10031
+# TODO: upgrade database smooth
+# smart updates tables from older to newer version of policyd
+#
+# TODO: mysql and postfix info, see:
+# /etc/rc.d/init.d/policyd init
+#
+# Not Finished Yet, reject STBR.
#
Summary: Policyd - an anti-spam plugin for Postfix
Summary(pl): Policyd - wtyczka antyspamowa dla Postfiksa
@@ -29,6 +25,7 @@
Source4: policyd.init
URL: http://policyd.sourceforge.net/
BuildRequires: mysql-devel
+BuildRequires: zlib-devel
Requires: mysql-libs
Requires: zlib
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -77,6 +74,7 @@
if [ -f /var/lock/subsys/policyd ]; then
/etc/rc.d/init.d/policyd restart >&2 || :
else
+ echo "Run \"/etc/rc.d/init.d/policyd init\" to read howto setup policy daemon." >&2
echo "Run \"/etc/rc.d/init.d/policyd start\" to start policy daemon." >&2
fi
@@ -97,14 +95,13 @@
%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/%{name}/*
-%doc *.txt *.mysql doc/*.sql doc/*.txt
%dir %{_sysconfdir}/%{name}
+%doc *.txt *.mysql doc/*.sql doc/*.txt
+%doc %{_sysconfdir}/%{name}/%{name}.conf-dist
%config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) %{_sysconfdir}/%{name}/%{name}.conf
-# shouldn't be in %doc instead here?
-%{_sysconfdir}/%{name}/%{name}.conf-dist
-%{_sysconfdir}/rc.d/init.d/%{name}
-%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
%config(noreplace) %verify(not md5 mtime size) %attr(755,root,root) /etc/cron.hourly/%{name}
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+%{_sysconfdir}/rc.d/init.d/%{name}
%changelog
* %{date} PLD Team <feedback w pld-linux.org>
Więcej informacji o liście dyskusyjnej pld-devel-pl