From 96c09fe6a311008ad33836af4ad1f4e9fca486516be6137852d2fdbfaa19e9dc Mon Sep 17 00:00:00 2001 From: Peter Varkoly Date: Wed, 7 Apr 2010 12:40:58 +0000 Subject: [PATCH 1/4] - New file check_mail_queue. This script checks if there are some mails in the queue and starts postfix if necessary. After delivering the mails postfix will be stoped. OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=38 --- check_mail_queue | 24 ++++++++++++++++++++++++ postfix.changes | 7 +++++++ postfix.spec | 3 +++ 3 files changed, 34 insertions(+) create mode 100644 check_mail_queue diff --git a/check_mail_queue b/check_mail_queue new file mode 100644 index 0000000..a3cd9de --- /dev/null +++ b/check_mail_queue @@ -0,0 +1,24 @@ +#!/bin/bash + +nm() +{ + NM=$( /usr/bin/mailq 2> /dev/null | tail -1 | /usr/bin/gawk '{ print $5 }' ) + if [ "$NM" ] + then + return 0 + else + return 1 + fi +} + +test -e /var/run/check_mail_queue.pid && exit; +echo $$ > /var/run/check_mail_queue.pid +while( nm ) +do + /etc/init.d/postfix status || /etc/init.d/postfix start + sleep 10 + /usr/sbin/postfix flush +done +/etc/init.d/postfix status && /etc/init.d/postfix stop +rm /var/run/check_mail_queue.pid + diff --git a/postfix.changes b/postfix.changes index aa79863..2c767ff 100644 --- a/postfix.changes +++ b/postfix.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Apr 7 12:39:16 UTC 2010 - varkoly@novell.com + +- New file check_mail_queue. This script checks if there are some + mails in the queue and starts postfix if necessary. After delivering + the mails postfix will be stoped. + ------------------------------------------------------------------- Thu Apr 1 10:28:09 UTC 2010 - varkoly@novell.com diff --git a/postfix.spec b/postfix.spec index 8b331d5..a1d04c3 100644 --- a/postfix.spec +++ b/postfix.spec @@ -31,6 +31,7 @@ Source: %{name}-%{version}.tar.bz2 Source1: %{name}-SuSE.tar.gz Source2: %{name}-mysql.tar.bz2 Source10: rpmlintrc +Source11: check_mail_queue Patch: dynamic_maps.patch Patch1: dynamic_maps_pie.patch Patch2: pointer_to_literals.patch @@ -368,6 +369,7 @@ done %fdupes $RPM_BUILD_ROOT%{_mandir} %endif # --------------------------------------------------------------------------- +install -m 755 %{SOURCE11} /usr/sbin/ %pre VERSIONTEST=$(test -x usr/sbin/postconf && usr/sbin/postconf proxy_read_maps 2>/dev/null) @@ -543,6 +545,7 @@ rm -rf $RPM_BUILD_ROOT /usr/sbin/smtp-sink /usr/sbin/smtp-source /usr/sbin/mk%{name}cert +/usr/sbin/check_mail_queue /sbin/rc%{name} %{_libdir}/lib* /usr/lib/sendmail From 69d6f28f737af7e2f7b830b4fc6ad0fc63a353952b0b026f1f7b919aec7195ec Mon Sep 17 00:00:00 2001 From: Peter Varkoly Date: Wed, 7 Apr 2010 14:01:15 +0000 Subject: [PATCH 2/4] type OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=39 --- postfix.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postfix.spec b/postfix.spec index a1d04c3..9a24274 100644 --- a/postfix.spec +++ b/postfix.spec @@ -369,7 +369,7 @@ done %fdupes $RPM_BUILD_ROOT%{_mandir} %endif # --------------------------------------------------------------------------- -install -m 755 %{SOURCE11} /usr/sbin/ +install -m 755 %{SOURCE11} $RPM_BUILD_ROOT/usr/sbin/ %pre VERSIONTEST=$(test -x usr/sbin/postconf && usr/sbin/postconf proxy_read_maps 2>/dev/null) From 7de5beedf59c9177a964e5b44761f3c1c9230ea528e48ee3990d7733f0b20c08 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Tue, 13 Apr 2010 19:38:41 +0000 Subject: [PATCH 3/4] Accepting request 37592 from server:mail checked in (request 37592) OBS-URL: https://build.opensuse.org/request/show/37592 OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=40 --- check_mail_queue | 24 ------------------------ postfix.changes | 7 ------- postfix.spec | 3 --- 3 files changed, 34 deletions(-) delete mode 100644 check_mail_queue diff --git a/check_mail_queue b/check_mail_queue deleted file mode 100644 index a3cd9de..0000000 --- a/check_mail_queue +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -nm() -{ - NM=$( /usr/bin/mailq 2> /dev/null | tail -1 | /usr/bin/gawk '{ print $5 }' ) - if [ "$NM" ] - then - return 0 - else - return 1 - fi -} - -test -e /var/run/check_mail_queue.pid && exit; -echo $$ > /var/run/check_mail_queue.pid -while( nm ) -do - /etc/init.d/postfix status || /etc/init.d/postfix start - sleep 10 - /usr/sbin/postfix flush -done -/etc/init.d/postfix status && /etc/init.d/postfix stop -rm /var/run/check_mail_queue.pid - diff --git a/postfix.changes b/postfix.changes index 2c767ff..aa79863 100644 --- a/postfix.changes +++ b/postfix.changes @@ -1,10 +1,3 @@ -------------------------------------------------------------------- -Wed Apr 7 12:39:16 UTC 2010 - varkoly@novell.com - -- New file check_mail_queue. This script checks if there are some - mails in the queue and starts postfix if necessary. After delivering - the mails postfix will be stoped. - ------------------------------------------------------------------- Thu Apr 1 10:28:09 UTC 2010 - varkoly@novell.com diff --git a/postfix.spec b/postfix.spec index 9a24274..8b331d5 100644 --- a/postfix.spec +++ b/postfix.spec @@ -31,7 +31,6 @@ Source: %{name}-%{version}.tar.bz2 Source1: %{name}-SuSE.tar.gz Source2: %{name}-mysql.tar.bz2 Source10: rpmlintrc -Source11: check_mail_queue Patch: dynamic_maps.patch Patch1: dynamic_maps_pie.patch Patch2: pointer_to_literals.patch @@ -369,7 +368,6 @@ done %fdupes $RPM_BUILD_ROOT%{_mandir} %endif # --------------------------------------------------------------------------- -install -m 755 %{SOURCE11} $RPM_BUILD_ROOT/usr/sbin/ %pre VERSIONTEST=$(test -x usr/sbin/postconf && usr/sbin/postconf proxy_read_maps 2>/dev/null) @@ -545,7 +543,6 @@ rm -rf $RPM_BUILD_ROOT /usr/sbin/smtp-sink /usr/sbin/smtp-source /usr/sbin/mk%{name}cert -/usr/sbin/check_mail_queue /sbin/rc%{name} %{_libdir}/lib* /usr/lib/sendmail From 5b710a872d994c340de628b361458934d3a5b5ea884e6be1339ea3e19d3c44df Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Tue, 13 Apr 2010 19:38:42 +0000 Subject: [PATCH 4/4] Updating link to change in openSUSE:Factory/postfix revision 47.0 OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=b39225061fba4e1a50161e331c8ddb42 --- check_mail_queue | 24 ++++++++++++++++++++++++ postfix.changes | 7 +++++++ postfix.spec | 5 ++++- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 check_mail_queue diff --git a/check_mail_queue b/check_mail_queue new file mode 100644 index 0000000..a3cd9de --- /dev/null +++ b/check_mail_queue @@ -0,0 +1,24 @@ +#!/bin/bash + +nm() +{ + NM=$( /usr/bin/mailq 2> /dev/null | tail -1 | /usr/bin/gawk '{ print $5 }' ) + if [ "$NM" ] + then + return 0 + else + return 1 + fi +} + +test -e /var/run/check_mail_queue.pid && exit; +echo $$ > /var/run/check_mail_queue.pid +while( nm ) +do + /etc/init.d/postfix status || /etc/init.d/postfix start + sleep 10 + /usr/sbin/postfix flush +done +/etc/init.d/postfix status && /etc/init.d/postfix stop +rm /var/run/check_mail_queue.pid + diff --git a/postfix.changes b/postfix.changes index aa79863..2c767ff 100644 --- a/postfix.changes +++ b/postfix.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Apr 7 12:39:16 UTC 2010 - varkoly@novell.com + +- New file check_mail_queue. This script checks if there are some + mails in the queue and starts postfix if necessary. After delivering + the mails postfix will be stoped. + ------------------------------------------------------------------- Thu Apr 1 10:28:09 UTC 2010 - varkoly@novell.com diff --git a/postfix.spec b/postfix.spec index 8b331d5..8eef2ac 100644 --- a/postfix.spec +++ b/postfix.spec @@ -22,7 +22,7 @@ Name: postfix Summary: A fast, secure, and flexible mailer Version: 2.7.0 -Release: 2 +Release: 3 License: IBM Public License .. Group: Productivity/Networking/Email/Servers Url: http://www.postfix.org/ @@ -31,6 +31,7 @@ Source: %{name}-%{version}.tar.bz2 Source1: %{name}-SuSE.tar.gz Source2: %{name}-mysql.tar.bz2 Source10: rpmlintrc +Source11: check_mail_queue Patch: dynamic_maps.patch Patch1: dynamic_maps_pie.patch Patch2: pointer_to_literals.patch @@ -368,6 +369,7 @@ done %fdupes $RPM_BUILD_ROOT%{_mandir} %endif # --------------------------------------------------------------------------- +install -m 755 %{SOURCE11} $RPM_BUILD_ROOT/usr/sbin/ %pre VERSIONTEST=$(test -x usr/sbin/postconf && usr/sbin/postconf proxy_read_maps 2>/dev/null) @@ -543,6 +545,7 @@ rm -rf $RPM_BUILD_ROOT /usr/sbin/smtp-sink /usr/sbin/smtp-source /usr/sbin/mk%{name}cert +/usr/sbin/check_mail_queue /sbin/rc%{name} %{_libdir}/lib* /usr/lib/sendmail