%define mailman_uid 64910 %define mailman_gid 64910 %define nobody_gid 65013 %define pkgver %(echo %version | tr _ -) Name: mailman Version: 2.1.19 Release: 1mamba Summary: Free software for managing electronic mail discussion and e-newsletter lists Group: System/Servers Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://mailman.sourceforge.net Source0: http://downloads.sourceforge.net/sourceforge/mailman/mailman-%{pkgver}.tgz Source1: %{name}-update_aliases.sh Source2: %{name}-cron Source3: %{name}-update_aliases_vmailmgr.sh Source4: %{name}-apache.conf Source5: %{name}-initscript Patch0: %{name}-2.1.9-fix_buildroot.patch Patch1: %{name}-2.1.10-template_it_antispam_fix.patch Patch2: %{name}-2.1.10-cmd_subscribe_fixsyntax.patch Patch3: %{name}-2.1.11-use_python2.4.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel ## AUTOBUILDREQ-END BuildRequires: expect BuildRequires: libpython-devel BuildRequires: python BuildRequires: dnspython Requires(pre): expect >= 8.4.5 Requires: python >= 2.2.3 Requires: apache >= 2.0.45 Requires: vixie-cron >= 3.0.1 Requires: dnspython Requires: mta BuildRoot: %{_tmppath}/%{name}-%{version}-root # FIXME: postfix integration is missing %description Mailman is free software for managing electronic mail discussion and e-newsletter lists. Mailman is integrated with the web, making it easy for users to manage their accounts and for list owners to administer their lists. Mailman supports built-in archiving, automatic bounce processing, content filtering, digest delivery, spam filters, and more. %prep %setup -q -n %{name}-%{pkgver} #%patch0 -p1 # FIXME: the following patch disables the confirmation url link in email # so that some smtp server filters like smpt.fastwebnet.it don't # block the message (error "554 Message Refused") %patch1 -p1 #%patch2 -p0 #%patch3 -p1 %build # activate sendmail patching the handler (otherwise it won't work for # safety reasons) sed -i "s|assert 0|#assert 0|" Mailman/Handlers/Sendmail.py sed -i "s|/usr/bin/env|/bin/env|" bin/msgfmt.py tests/onebounce.py %configure \ --prefix=%{_datadir}/mailman \ --exec_prefix=%{_datadir}/mailman \ --bindir=%{_bindir} \ --with-permcheck=no \ --with-var-prefix=/var/mailman \ --with-cgi-gid=nobody \ --with-mail-gid=nobody \ --with-mailhost=localhost \ --with-urlhost=localhost \ --with-mail-uid=mailman \ --with-python=%{_bindir}/python \ PYTHON=%{__python} %make %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} install -d %{buildroot}/var/www/cgi-bin %makeinstall sed -i "s|MAILMAN_USER = ''|MAILMAN_USER = 'mailman'| s|MAILMAN_GROUP = ''|MAILMAN_GROUP = 'mailman'|" \ %{buildroot}%{_datadir}/mailman/Mailman/Defaults.py install -D %{buildroot}%{_datadir}/mailman/cron/crontab.in \ %{buildroot}%{_sysconfdir}/cron.d/mailman install -D -m 0755 %{S:5} \ %{buildroot}%{_initrddir}/mailman install -m 0755 %{S:1} \ %{buildroot}%{_datadir}/mailman/bin/update_aliases.sh install -m 0755 %{S:3} \ %{buildroot}%{_datadir}/mailman/bin/update_aliases_vmailmgr.sh install -D %{S:2} \ %{buildroot}%{_sysconfdir}/cron.daily/mailman install -D %{S:4} \ %{buildroot}%{_sysconfdir}/httpd/httpd.d/mailman.conf mv %{buildroot}%{_datadir}/mailman/icons %{buildroot}/var/www %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} %pre # new install if [ $1 -ge 1 ]; then groupadd -g %{nobody_gid} nobody 2>/dev/null groupadd -g %{mailman_gid} mailman 2>/dev/null useradd -u %{mailman_uid} -g mailman -d /dev/null mailman \ -s /bin/false 2>/dev/null fi exit 0 %post # new install if [ $1 -eq 1 ]; then sed -i "s|\(DEFAULT_EMAIL_HOST = \).*|\1'`hostname -f`'| s|\(DEFAULT_URL_HOST = \).*|\1'`hostname -f`'| s|#\(DELIVERY_MODULE = 'Sendmail'\)|\1| s|\(DELIVERY_MODULE = 'SMTPDirect'\)|#\1|" \ %{_datadir}/mailman/Mailman/Defaults.py [ -e /usr/sbin/postfix ] && { # postfix configuation postconf -e alias_database=hash:/etc/aliases,hash:/etc/aliases-mailman %{_datadir}/mailman/bin/newlist -q \ mailman postmaster@`postconf -hv mydomain` \ `/usr/bin/mkpasswd -l 10 -s 0` &>/dev/null echo "\ Mailman list created. Use %{_datadir}/mailman/bin/mmsitepass to set mailman administrator password." } || { [ -f /etc/qmail/me ] && { # qmail configuration %{_datadir}/mailman/bin/newlist -q \ mailman postmaster@`cat /etc/qmail/me` \ `/usr/bin/mkpasswd -l 10 -s 0` &>/dev/null %{_datadir}/mailman/bin/update_aliases.sh echo "\ Mailman list created. Use %{_datadir}/mailman/bin/mmsitepass to set mailman administrator password." } } fi exit 0 %postun # update if [ $1 -eq 1 ]; then /sbin/chkconfig mailman [ $? -eq 0 ] && %{_initrddir}/mailman restart 2>/dev/null fi if [ $1 -eq 0 ]; then [ -e /usr/sbin/postconf ] && postconf -e alias_database=hash:/etc/aliases fi exit 0 %preun # erase if [ $1 -eq 0 ]; then /sbin/chkconfig --del mailman %{_initrddir}/mailman stop 2>/dev/null userdel mailman 2>/dev/null groupdel mailman 2>/dev/null fi exit 0 %files %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/httpd/httpd.d/mailman.conf %dir %attr(2775,root,root) %{_datadir}/mailman/ %attr(2775,root,mailman) %{_datadir}/mailman/bin/* %attr(2775,root,mailman) %{_datadir}/mailman/cgi-bin/* %attr(2775,root,mailman) %{_datadir}/mailman/cron/* %attr(2775,root,mailman) %{_datadir}/mailman/mail/* %attr(2775,root,mailman) %{_datadir}/mailman/Mailman/* %attr(2775,root,mailman) %{_datadir}/mailman/messages/* #%attr(2775,root,mailman) %{_datadir}/mailman/pythonlib/* %attr(2775,root,mailman) %{_datadir}/mailman/scripts/* %attr(2775,root,mailman) %{_datadir}/mailman/templates/* %attr(2775,root,mailman) %{_datadir}/mailman/tests/* %config(noreplace) %{_datadir}/mailman/Mailman/Defaults.py %config(noreplace) %{_datadir}/mailman/Mailman/mm_cfg.py %attr(0755,root,root) %{_initrddir}/mailman %{_sysconfdir}/cron.d/mailman %{_sysconfdir}/cron.daily/mailman %dir %attr(2775,root,mailman) /var/mailman %dir %attr(2770,root,mailman) /var/mailman/archives/private %dir %attr(2775,root,mailman) /var/mailman/archives/public %dir %attr(2775,root,mailman) /var/mailman/data %attr(2775,root,mailman) /var/mailman/data/sitelist.cfg %dir %attr(2775,root,mailman) /var/mailman/lists %dir %attr(2775,root,mailman) /var/mailman/locks %dir %attr(2775,root,mailman) /var/mailman/logs %dir %attr(2775,root,mailman) /var/mailman/qfiles %dir %attr(2775,root,mailman) /var/mailman/spam /var/www/icons/* %doc gnu-COPYING-GPL #%doc README ACKNOWLEDGMENTS FAQ BUGS README.* TODO UPGRADING NEWS %changelog * Sat Feb 28 2015 Automatic Build System 2.1.19-1mamba - automatic update by autodist * Sat Jul 19 2014 Silvan Calarco 2.1.18_1-3mamba - rebuilt with --with-mail-gid=nobody * Fri Jul 18 2014 Silvan Calarco 2.1.18_1-2mamba - provide required directory /var/mailman/locks * Tue Jun 17 2014 Silvan Calarco 2.1.18_1-1mamba - update to 2.1.18_1 * Mon Nov 25 2013 Automatic Build System 2.1.17-1mamba - automatic version update by autodist * Wed Oct 30 2013 Automatic Build System 2.1.16-1mamba - automatic version update by autodist * Thu May 30 2013 Silvan Calarco 2.1.15-3mamba - python 2.7 rebuild * Sat Apr 13 2013 Silvan Calarco 2.1.15-2mamba - fix pidfile location in initscript for systemd to correctly detect status * Thu Jan 03 2013 Automatic Build System 2.1.15-1mamba - update to 2.1.15 * Tue Sep 21 2010 Automatic Build System 2.1.14-1mamba - automatic update by autodist * Thu Feb 04 2010 Silvan Calarco 2.1.13-1mamba - update to 2.1.13 * Mon Mar 30 2009 Silvan Calarco 2.1.12-2mamba - remove use_python2.4 patch * Mon Mar 30 2009 Silvan Calarco 2.1.12-1mamba - automatic update by autodist * Thu Jan 08 2009 Silvan Calarco 2.1.11-2mamba - update cron and update_aliases script for exiting with 0 * Fri Dec 05 2008 Silvan Calarco 2.1.11-1mamba - update to 2.1.11 - added patch to force use of python 2.4 (python 2.6 not supported yet); initscript patched too * Thu Jun 12 2008 Silvan Calarco 2.1.10-2mamba - added a patch to fix a syntax error in cmd_subscribe.py * Tue Jun 10 2008 Silvan Calarco 2.1.10-1mamba - update to 2.1.10 - added anti-spam patch to workaround a problem with fastweb-it smtp server * Fri Jan 18 2008 Silvan Calarco 2.1.9-7mamba - initscript: send output to /dev/null so startup script won't hung when used with |tee * Sat Jun 02 2007 Silvan Calarco 2.1.9-6mamba - fix various permissions * Thu May 24 2007 Silvan Calarco 2.1.9-5mamba - fix permissions on %{_datadir}/mailman directory * Thu May 24 2007 Silvan Calarco 2.1.9-4mamba - use nobody as cgi and mail gid - patch: remove buildroot patchs in python compiled files - set nofiles as the mail-gid * Sun Mar 18 2007 Silvan Calarco 2.1.9-3qilnx - change gid to nobody as used by postfix - fixed general permissions - added httpd.d configuration file * Wed Mar 14 2007 Silvan Calarco 2.1.9-2qilnx - fixed scripts for integration with postfix as well as qmail * Mon Sep 18 2006 Davide Madrisan 2.1.9-1qilnx - update to version 2.1.9 by autospec - also fixes several security issues including CVE-2006-[2941,3636] (qibug#88) * Wed Jun 28 2006 Davide Madrisan 2.1.8b1-2qilnx - fixed creation of used mailman when qmail is not installed - execute qmail dependent commands in the specfile scriptlets only if qmail is installed * Thu Apr 06 2006 Silvan Calarco 2.1.8b1-1qilnx - update to version 2.1.8b1 by autospec - removed dependency on qmail * Thu Sep 22 2005 Davide Madrisan 2.1.6-1qilnx - update to version 2.1.6 by autospec - also fixes the security vulnerability CVE- 2005-3573 - removed security patches (merged upstream) - %%post script fixed * Fri Feb 11 2005 Davide Madrisan 2.1.5-3qilnx - security fix QSA-2005-014 (CAN-2004-1177, CAN-2005-0202) * Wed Jun 30 2004 Silvan Calarco 2.1.5-2qilnx - fixed a /usr/bin/env dependency problem * Thu May 28 2004 Davide Madrisan 2.1.5-1qilnx - new version rebuild * Wed May 26 2004 Davide Madrisan 2.1.4-5qilnx - added security patch for remote password retrieval (CAN-2004-0412) backported from mailman 2.1.5 by Mark J Cox * Tue May 13 2004 Silvan Calarco 2.1.4-4qilnx - added update_aliases_vmailmgr.sh script for virtual domain aliases creation * Mon May 10 2004 Silvan Calarco 2.1.4-3qilnx - some fixes on post script * Mon May 03 2004 Silvan Calarco 2.1.4-2qilnx - added automatic mailman list configuration * Tue Feb 17 2004 Davide Madrisan 2.1.4-1qilnx - new version rebuilt (security bugfixes) * Tue Sep 16 2003 Silvan Calarco 2.1.2-1qilnx - first build