initial commit of file from CVS for e-smith-qmail on Wed 12 Jul 09:06:46 BST 2023
parent
522798702f
commit
2d08981b2a
@ -0,0 +1,4 @@
|
||||
*.rpm
|
||||
*.log
|
||||
*spec-20*
|
||||
*.tar.xz
|
@ -0,0 +1,21 @@
|
||||
# Makefile for source rpm: e-smith-qmail
|
||||
# $Id: Makefile,v 1.1 2016/02/05 21:46:43 stephdl Exp $
|
||||
NAME := e-smith-qmail
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
@ -1,3 +1,17 @@
|
||||
# e-smith-qmail
|
||||
# <img src="https://www.koozali.org/images/koozali/Logo/Png/Koozali_logo_2016.png" width="25%" vertical="auto" style="vertical-align:bottom"> e-smith-qmail
|
||||
|
||||
SMEServer Koozali developed git repo for e-smith-qmail smeserver
|
||||
SMEServer Koozali developed git repo for e-smith-qmail smeserver
|
||||
|
||||
## Wiki
|
||||
<br />https://wiki.koozali.org/
|
||||
|
||||
## Bugzilla
|
||||
Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=e-smith-qmail&product=SME%20Server%2010.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED)
|
||||
|
||||
## Description
|
||||
|
||||
<br />*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.*
|
||||
*Once it has been checked, then this comment will be deleted*
|
||||
<br />
|
||||
|
||||
E-smith-qmail is an open source email server software designed to facilitate email communication for small- and medium-sized businesses. It is highly customizable, with support for multiple domains, virtual domains, forwarding, aliases, and mailing lists, and its features can be adapted to meet the specific communication needs of any organization. With its straightforward web-based administration interface, e-smith-qmail can be easily configured for optimal security and performance. Additionally, its advanced spam filtering technology helps to ensure that email communication remains safe and secure for both senders and recipients.
|
||||
|
@ -0,0 +1 @@
|
||||
sme10
|
@ -0,0 +1,239 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use esmith::Build::CreateLinks qw(:all);
|
||||
use File::Basename;
|
||||
use File::Path;
|
||||
|
||||
# email-conf - console-save, bootstrap-console-save, domain-create, domain-delete,
|
||||
# ip-change, email-update, host-create, host-delete, host-modify, post-upgrade
|
||||
|
||||
|
||||
foreach (qw(
|
||||
bouncefrom
|
||||
bouncehost
|
||||
concurrencylocal
|
||||
concurrencyremote
|
||||
databytes
|
||||
defaultdomain
|
||||
defaulthost
|
||||
doublebounceto
|
||||
envnoathost
|
||||
helohost
|
||||
locals
|
||||
me
|
||||
plusdomain
|
||||
rcpthosts
|
||||
smtproutes
|
||||
virtualdomains
|
||||
))
|
||||
{
|
||||
templates2events("/var/qmail/control/$_", qw(
|
||||
console-save
|
||||
bootstrap-console-save
|
||||
domain-create
|
||||
domain-delete
|
||||
ip-change
|
||||
email-update
|
||||
host-create
|
||||
host-delete
|
||||
host-modify
|
||||
post-upgrade
|
||||
e-smith-qmail-update
|
||||
));
|
||||
}
|
||||
|
||||
foreach (qw(
|
||||
/var/qmail/alias/.qmail-default
|
||||
/var/qmail/alias/.qmail-localdelivery-default
|
||||
))
|
||||
{
|
||||
templates2events($_, qw(
|
||||
console-save
|
||||
bootstrap-console-save
|
||||
domain-create
|
||||
domain-delete
|
||||
ip-change
|
||||
email-update
|
||||
host-create
|
||||
host-delete
|
||||
host-modify
|
||||
post-upgrade
|
||||
e-smith-qmail-update
|
||||
));
|
||||
}
|
||||
|
||||
templates2events("/var/qmail/alias/.qmail-shared" , qw(bootstrap-console-save user-create user-modify user-delete));
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for console-save event:
|
||||
# write config files and create startup link
|
||||
#--------------------------------------------------
|
||||
$event = "console-save";
|
||||
|
||||
# If qmail-send is running, it will receive the SIGHUP and ignore the
|
||||
# start command. If it is not running then the signal will be ignored
|
||||
# and qmail-send will read its new configuration files anyway.
|
||||
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/qmail");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for bootstrap-console-save event:
|
||||
# write config files and create startup link
|
||||
#--------------------------------------------------
|
||||
$event = "bootstrap-console-save";
|
||||
|
||||
event_link("pseudonym-cleanup", $event, "03");
|
||||
event_link("qmail-update-group", $event, "20");
|
||||
event_link("qmail-update-user", $event, "55");
|
||||
templates2events("/var/qmail/users/assign", $event);
|
||||
safe_symlink("/var/qmail/bin/qmail-newu", "root/etc/e-smith/events/$event/S55email-assign");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for domain-create event:
|
||||
# rewrite config files and restart server
|
||||
#--------------------------------------------------
|
||||
$event = "domain-create";
|
||||
|
||||
# If qmail-send is running, it will receive the SIGHUP and ignore the
|
||||
# start command. If it is not running then the signal will be ignored
|
||||
# and qmail-send will read its new configuration files anyway.
|
||||
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/qmail");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for domain-delete event:
|
||||
# rewrite config files and restart server
|
||||
#--------------------------------------------------
|
||||
$event = "domain-delete";
|
||||
|
||||
|
||||
# If qmail-send is running, it will receive the SIGHUP and ignore the
|
||||
# start command. If it is not running then the signal will be ignored
|
||||
# and qmail-send will read its new configuration files anyway.
|
||||
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/qmail");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for email-update event:
|
||||
# email parameters have been changed in the e-smith
|
||||
# manager; update system security, rewrite email config
|
||||
# files, configure other system files (crontab is the
|
||||
# important one), and restart server
|
||||
#--------------------------------------------------
|
||||
$event = "email-update";
|
||||
|
||||
event_link("qmail-update-user", $event, "03");
|
||||
event_link("pseudonym-cleanup", $event, "30");
|
||||
|
||||
# If qmail-send is running, it will receive the SIGHUP and ignore the
|
||||
# start command. If it is not running then the signal will be ignored
|
||||
# and qmail-send will read its new configuration files anyway.
|
||||
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/qmail");
|
||||
safe_symlink("adjust", "root/etc/e-smith/events/$event/services2adjust/masq");
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smtp-auth-proxy");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for group-create event:
|
||||
#--------------------------------------------------
|
||||
$event = "group-create";
|
||||
|
||||
event_link("pseudonym-cleanup", $event, "03");
|
||||
event_link("qmail-update-group", $event, "20");
|
||||
templates2events("/var/qmail/users/assign", $event);
|
||||
safe_symlink("/var/qmail/bin/qmail-newu", "root/etc/e-smith/events/$event/S55email-assign");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/qmail");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for group-delete event:
|
||||
#--------------------------------------------------
|
||||
$event = "group-delete";
|
||||
|
||||
event_link("pseudonym-cleanup", $event, "03");
|
||||
event_link("qmail-delete-group", $event, "20");
|
||||
templates2events("/var/qmail/users/assign", $event);
|
||||
safe_symlink("/var/qmail/bin/qmail-newu", "root/etc/e-smith/events/$event/S55email-assign");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/qmail");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for group-modify event:
|
||||
#--------------------------------------------------
|
||||
$event = "group-modify";
|
||||
|
||||
event_link("pseudonym-cleanup", $event, "03");
|
||||
event_link("qmail-update-group", $event, "20");
|
||||
templates2events("/var/qmail/users/assign", $event);
|
||||
safe_symlink("/var/qmail/bin/qmail-newu", "root/etc/e-smith/events/$event/S55email-assign");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/qmail");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for user-create event:
|
||||
#--------------------------------------------------
|
||||
$event = "user-create";
|
||||
|
||||
event_link("qmail-update-user", $event, "20");
|
||||
event_link("qmail-update-group", $event, "20");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for user-modify event
|
||||
#--------------------------------------------------
|
||||
$event = "user-modify";
|
||||
|
||||
event_link("qmail-update-user", $event, "20");
|
||||
event_link("qmail-update-group", $event, "20");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for user-modify-admin event
|
||||
#--------------------------------------------------
|
||||
$event = "user-modify-admin";
|
||||
|
||||
event_link("qmail-update-user", $event, "20");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for user-delete event
|
||||
#--------------------------------------------------
|
||||
$event = "user-delete";
|
||||
|
||||
event_link("qmail-update-group", $event, "25");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for ip-up event:
|
||||
#--------------------------------------------------
|
||||
$event = "ip-up";
|
||||
|
||||
event_link("qmail-ipup", $event, "20");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for ip-change event:
|
||||
#--------------------------------------------------
|
||||
$event = "ip-change";
|
||||
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/qmail");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for e-smith-qmail-update event:
|
||||
#--------------------------------------------------
|
||||
$event = "e-smith-qmail-update";
|
||||
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/qmail");
|
||||
event_link("systemd-reload", $event, "89");
|
||||
event_link("systemd-default", $event, "88");
|
||||
event_link("pseudonym-cleanup", $event, "03");
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for pseudonym-{create,delete,modify}
|
||||
#--------------------------------------------------
|
||||
foreach $event ( qw(pseudonym-create pseudonym-modify pseudonym-delete
|
||||
user-create user-modify user-delete
|
||||
))
|
||||
{
|
||||
event_link("pseudonym-cleanup", $event, "03");
|
||||
templates2events("/var/qmail/control/virtualdomains", $event);
|
||||
templates2events("/var/qmail/users/assign", $event);
|
||||
safe_symlink("/var/qmail/bin/qmail-newu", "root/etc/e-smith/events/$event/S55email-assign");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/qmail");
|
||||
}
|
||||
|
||||
safe_symlink(".qmail", "root/home/e-smith/.qmail-default");
|
||||
safe_symlink(".qmail-shared", "root/var/qmail/alias/.qmail-shared-default");
|
||||
|
@ -0,0 +1,431 @@
|
||||
# $Id: e-smith-qmail.spec,v 1.17 2022/04/06 04:38:59 jpp Exp $
|
||||
|
||||
Summary: startup scripts for Dan Bernstein's qmail package
|
||||
%define name e-smith-qmail
|
||||
Name: %{name}
|
||||
%define version 2.6.0
|
||||
%define release 15
|
||||
Version: %{version}
|
||||
Release: %{release}%{?dist}
|
||||
License: GPL
|
||||
Group: Networking/Daemons
|
||||
Source: %{name}-%{version}.tar.xz
|
||||
|
||||
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
|
||||
BuildRequires: e-smith-devtools >= 1.13.0-04
|
||||
BuildArchitectures: noarch
|
||||
Requires: qmail
|
||||
Requires: dot-forward
|
||||
Requires: fastforward
|
||||
Requires: runit
|
||||
Requires: e-smith-email
|
||||
Requires: qmail >= 1.03-17
|
||||
Provides: e-smith-mta
|
||||
Conflicts: runit < 1.7
|
||||
Obsoletes: qmail-initscripts
|
||||
Obsoletes: qmail-workaround
|
||||
AutoReqProv: no
|
||||
|
||||
%changelog
|
||||
* Wed Jul 12 2023 cvs2git.sh aka Brian Read <brianr@koozali.org> 2.6.0-15.sme
|
||||
- Roll up patches and move to git repo [SME: 12338]
|
||||
|
||||
* Wed Jul 12 2023 BogusDateBot
|
||||
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
|
||||
by assuming the date is correct and changing the weekday.
|
||||
|
||||
* Tue Apr 05 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.6.0-14.sme
|
||||
- fix multiple errors with pseudonyms in template [SME: 8591]
|
||||
orphaned pseudonyms are associated to admin
|
||||
- repopulate qmail assign db and sighup qmail on group event [SME: 11934]
|
||||
|
||||
* Mon Nov 15 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.6.0-13.sme
|
||||
- can set to 0 ConcurrencyLocal or ConcurrencyRemote [SME: 11645]
|
||||
this allows to disable of type of delivery
|
||||
|
||||
* Thu Dec 10 2020 Michel Begue <mab974@gmail.com> 2.6.0-12.sme
|
||||
- add Requires=runit.service [SME: 11245]
|
||||
|
||||
* Sun Dec 06 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-11.sme
|
||||
- fix missing actions for systemd on upgrade event [SME: 11105]
|
||||
cleanup preset file
|
||||
|
||||
* Fri Dec 04 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-10.sme
|
||||
- remove qmail link in init.d and whole rc.d [SME: 11105]
|
||||
take 3
|
||||
|
||||
* Fri Dec 04 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-9.sme
|
||||
- remove qmail link in init.d [SME: 11105]
|
||||
|
||||
* Thu Dec 03 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-7.sme
|
||||
- execute systemd-reload before service adjust in events [SME: 11228]
|
||||
- remove S95reset-unsavedflag [SME: 11229]
|
||||
|
||||
* Thu Nov 19 2020 Michel Begue <mab974@gmail.com> 2.6.0-6.sme
|
||||
- remove rc7.d link [SME: 11105]
|
||||
- fix actions in e-smith-qmail-update [SME: 11152]
|
||||
|
||||
* Sat Nov 14 2020 Michel Begue <mab974@gmail.com> 2.6.0-5.sme
|
||||
- Move qmail service to systemd [SME: 11105]
|
||||
- Create e-smith-qmail-update event [SME: 11152]
|
||||
|
||||
* Thu Jul 20 2017 Daniel Berteaud <daniel@firewall-services.com> 2.6.0-4.sme
|
||||
- Update aliases files for every groups passed as argument [SME: 10386]
|
||||
|
||||
* Tue May 31 2016 Daniel Berteaud <daniel@firewall-services.com> 2.6.0-3.sme
|
||||
- Add possibility to exclude users or members of other groups from group
|
||||
email address [SME: 9523]
|
||||
|
||||
* Fri Apr 22 2016 Daniel Berteaud <daniel@firewall-services.com> 2.6.0-2.sme
|
||||
- Merge smtpd entry into qpsmtpd, same for ssmtpd into sqpsmtpd [SME: 9478]
|
||||
|
||||
* Fri Feb 05 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 2.6.0-1.sme
|
||||
- Initial release to sme10
|
||||
|
||||
* Fri Jul 5 2013 Ian Wells <esmith@wellsi.com> 2.4.0-6.sme
|
||||
- Simplify qmail concurrency templates [SME: 7750]
|
||||
|
||||
* Thu May 23 2013 chris burnat <devlist@burnat.com> 2.4.0-5.sme
|
||||
- Modify domain style pseudonym pointing to user with dot in name, by Filippo Carletti [SME: 7614]
|
||||
|
||||
* Wed May 15 2013 chris burnat <devlist@burnat.com> 2.4.0-4.sme
|
||||
- Reverse change in Template Qmail MaxMessageSize [SME: 7393]
|
||||
|
||||
* Fri May 03 2013 chris burnat <devlist@burnat.com> 2.4.0-3.sme
|
||||
- Reverse Allow groups with dots [SME 6694] and modify domain style pseudonyms to point to the correct user, by Filippo Carletti [SME: 7572]
|
||||
|
||||
* Thu Feb 21 2013 Ian Wells <esmith@wellsi.com> 2.4.0-2.sme
|
||||
- Template Qmail MaxMessageSize [SME: 7393]
|
||||
|
||||
* Wed Feb 6 2013 Shad L. Lords <slords@mail.com> 2.4.0-1.sme
|
||||
- Roll new stream for sme9
|
||||
|
||||
* Sun Jan 15 2012 Ian Wells <esmith@wellsi.com> 2.2.0-6.sme
|
||||
- Allow groups with dots, by Filippo Carletti [SME: 6694]
|
||||
|
||||
* Thu Oct 14 2010 Daniel Berteaud <daniel@firewall-services.com> 2.2.0-5.sme
|
||||
- Read number of log files to keep from the DB [SME: 5855]
|
||||
|
||||
* Sat Sep 05 2009 Gavin Weight <gweight@gmail.com> 2.2.0-4
|
||||
- SMTPSmartHost template incorrectly uses brackets to avoid MX lookups. [SME: 5456]
|
||||
|
||||
* Mon May 18 2009 Gavin Weight <gweight@gmail.com> 2.2.0-3
|
||||
- smtproutes template incorrectly uses brackets to avoid MX lookups. [SME: 5257]
|
||||
|
||||
* Tue May 12 2009 Filippo Carletti <filippo.carletti@gmail.com> 2.2.0-2
|
||||
- Remove qmail-workaround and obsolete it after patch to treat 0.0.0.0 as a
|
||||
local ip [SME: 5171]
|
||||
|
||||
* Tue Oct 7 2008 Shad L. Lords <slords@mail.com> 2.2.0-1.sme
|
||||
- Roll new stream to separate sme7/sme8 trees [SME: 4633]
|
||||
|
||||
* Wed Apr 2 2008 Shad L. Lords <slords@mail.com> 1.10.0-16
|
||||
- Create tcpto lockfile in run script [SME: 3055]
|
||||
|
||||
* Wed Jan 09 2008 Stephen Noble <support@dungog.net> 1.10.0-15
|
||||
- Domain catchall Redirection to Account [SME:1922]
|
||||
|
||||
* Thu Sep 6 2007 Charlie Brady <charlie_brady@mitel.com>
|
||||
- Apply a code tidyup patch from Gordon. [SME: 871]
|
||||
|
||||
* Sun Apr 29 2007 Shad L. Lords <slords@mail.com>
|
||||
- Clean up spec so package can be built by koji/plague
|
||||
|
||||
* Fri Apr 06 2007 Shad L. Lords <slords@mail.com> 1.10.0-13
|
||||
- Change ownership/perms on /var/qmail/alias directory [SME: 2709]
|
||||
|
||||
* Thu Feb 15 2007 Charlie Brady <charlie_brady@mitel.com>
|
||||
- Use sv rather than deprecated runsvctrl in ip-up script. [SME: 2486]
|
||||
|
||||
* Mon Jan 22 2007 Shad L. Lords <slords@mail.com> 1.10.0-11
|
||||
- Allow admin user to be configured via users panel. [SME: 827]
|
||||
|
||||
* Thu Dec 07 2006 Shad L. Lords <slords@mail.com>
|
||||
- Update to new release naming. No functional changes.
|
||||
- Make Packager generic
|
||||
|
||||
* Fri Aug 25 2006 Gordon Rowell <gordonr@gormand.com.au> 1.10.0-10
|
||||
- Force creation of junkmail folder as some users like to delete
|
||||
it [SME: 1130]
|
||||
|
||||
* Mon Aug 14 2006 Gordon Rowell <gordonr@gormand.com.au> 1.10.0-09
|
||||
- Allow optional EveryoneEmail property of user and 'admin' accounts
|
||||
If set to 'no', do not include this user in the shared/everyone
|
||||
email alias [SME: 1842]
|
||||
|
||||
* Thu Aug 3 2006 Gordon Rowell <gordonr@gormand.com.au> 1.10.0-08
|
||||
- Allow optional $smtpd{HeloHost} value for configuring HELO host,
|
||||
defaulting to $DomainName [SME: 1790]
|
||||
|
||||
* Thu Jun 22 2006 Gordon Rowell <gordonr@gormand.com.au> 1.10.0-07
|
||||
- Default qmail{MaxMessageSize} to 15,000,000 bytes [SME: 1624]
|
||||
|
||||
* Mon May 15 2006 Gordon Rowell <gordonr@gormand.com.au> 1.10.0-06
|
||||
- Bump version only [SME: 1415]
|
||||
|
||||
* Wed May 10 2006 Gordon Rowell <gordonr@gormand.com.au> 1.10.0-05sme01
|
||||
- Allow optional MailServer property of domains db records and
|
||||
deliver mail in this order of preference:
|
||||
- As per the MailServer property of the domain
|
||||
- $DelegateMailServer
|
||||
- localhost (i.e. locally)
|
||||
NOTE:
|
||||
- If DelegateMailServer is not set, the users must exist on the
|
||||
gateway or mail will be rejected
|
||||
- If DelegateMailServer is set, all mail for the domain will be
|
||||
forwarded to the relevant internal mail server [SME: 1253]
|
||||
|
||||
* Wed May 10 2006 Gordon Rowell <gordonr@gormand.com.au> 1.10.0-04sme01
|
||||
- Remove virtualdomains entries for hosts db entries. We only
|
||||
handle mail for domains without customisation [SME: 1415]
|
||||
|
||||
* Sat Apr 8 2006 Charlie Brady <charlie_brady@mitel.com> 1.10.0-03
|
||||
- Update group .qmail files when deleting/modifying users. [SME: 1200]
|
||||
|
||||
* Thu Mar 23 2006 Charlie Brady <charlie_brady@mitel.com> 1.10.0-02
|
||||
- Use shared library to block 0.0.0.0 MX mail loops. [SME: 1116]
|
||||
|
||||
* Tue Mar 14 2006 Charlie Brady <charlie_brady@mitel.com> 1.10.0-01
|
||||
- Roll stable stream version. [SME: 1016]
|
||||
|
||||
* Fri Mar 03 2006 Charlie Brady <charlie_brady@mitel.com> 1.9.1-05
|
||||
- Add ~alias/.qmail-shared-default symlink. [SME: 764]
|
||||
|
||||
* Thu Feb 16 2006 Charlie Brady <charlieb@e-smith.com> 1.9.1-04
|
||||
- Fix migration when AdminEmail is not set. [SME: 818]
|
||||
|
||||
* Thu Feb 16 2006 Charlie Brady <charlieb@e-smith.com> 1.9.1-03
|
||||
- Use standard user .qmail template for admin user. Migrate
|
||||
AdminEmail setting to $admin{ForwardAddress}. [SME: 818]
|
||||
|
||||
* Tue Jan 24 2006 Charlie Brady <charlieb@e-smith.com> 1.9.1-02
|
||||
- Fix duplicate symlink creation attempt in bootstrap-console-save
|
||||
directory (during RPM build). [SME: 555]
|
||||
|
||||
* Wed Jan 11 2006 Gordon Rowell <gordonr@gormand.com.au> 1.9.1-01
|
||||
- Roll patches to 1.9.0-16
|
||||
- Change ~alias/.qmail{default,localdelivery-default,shared} into
|
||||
directory templates [SME: 440]
|
||||
|
||||
* Wed Nov 30 2005 Gordon Rowell <gordonr@gormand.com.au> 1.9.0-16
|
||||
- Bump release number only
|
||||
|
||||
* Tue Nov 22 2005 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.9.0-15]
|
||||
- Fix broken symlink in group-delete event. Delete -default .qmail file
|
||||
when deleting group. [SF: 1363973]
|
||||
|
||||
* Tue Nov 1 2005 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.9.0-14]
|
||||
- Improve /var/qmail/users/assign/70pseudonyms error handling. [SF: 1337029]
|
||||
- Fix error text from 60users template fragment. [SF: 1345206]
|
||||
|
||||
* Fri Oct 21 2005 Gordon Rowell <gordonr@e-smith.com>
|
||||
- [1.9.0-13]
|
||||
- Add quotes around 'Recipient unknown' when calling bouncesaying.
|
||||
Otherwise we're trying to call a program called 'unknown' [SF: 1334002]
|
||||
|
||||
* Wed Oct 19 2005 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.9.0-12]
|
||||
- Ensure failsafe .qmail file if EmailForward property is not set.
|
||||
[SF: 1330452]
|
||||
|
||||
* Fri Oct 7 2005 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.9.0-11]
|
||||
- Expand virtualdomains in pseudonym-* events. Replace use of control/1
|
||||
by generic actions, plus qmail-newu symlinked into event directories.
|
||||
[SF: 1311349]
|
||||
|
||||
* Mon Sep 26 2005 Gordon Rowell <gordonr@gormand.com.au>
|
||||
- [1.9.0-10]
|
||||
- Split up templates-user/.qmail into fragments which return
|
||||
one or zero lines. It's much cleaner and helps with add-ons.
|
||||
Move .qmail/20Forward -> 70Forward to leave more room for
|
||||
add-ons [SF: 1252336]
|
||||
- Minor fixups - thanks Stephen Noble [SF: 1252336]
|
||||
- TODO: Remove the 10Filter stuff and migrate
|
||||
qmail{DeliveryInstruction} and qmail{DeliveryType}
|
||||
|
||||
* Mon Sep 19 2005 Gordon Rowell <gordonr@e-smith.com>
|
||||
- [1.9.0-09]
|
||||
- Correct /var/qmail/users/assign/50system fragment so that
|
||||
mail for system accounts is delivered to admin [SF: 1284311]
|
||||
|
||||
* Tue Sep 13 2005 Gordon Rowell <gordonr@gormand.com.au>
|
||||
- [1.9.0-08]
|
||||
- Add extension address handling for pseudonyms and groups.
|
||||
[SF: 1286823]
|
||||
|
||||
* Mon Aug 22 2005 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.9.0-07]
|
||||
- Make correct /service symlink, so that a runit finds the
|
||||
run files. [SF: 1264668]
|
||||
|
||||
* Wed Aug 10 2005 Shad Lords <slords@mail.com>
|
||||
- [1.9.0-06]
|
||||
- Add empty template-begin header for users/assign
|
||||
- Add requires for e-smith-email
|
||||
- Add provides e-smith-mta
|
||||
|
||||
* Tue Aug 9 2005 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.9.0-05]
|
||||
- Add in all qmail specific code from e-smith-email. [SF: 1255261]
|
||||
|
||||
* Wed Dec 29 2004 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.9.0-04]
|
||||
- Remove dangling conf-migrate-* symlink [charlieb MN00062545]
|
||||
|
||||
* Tue Dec 28 2004 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.9.0-03]
|
||||
- Remove no longer needed conf-migrate-* action [charlieb MN00062545]
|
||||
- Replace deprecated Copyright header with License header.
|
||||
|
||||
* Thu Feb 12 2004 Michael Soulier <msoulier@e-smith.com>
|
||||
- [1.9.0-02]
|
||||
- Updating with esmith::Build::CreateLinks, and the new genfilelist options.
|
||||
- Yanked migrate-qmail-logfiles, as it was causing problems.
|
||||
[msoulier dpar-20522]
|
||||
|
||||
* Fri Feb 6 2004 Michael Soulier <msoulier@e-smith.com>
|
||||
- [1.9.0-01]
|
||||
- rolling to dev - 1.9.0
|
||||
|
||||
* Thu Aug 28 2003 Michael Soulier <msoulier@e-smith.com>
|
||||
- [1.8.0-02]
|
||||
- Adding K* init symlinks in runlevels 0, 1 and 6. [msoulier 9761]
|
||||
|
||||
* Thu Jun 26 2003 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.8.0-01]
|
||||
- Changing version to stable stream number - 1.8.0
|
||||
|
||||
* Wed Nov 6 2002 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.7.0-01]
|
||||
- Rolling development stream version to 1.7.0
|
||||
|
||||
* Fri Oct 11 2002 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.6.0-01]
|
||||
- Roll to maintained version number to 1.6.0
|
||||
|
||||
* Fri Oct 11 2002 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.6.0-01]
|
||||
- Roll to maintained version number to 1.6.0
|
||||
|
||||
* Wed Aug 21 2002 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.5.1-01]
|
||||
- Remove bogus e-smith-base dependency, which shows as an unmet
|
||||
dependency on our workstations.
|
||||
- Add rc7.d symlink [charlieb 4458]
|
||||
|
||||
* Wed Jun 5 2002 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.5.0-01]
|
||||
- Changing version to development stream number to 1.5.0
|
||||
|
||||
* Fri May 31 2002 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.4.0-01]
|
||||
- Changing version to maintained stream number to 1.4.0
|
||||
|
||||
* Thu May 23 2002 Gordon Rowell <gordonr@e-smith.com>
|
||||
- [1.3.9-01]
|
||||
- RPM rebuild forced by cvsroot2rpm
|
||||
|
||||
* Thu May 23 2002 Gordon Rowell <gordonr@e-smith.com>
|
||||
- [1.3.8-01]
|
||||
- testing co2rpm --force
|
||||
|
||||
* Thu May 23 2002 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.3.7-01]
|
||||
- Remove world read and execute permission from qmail log directory.
|
||||
|
||||
* Thu Apr 18 2002 Gordon Rowell <gordonr@e-smith.com>
|
||||
- [1.3.6-01]
|
||||
- /supervise/qmail -> /service/qmail [gordonr 3044]
|
||||
|
||||
* Thu Apr 18 2002 Gordon Rowell <gordonr@e-smith.com>
|
||||
- [1.3.5-01]
|
||||
- Added /bin, /usr/bin and /usr/local/bin to qmail's path [gordonr 3044]
|
||||
|
||||
* Thu Apr 18 2002 Gordon Rowell <gordonr@e-smith.com>
|
||||
- [1.3.4-01]
|
||||
- And create /var/log/qmail [gordonr 3044]
|
||||
|
||||
* Thu Apr 18 2002 Gordon Rowell <gordonr@e-smith.com>
|
||||
- [1.3.3-01]
|
||||
- And create directory for pipes to be written to [gordonr 3044]
|
||||
|
||||
* Thu Apr 18 2002 Gordon Rowell <gordonr@e-smith.com>
|
||||
- [1.3.2-01]
|
||||
- Created pipes, symlinks and empty files in SPEC file [gordonr 3044]
|
||||
|
||||
* Thu Apr 18 2002 Gordon Rowell <gordonr@e-smith.com>
|
||||
- [1.3.1-01]
|
||||
- Initial CVS import
|
||||
|
||||
* Thu Apr 18 2002 Gordon Rowell <gordonr@e-smith.com>
|
||||
- [1.3.0-01]
|
||||
- rollRPM: Rolled version number to 1.3.0-01. Includes patches up to 1.2.0-02.
|
||||
|
||||
* Fri Aug 17 2001 gordonr
|
||||
- [1.2.0-02]
|
||||
- Autorebuild by rebuildRPM
|
||||
|
||||
* Wed Aug 8 2001 Charlie Brady <charlieb@e-smith.com>
|
||||
- [1.2.0-01]
|
||||
- Rolled version number to 1.2.0-01. Includes patches upto 1.1.0-04.
|
||||
|
||||
* Tue May 1 2001 Peter Samuel <peters@e-smith.com>
|
||||
- [1.1.0-04]
|
||||
- added /var/log/qmail to filelist
|
||||
|
||||
* Tue May 1 2001 Peter Samuel <peters@e-smith.com>
|
||||
- [1.1.0-03]
|
||||
- added migrate-qmail-logfiles action to post-upgrade
|
||||
|
||||
* Mon Apr 30 2001 Peter Samuel <peters@e-smith.com>
|
||||
- [1.1.0-02]
|
||||
- added conf-migrate-qmail-variables actions to migrate qmail.init
|
||||
configuration variable to qmail
|
||||
- added e-smith header to files
|
||||
|
||||
* Mon Apr 30 2001 Peter Samuel <peters@e-smith.com>
|
||||
- [1.1.0-01]
|
||||
- initial release
|
||||
|
||||
%description
|
||||
Startup scripts for Dan Bernstein's qmail package.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
rm -rf root/etc/rc.d
|
||||
rm -rf root/usr/lib/systemd/system-preset
|
||||
|
||||
%build
|
||||
perl createlinks
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
|
||||
rm -f %{name}-%{version}-%{release}-filelist
|
||||
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
||||
--dir '/var/service/qmail' 'attr(1755,root,root)' \
|
||||
--file '/var/service/qmail/down' 'attr(0644,root,root)' \
|
||||
--file '/var/service/qmail/run' 'attr(0755,root,root)' \
|
||||
--file '/var/service/qmail/control/1' 'attr(0750,root,root)' \
|
||||
--dir '/var/service/qmail/supervise' 'attr(0700,root,root)' \
|
||||
--dir '/var/service/qmail/log' 'attr(0755,root,root)' \
|
||||
--file '/var/service/qmail/log/run' 'attr(0755,root,root)' \
|
||||
--dir '/var/service/qmail/log/supervise' 'attr(0700,root,root)' \
|
||||
--dir '/var/log/qmail' 'attr(2750,qmaill,nofiles)' \
|
||||
--dir '/var/qmail/alias' 'attr(2755,alias,qmail)' \
|
||||
> %{name}-%{version}-%{release}-filelist
|
||||
echo "%doc COPYING" >> %{name}-%{version}-%{release}-filelist
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%pre
|
||||
%preun
|
||||
%post
|
||||
%postun
|
||||
|
||||
%files -f %{name}-%{version}-%{release}-filelist
|
||||
%defattr(-,root,root)
|
@ -0,0 +1,24 @@
|
||||
{
|
||||
my $conf = esmith::ConfigDB->open;
|
||||
return unless $conf;
|
||||
|
||||
my $admin_email = $conf->get_value_and_delete('AdminEmail');
|
||||
return unless defined $admin_email;
|
||||
|
||||
my $admin = $DB->get('admin') ||
|
||||
$DB->new_record('admin', {type => 'system'});
|
||||
if ($admin_email)
|
||||
{
|
||||
$admin->merge_props(
|
||||
EmailForward => 'forward',
|
||||
ForwardAddress => $admin_email,
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$admin->merge_props(
|
||||
EmailForward => 'local',
|
||||
ForwardAddress => '',
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
15000000
|
@ -0,0 +1 @@
|
||||
enabled
|
@ -0,0 +1 @@
|
||||
service
|
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use strict;
|
||||
use esmith::AccountsDB;
|
||||
use esmith::event;
|
||||
|
||||
my $accounts = esmith::AccountsDB->open() or
|
||||
die "Unable to open accounts db: $!";
|
||||
|
||||
my ($self, $account) = @ARGV;
|
||||
|
||||
# Find all "pseudonyms" entries in the e-smith accounts database and
|
||||
# if the pseudonyms has an unexisting Account associated we change
|
||||
# it to user "admin".
|
||||
|
||||
foreach my $pseudo ( $accounts->pseudonyms ) {
|
||||
unless ( $accounts->get($pseudo->prop('Account')) ) {
|
||||
$pseudo->set_prop( 'Account', 'admin' );
|
||||
print "orphaned pseudonym " . $pseudo->key. " has been associated to admin account"
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 1999-2005 MItel Networks Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
use Errno;
|
||||
|
||||
my $event = $ARGV [0];
|
||||
my $groupName = $ARGV [1];
|
||||
|
||||
die "Groupname argument missing." unless defined ($groupName);
|
||||
|
||||
$groupName =~ s/\./:/g;
|
||||
unlink "/var/qmail/alias/.qmail-$groupName";
|
||||
unlink "/var/qmail/alias/.qmail-$groupName-default";
|
||||
|
||||
exit (0);
|
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 2001-2006 Mitel Networks Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
#------------------------------------------------------------
|
||||
# Reset qmail TCP timeouts, and tell qmail-send to retry sending
|
||||
#------------------------------------------------------------
|
||||
|
||||
/var/qmail/bin/qmail-tcpok
|
||||
exec sv alarm /service/qmail
|
@ -0,0 +1,112 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 2002-2006 Mitel Networks Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
use Errno;
|
||||
use esmith::ConfigDB;
|
||||
use esmith::AccountsDB;
|
||||
use esmith::util;
|
||||
|
||||
my $c = esmith::ConfigDB->open_ro || die "Couldn't open config db\n";
|
||||
my $a = esmith::AccountsDB->open_ro || die "Couldn't open accounts db\n";
|
||||
|
||||
my $event = $ARGV [0] || die "Event name arg missing\n";;
|
||||
my @groups;
|
||||
|
||||
if (scalar @ARGV)
|
||||
{
|
||||
@groups = map { $a->get($_); } @ARGV;
|
||||
foreach my $g (@groups)
|
||||
{
|
||||
my $type = $g->prop('type');
|
||||
if ($type =~ /^user/)
|
||||
{
|
||||
# That's fine. We were probably just called from the user-delete
|
||||
# event, in which case we want to update all of the groups. So, leave
|
||||
# the groups array empty.
|
||||
@groups = ();
|
||||
last;
|
||||
}
|
||||
elsif ($type !~ /^group/){
|
||||
die "Expected a user or a group. Got neither: $type\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Regenerate all the groups if the previous block failed in some way.
|
||||
unless (@groups)
|
||||
{
|
||||
@groups = $a->groups;
|
||||
}
|
||||
|
||||
foreach my $group (@groups)
|
||||
{
|
||||
my $groupName = $group->key;
|
||||
unless ($group->prop('type') eq 'group')
|
||||
{
|
||||
warn "Account $groupName is not a group account.\n";
|
||||
next;
|
||||
}
|
||||
my %properties = $group->props;
|
||||
$groupName =~ s/\./:/g;
|
||||
my $group = "/var/qmail/alias/.qmail-$groupName";
|
||||
my @group_members = split(/,/, $properties{Members});
|
||||
# Check if we should exclude members from this group email address
|
||||
my @exclude_users = split(/,/, ($properties{EmailExcludeUsers} || ''));
|
||||
my @exclude_groups = split(/,/, ($properties{EmailExcludeGroups} || ''));
|
||||
foreach my $exclude_group (@exclude_groups){
|
||||
my $g = $a->get($exclude_group);
|
||||
next unless $g;
|
||||
push @exclude_users, split(/,/, ($g->prop('Members') || ''));
|
||||
}
|
||||
my %exclude = map { $_, 1 } @exclude_users;
|
||||
@exclude_users = keys %exclude;
|
||||
my @members = ();
|
||||
foreach my $user (@group_members){
|
||||
next if grep { $_ eq $user } @exclude_users;
|
||||
push @members, $user;
|
||||
}
|
||||
my $members = join(',', @members);
|
||||
|
||||
esmith::util::processTemplate(
|
||||
{
|
||||
CONFREF =>
|
||||
{
|
||||
Members => $members,
|
||||
},
|
||||
|
||||
TEMPLATE_PATH =>
|
||||
"/var/qmail/alias/.qmail-group",
|
||||
|
||||
OUTPUT_FILENAME => "/var/qmail/alias/.qmail-$groupName",
|
||||
}
|
||||
);
|
||||
|
||||
unless (-f "/var/qmail/alias/.qmail-$groupName-default")
|
||||
{
|
||||
symlink "/var/qmail/alias/.qmail-$groupName",
|
||||
"/var/qmail/alias/.qmail-$groupName-default";
|
||||
}
|
||||
|
||||
}
|
||||
exit (0);
|
@ -0,0 +1,84 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 1999-2005 Mitel Networks Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
use Errno;
|
||||
use esmith::ConfigDB;
|
||||
use esmith::AccountsDB;
|
||||
use esmith::templates;
|
||||
use User::pwent;
|
||||
|
||||
|
||||
my $accountsdb = esmith::AccountsDB->open_ro or
|
||||
die "Could not open accounts db\n";
|
||||
|
||||
my $event = shift;
|
||||
my $userName = shift;
|
||||
my @users;
|
||||
|
||||
if (defined $userName)
|
||||
{
|
||||
my $user = $accountsdb->get($userName);
|
||||
die
|
||||
"Account $userName is not a user account; update email forwarding failed.\n"
|
||||
unless $userName eq 'admin' || ($user && $user->prop('type') eq "user");
|
||||
@users = ($user);
|
||||
}
|
||||
else
|
||||
{
|
||||
@users = ( $accountsdb->users, $accountsdb->get('admin') );
|
||||
}
|
||||
|
||||
foreach my $user (@users)
|
||||
{
|
||||
my $userName = $user->key;
|
||||
|
||||
setpwent();
|
||||
my $home = getpwnam($userName)->dir;
|
||||
for my $dotfile ( qw(.qmail .qmail-junkmail) )
|
||||
{
|
||||
esmith::templates::processTemplate (
|
||||
{
|
||||
MORE_DATA =>
|
||||
{
|
||||
USERNAME => $userName ,
|
||||
},
|
||||
TEMPLATE_PATH => "/$dotfile",
|
||||
TEMPLATE_EXPAND_QUEUE =>
|
||||
[
|
||||
"/etc/e-smith/templates-user-custom",
|
||||
"/etc/e-smith/templates-user",
|
||||
],
|
||||
OUTPUT_PREFIX => "$home",
|
||||
UID => $userName,
|
||||
GID => $userName,
|
||||
PERMS => 0644,
|
||||
} );
|
||||
};
|
||||
unless (-f "$home/.qmail-default")
|
||||
{
|
||||
symlink ".qmail", "$home/.qmail-default";
|
||||
}
|
||||
}
|
||||
|
||||
exit (0);
|
@ -0,0 +1,2 @@
|
||||
| [ -d ./Maildir/.junkmail/ ] || /var/qmail/bin/maildirmake ./Maildir/.junkmail/
|
||||
./Maildir/.junkmail/
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
# vim: ft=perl:
|
||||
die "USERNAME not set." unless defined ($USERNAME);
|
||||
|
||||
use esmith::AccountsDB;
|
||||
$adb = esmith::AccountsDB->open_ro or die "Couldn't open AccountsDB";
|
||||
|
||||
$user = $adb->get($USERNAME) or die "No user $USERNAME in AccountsDB";
|
||||
|
||||
%props = $user->props;
|
||||
$props{EmailForward} ||= 'local';
|
||||
|
||||
$OUT = '';
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
{
|
||||
# vim: ft=perl:
|
||||
$OUT = '';
|
||||
|
||||
$props{Filter} ||= 'yes';
|
||||
|
||||
return '# Filter property is no'
|
||||
unless ($props{Filter} eq 'yes');
|
||||
|
||||
my $preprocessing = "";
|
||||
my $dt = $qmail{DeliveryType} || '';
|
||||
|
||||
if ($dt eq 'program')
|
||||
{
|
||||
$preprocessing .= '| ';
|
||||
}
|
||||
$preprocessing .= $qmail{DeliveryInstruction} || '';
|
||||
|
||||
$OUT = "$preprocessing\n" if $preprocessing;
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
# vim: ft=perl:
|
||||
return '# Forward not set'
|
||||
unless ($props{EmailForward} =~ /^(forward|both)$/);
|
||||
|
||||
return '&' . $props{ForwardAddress};
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
# vim: ft=perl:
|
||||
return '# No local delivery'
|
||||
unless ($props{EmailForward} =~ /^(local|both)$/);
|
||||
|
||||
return './Maildir/';
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
UID="admin"
|
||||
GID="admin"
|
||||
PERMS=0640
|
@ -0,0 +1,2 @@
|
||||
UID="alias"
|
||||
GID="qmail"
|
@ -0,0 +1 @@
|
||||
FILTER=sub { $_[0] =~ /^\s*$/ ? '' : $_[0] }
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
($EmailUnknownUser eq "returntosender") ?
|
||||
"| bouncesaying 'Recipient unknown'" :
|
||||
"$EmailUnknownUser";
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
# Generic template to rebuild any .qmail-groupname file. Expects
|
||||
# to be called with a CONFREF containing the group members.
|
||||
$OUT .= join("\n", map { '&' . $_ } split(/,/, $Members));
|
||||
}
|
@ -0,0 +1 @@
|
||||
| forward $DEFAULT@{"$SystemName.$DomainName"}
|
@ -0,0 +1,13 @@
|
||||
{
|
||||
use esmith::AccountsDB;
|
||||
my $a = esmith::AccountsDB->open_ro;
|
||||
|
||||
$OUT = '';
|
||||
|
||||
for my $user ( $a->get('admin'), $a->users )
|
||||
{
|
||||
next if ( ($user->prop('EveryoneEmail') || 'yes') eq 'no');
|
||||
|
||||
$OUT .= '&' . $user->key . "\n";
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
MAILER-DAEMON
|
@ -0,0 +1 @@
|
||||
{ $DomainName }
|
@ -0,0 +1 @@
|
||||
{ (defined $DB->get('qmail')->prop('ConcurrencyLocal')) ? $DB->get('qmail')->prop('ConcurrencyLocal') : "20"; }
|
@ -0,0 +1 @@
|
||||
{ (defined $DB->get('qmail')->prop('ConcurrencyRemote'))? $DB->get('qmail')->prop('ConcurrencyRemote') : "20"; }
|
@ -0,0 +1 @@
|
||||
{ $DB->get('qmail')->prop('MaxMessageSize') || "0"; }
|
@ -0,0 +1 @@
|
||||
{ $DomainName }
|
@ -0,0 +1 @@
|
||||
{ $DomainName }
|
@ -0,0 +1 @@
|
||||
{ $DomainName }
|
@ -0,0 +1 @@
|
||||
{ $DB->get('qmail')->prop('DoubleBounceTo') || "postmaster"; }
|
@ -0,0 +1 @@
|
||||
{ $DomainName }
|
@ -0,0 +1 @@
|
||||
{ $qpsmtpd{HeloHost} || $DomainName }
|
@ -0,0 +1,11 @@
|
||||
#
|
||||
# Everything except the localhost and the local machine name is now
|
||||
# treated as a virtual domain.
|
||||
#
|
||||
localhost
|
||||
{"$SystemName.$DomainName"}
|
||||
{
|
||||
return "# No ExternalIP" unless (defined $ExternalIP);
|
||||
|
||||
return "[$ExternalIP]";
|
||||
}
|
@ -0,0 +1 @@
|
||||
{ $DomainName }
|
@ -0,0 +1 @@
|
||||
{ $DomainName }
|
@ -0,0 +1,25 @@
|
||||
{
|
||||
#
|
||||
# qmail's smtproutes mechanism works such that the LAST BEST match
|
||||
# found in /var/qmail/control/smtproutes will be used in preference
|
||||
# to any other entry.
|
||||
#
|
||||
# Consider the following /var/qmail/control/smtproutes example:
|
||||
#
|
||||
# :smarthost.somewhere
|
||||
# domain.place:some.host
|
||||
# domain.place:other.host
|
||||
# :some.other.smarthost.elsewhere
|
||||
#
|
||||
# Mail for user@domain.place will ALWAYS be delivered to
|
||||
# other.host. The entry for some.host will NEVER be used.
|
||||
#
|
||||
# Mail for any other domain will ALWAYS be delivered to
|
||||
# some.other.smarthost.elsewhere. The entry for smarthost.somewhere
|
||||
# will NEVER be used.
|
||||
#
|
||||
# Therefore, if you wish to make any customisations to the
|
||||
# /var/qmail/control/smtproutes templates, you must ensure that they
|
||||
# appear AFTER the standard e-smith template entries.
|
||||
#
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
$OUT = "";
|
||||
|
||||
use esmith::DomainsDB;
|
||||
my $ddb = esmith::DomainsDB->open_ro();
|
||||
|
||||
for my $domain ( $ddb->domains )
|
||||
{
|
||||
my $mail_server = $domain->prop('MailServer')
|
||||
|| $DelegateMailServer
|
||||
|| 'localhost';
|
||||
|
||||
next if ( $mail_server eq 'localhost' );
|
||||
|
||||
$OUT .= $domain->key . ":$mail_server\n";
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
{
|
||||
$OUT = "";
|
||||
|
||||
#--------------------------------------------------
|
||||
# Now check for SMTP smart host
|
||||
#--------------------------------------------------
|
||||
|
||||
if (
|
||||
$SMTPSmartHost
|
||||
&&
|
||||
($SMTPSmartHost ne 'off')
|
||||
&&
|
||||
($SMTPSmartHost !~ /^\s*$/)
|
||||
)
|
||||
{
|
||||
# Is the smtp-auth-proxy enabled?
|
||||
if (${'smtp-auth-proxy'}{'status'} eq 'enabled')
|
||||
{
|
||||
$OUT .= ":localhost:26";
|
||||
}
|
||||
else
|
||||
{
|
||||
$OUT .= ":$SMTPSmartHost";
|
||||
}
|
||||
}
|
||||
|
||||
chomp ($OUT);
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
{
|
||||
$OUT = '';
|
||||
|
||||
use esmith::DomainsDB;
|
||||
my $domainsdb = esmith::DomainsDB->open_ro();
|
||||
|
||||
for my $domain ($domainsdb->domains)
|
||||
{
|
||||
my $mail_server = $domain->prop('MailServer')
|
||||
|| $DelegateMailServer
|
||||
|| 'localhost';
|
||||
|
||||
next if ( $mail_server ne 'localhost' );
|
||||
|
||||
$emaildomain = $domain->key;
|
||||
my $handler = $domain->prop('EmailTo') || "alias-localdelivery";
|
||||
$OUT .= "$emaildomain:$handler\n";
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
{
|
||||
my $dms = $DelegateMailServer;
|
||||
|
||||
return "# DelegateMailServer is set" if ($dms && ($dms !~ /^\s*$/));
|
||||
|
||||
$OUT = "";
|
||||
|
||||
use esmith::AccountsDB;
|
||||
|
||||
my $adb = esmith::AccountsDB->open_ro or die "Couldn't open AccountsDB";
|
||||
|
||||
for my $pseudo ($adb->pseudonyms)
|
||||
{
|
||||
next unless ($pseudo->key =~ /@/);
|
||||
|
||||
my $account = $pseudo->prop("Account");
|
||||
$account = "admin" and warn $pseudo->prop("Account") . " is not a valid account, default to admin " unless $adb->get($account);
|
||||
my $acct = $adb->get($account);
|
||||
if ($acct->prop('type') eq "group")
|
||||
{
|
||||
$account =~ s/\./:/g;
|
||||
}
|
||||
|
||||
$OUT .= $pseudo->key . ":$account\n";
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
{
|
||||
$OUT = '';
|
||||
|
||||
# Generate qmail user assignments for the admin user. This will be
|
||||
# handled by ~admin/.qmail.
|
||||
|
||||
my (undef, undef, $uid, $gid, undef, undef, undef, $dir, undef)
|
||||
= getpwnam("admin");
|
||||
|
||||
# It is almost impossible to get Text::Template to output nothing
|
||||
# on failure. It can be done by removing the newline at the end of
|
||||
# this file but that is messy. Therefore, we'll simply return an
|
||||
# error message that will make qmail-newu fail. Also send a
|
||||
# warning message that will be captured in the logs.
|
||||
|
||||
unless (defined $uid && defined $gid && defined $dir)
|
||||
{
|
||||
my $msg =
|
||||
"Failed to obtain user details for \'admin\' "
|
||||
. "while processing admin assignment.";
|
||||
|
||||
warn "$msg\n";
|
||||
$OUT = $msg;
|
||||
return;
|
||||
}
|
||||
|
||||
# Assign mail for the admin user itself, and for admin-ext.
|
||||
|
||||
my $admin_assign = "admin:${uid}:${gid}:${dir}";
|
||||
$OUT .= "=admin:${admin_assign}:::\n";
|
||||
$OUT .= "+admin-:${admin_assign}:-::";
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
{
|
||||
$OUT = '';
|
||||
|
||||
# Generate qmail user assignments for the alias user. This will be
|
||||
# handled by ~alias/.qmail.
|
||||
|
||||
my (undef, undef, $uid, $gid, undef, undef, undef, $dir, undef)
|
||||
= getpwnam("alias");
|
||||
|
||||
# It is almost impossible to get Text::Template to output nothing
|
||||
# on failure. It can be done by removing the newline at the end of
|
||||
# this file but that is messy. Therefore, we'll simply return an
|
||||
# error message that will make qmail-newu fail. Also send a
|
||||
# warning message that will be captured in the logs.
|
||||
|
||||
unless (defined $uid && defined $gid && defined $dir)
|
||||
{
|
||||
my $msg =
|
||||
"Failed to obtain user details for \'alias\' "
|
||||
. "while processing alias assignment.";
|
||||
|
||||
warn "$msg\n";
|
||||
$OUT = $msg;
|
||||
return;
|
||||
}
|
||||
|
||||
# Assign mail for the alias user itself, and for alias-ext.
|
||||
|
||||
my $alias_assign = "alias:${uid}:${gid}:${dir}";
|
||||
$OUT .= "=alias:${alias_assign}:::\n";
|
||||
$OUT .= "+alias-:${alias_assign}:-::";
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
{
|
||||
$OUT = '';
|
||||
|
||||
# Generate qmail user assignments for the shared group. This will
|
||||
# be handled by ~alias/.qmail-shared and ~alias/.qmail-shared-ext.
|
||||
|
||||
my (undef, undef, $uid, $gid, undef, undef, undef, $dir, undef)
|
||||
= getpwnam("alias");
|
||||
|
||||
# It is almost impossible to get Text::Template to output nothing
|
||||
# on failure. It can be done by removing the newline at the end of
|
||||
# this file but that is messy. Therefore, we'll simply return an
|
||||
# error message that will make qmail-newu fail. Also send a
|
||||
# warning message that will be captured in the logs.
|
||||
|
||||
unless (defined $uid && defined $gid && defined $dir)
|
||||
{
|
||||
my $msg =
|
||||
"Failed to obtain user details for \'alias\' "
|
||||
. "while processing shared assignment.";
|
||||
|
||||
warn "$msg\n";
|
||||
$OUT = $msg;
|
||||
return;
|
||||
}
|
||||
|
||||
my $alias_assign = "alias:${uid}:${gid}:${dir}";
|
||||
|
||||
$OUT .= "=shared:${alias_assign}:-:shared:\n";
|
||||
$OUT .= "+shared-:${alias_assign}:-shared-::\n";
|
||||
|
||||
# Need to remove the final newline character. Blank lines in
|
||||
# /var/qmail/users/assign are prohibited.
|
||||
|
||||
chomp($OUT);
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
{
|
||||
$OUT = '';
|
||||
|
||||
# Generate qmail user assignments for system accounts. These will
|
||||
# be handled by admin. Make sure we DON'T reassign the admin or
|
||||
# alias users!
|
||||
|
||||
my (undef, undef, $uid, $gid, undef, undef, undef, $dir, undef)
|
||||
= getpwnam("admin");
|
||||
|
||||
# It is almost impossible to get Text::Template to output nothing
|
||||
# on failure. It can be done by removing the newline at the end of
|
||||
# this file but that is messy. Therefore, we'll simply return an
|
||||
# error message that will make qmail-newu fail. Also send a
|
||||
# warning message that will be captured in the logs.
|
||||
|
||||
unless (defined $uid && defined $gid && defined $dir)
|
||||
{
|
||||
my $msg =
|
||||
"Failed to obtain user details for \'admin\' "
|
||||
. "while processing system assignments.";
|
||||
|
||||
warn "$msg\n";
|
||||
$OUT = $msg;
|
||||
return;
|
||||
}
|
||||
|
||||
my $admin_assign = "admin:${uid}:${gid}:${dir}";
|
||||
|
||||
use esmith::AccountsDB;
|
||||
my $adb = esmith::AccountsDB->open_ro();
|
||||
|
||||
foreach my $user ( $adb->get_all_by_prop( type => 'system' ) )
|
||||
{
|
||||
next if ($user->key eq "admin");
|
||||
next if ($user->key eq "alias");
|
||||
next if ($user->key eq "shared");
|
||||
|
||||
# Assign mail for system_account@
|
||||
$OUT .= "=" . $user->key . ":${admin_assign}:::\n";
|
||||
|
||||
# Assign mail for system_account-ext@
|
||||
$OUT .= "+" . $user->key . "-:${admin_assign}:-::\n";
|
||||
}
|
||||
|
||||
# Need to remove the final newline character. Blank lines in
|
||||
# /var/qmail/users/assign are prohibited.
|
||||
|
||||
chomp($OUT);
|
||||
|
||||
# Failsafe: /var/qmail/users/assign cannot have blank lines.
|
||||
# Therefore, if $OUT is empty, simply set up an assign for the
|
||||
# admin user.
|
||||
|
||||
$OUT = "=admin:${admin_assign}:::" unless $OUT;
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
{
|
||||
$OUT = '';
|
||||
|
||||
# Generate qmail user assignments for users. These will be handled by
|
||||
# ~user/.qmail.
|
||||
|
||||
use esmith::AccountsDB;
|
||||
my $adb = esmith::AccountsDB->open_ro();
|
||||
|
||||
foreach $user ( $adb->users )
|
||||
{
|
||||
my $user_name = $user->key;
|
||||
my (undef, undef, $uid, $gid, undef, undef, undef, $dir, undef)
|
||||
= getpwnam($user_name);
|
||||
|
||||
# It is almost impossible to get Text::Template to output nothing
|
||||
# on failure. It can be done by removing the newline at the end of
|
||||
# this file but that is messy. Therefore, we'll simply return an
|
||||
# error message that will make qmail-newu fail. Also send a
|
||||
# warning message that will be captured in the logs.
|
||||
|
||||
unless (defined $uid && defined $gid && defined $dir)
|
||||
{
|
||||
my $msg =
|
||||
"Failed to obtain user details for \'$user_name\' "
|
||||
. "while processing user assignments.";
|
||||
|
||||
warn "$msg\n";
|
||||
$OUT = $msg;
|
||||
return;
|
||||
}
|
||||
|
||||
$user_assign = $user_name . ":${uid}:${gid}:${dir}";
|
||||
|
||||
# Assign mail for user@
|
||||
$OUT .= "=" . $user_name . ":${user_assign}:::\n";
|
||||
|
||||
# Assign mail for user-ext@
|
||||
$OUT .= "+" . $user_name . "-:${user_assign}:-::\n";
|
||||
}
|
||||
|
||||
# Need to remove the final newline character. Blank lines in
|
||||
# /var/qmail/users/assign are prohibited.
|
||||
|
||||
chomp($OUT);
|
||||
|
||||
# Failsafe: /var/qmail/users/assign cannot have blank lines.
|
||||
# Therefore, if $OUT is empty, simply set up an assign for the
|
||||
# alias user.
|
||||
|
||||
unless ($OUT)
|
||||
{
|
||||
(undef, undef, $uid, $gid, undef, undef, undef, $dir, undef)
|
||||
= getpwnam("alias");
|
||||
|
||||
$alias_assign = "alias:${uid}:${gid}:${dir}";
|
||||
$OUT = "=alias:${alias_assign}:::";
|
||||
}
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
{
|
||||
$OUT = '';
|
||||
|
||||
# Generate qmail user assignments for pseudonyms. These will
|
||||
# be handled by ~user/.qmail in the case of a user pseudonym
|
||||
# or by ~admin/.qmail in the case of a system pseudonym or by
|
||||
# alias/.qmail-groupname in the case of a group pseudonym.
|
||||
|
||||
my (undef, undef, $uid, $gid, undef, undef, undef, $dir, undef)
|
||||
= getpwnam("alias");
|
||||
|
||||
# It is almost impossible to get Text::Template to output nothing
|
||||
# on failure. It can be done by removing the newline at the end of
|
||||
# this file but that is messy. Therefore, we'll simply return an
|
||||
# error message that will make qmail-newu fail. Also send a
|
||||
# warning message that will be captured in the logs.
|
||||
|
||||
unless (defined $uid && defined $gid && defined $dir)
|
||||
{
|
||||
my $msg =
|
||||
"Failed to obtain user details for \'alias\' "
|
||||
. "while processing pseudonym assignments.";
|
||||
|
||||
warn "$msg\n";
|
||||
$OUT = $msg;
|
||||
return;
|
||||
}
|
||||
|
||||
my $alias_assign = "alias:${uid}:${gid}:${dir}";
|
||||
|
||||
undef $uid;
|
||||
undef $gid;
|
||||
undef $dir;
|
||||
|
||||
(undef, undef, $uid, $gid, undef, undef, undef, $dir, undef)
|
||||
= getpwnam("admin");
|
||||
|
||||
unless (defined $uid && defined $gid && defined $dir)
|
||||
{
|
||||
my $msg =
|
||||
"Failed to obtain user details for \'admin\' "
|
||||
. "while processing pseudonym assignments.";
|
||||
|
||||
warn "$msg\n";
|
||||
$OUT = $msg;
|
||||
return;
|
||||
}
|
||||
|
||||
my $admin_assign = "admin:${uid}:${gid}:${dir}";
|
||||
|
||||
# Create assignments for each pseudonym.
|
||||
|
||||
use esmith::AccountsDB;
|
||||
my $adb = esmith::AccountsDB->open_ro();
|
||||
|
||||
foreach $pseudonym ( $adb->pseudonyms )
|
||||
{
|
||||
next if ( $pseudonym->key =~ /@/ ); # user@domain goes in virtualdomains
|
||||
|
||||
my $account = $pseudonym->prop('Account');
|
||||
unless ($account)
|
||||
{
|
||||
my $key = $pseudonym->key;
|
||||
warn "pseudonym $key has no account property, default to admin";
|
||||
$account = $adb->get('admin');
|
||||
#next;
|
||||
}
|
||||
|
||||
$account = $adb->get($pseudonym->prop('Account'));
|
||||
unless ($account)
|
||||
{
|
||||
my $key = $pseudonym->key;
|
||||
warn "pseudonym $key points to account which does not exist, default to admin";
|
||||
$account = $adb->get('admin');
|
||||
#next;
|
||||
}
|
||||
|
||||
my $i = 1;
|
||||
while ( $account->prop('type') eq "pseudonym")
|
||||
{
|
||||
$account = $adb->get($account->prop('Account'));
|
||||
unless ($account)
|
||||
{
|
||||
my $key = $pseudonym->key;
|
||||
warn "pseudonym $key points to account which does not exist, default to admin";
|
||||
$account = $adb->get('admin');
|
||||
last;
|
||||
}
|
||||
$i ++; last if $i>10;
|
||||
}
|
||||
|
||||
if ($account->prop('type') eq "pseudonym")
|
||||
{
|
||||
warn "users/assign: Skipping " . $pseudonym->key . " - too many pseudonym levels\n";
|
||||
next;
|
||||
}
|
||||
|
||||
if ($account->prop('type') eq "user")
|
||||
{
|
||||
my (undef, undef, $uid, $gid, undef, undef, undef, $dir, undef)
|
||||
= getpwnam($account->key);
|
||||
|
||||
unless (defined $uid && defined $gid && defined $dir)
|
||||
{
|
||||
my $msg =
|
||||
"Failed to obtain user details for \'" . $account->key . "\' "
|
||||
. "while processing pseudonym assignments.";
|
||||
|
||||
warn "$msg\n";
|
||||
$OUT = $msg;
|
||||
return;
|
||||
}
|
||||
|
||||
$assign = $account->key . ":${uid}:${gid}:${dir}";
|
||||
|
||||
# Assign mail for user_pseudonym@
|
||||
$OUT .= "=" . $pseudonym->key . ":${assign}:::\n";
|
||||
$OUT .= "+" . $pseudonym->key . "-:${assign}:-::\n";
|
||||
next;
|
||||
}
|
||||
|
||||
if ($account->prop('type') eq "group" || $account->key eq "shared")
|
||||
{
|
||||
$OUT .= "=" . $pseudonym->key . ":${alias_assign}:-:" . $account->key . ":\n";
|
||||
$OUT .= "+" . $pseudonym->key . "-:${alias_assign}:-:" . $account->key . ":\n";
|
||||
next;
|
||||
}
|
||||
|
||||
if ($account->prop('type') eq "system" )
|
||||
{
|
||||
$OUT .= "=" . $pseudonym->key . ":${admin_assign}:::\n";
|
||||
$OUT .= "+" . $pseudonym->key . "-:${admin_assign}:-::\n";
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
# Need to remove the final newline character. Blank lines in
|
||||
# /var/qmail/users/assign are prohibited.
|
||||
|
||||
chomp($OUT);
|
||||
|
||||
# Failsafe: /var/qmail/users/assign cannot have blank lines.
|
||||
# Therefore, if $OUT is empty, simply set up an assign for the
|
||||
# alias user.
|
||||
|
||||
$OUT = "=alias:${alias_assign}:::" unless $OUT;
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
{
|
||||
$OUT = '';
|
||||
|
||||
# Generate qmail user assignments for groups. These will be handled
|
||||
# by ~alias/.qmail-groupname and ~alias/.qmail-groupname-ext.
|
||||
|
||||
my (undef, undef, $uid, $gid, undef, undef, undef, $dir, undef)
|
||||
= getpwnam("alias");
|
||||
|
||||
# It is almost impossible to get Text::Template to output nothing
|
||||
# on failure. It can be done by removing the newline at the end of
|
||||
# this file but that is messy. Therefore, we'll simply return an
|
||||
# error message that will make qmail-newu fail. Also send a
|
||||
# warning message that will be captured in the logs.
|
||||
|
||||
unless (defined $uid && defined $gid && defined $dir)
|
||||
{
|
||||
my $msg =
|
||||
"Failed to obtain user details for \'alias\' "
|
||||
. "while processing group assignments.";
|
||||
|
||||
warn "$msg\n";
|
||||
$OUT = $msg;
|
||||
return;
|
||||
}
|
||||
|
||||
my $alias_assign = "alias:${uid}:${gid}:${dir}";
|
||||
|
||||
use esmith::AccountsDB;
|
||||
my $adb = esmith::AccountsDB->open_ro();
|
||||
|
||||
foreach $group ( $adb->groups )
|
||||
{
|
||||
# Assign mail for group@
|
||||
$OUT .= "=" . $group->key . ":${alias_assign}:-:" . $group->key . ":\n";
|
||||
|
||||
# Assign mail for group-ext@
|
||||
$OUT .= "+" . $group->key . "-:${alias_assign}:-" . $group->key . "-::\n";
|
||||
}
|
||||
|
||||
# Need to remove the final newline character. Blank lines in
|
||||
# /var/qmail/users/assign are prohibited.
|
||||
|
||||
chomp($OUT);
|
||||
|
||||
# Failsafe: /var/qmail/users/assign cannot have blank lines.
|
||||
# Therefore, if $OUT is empty, simply set up an assign for the
|
||||
# alias user.
|
||||
|
||||
$OUT = "=alias:${alias_assign}:::" unless $OUT;
|
||||
}
|
@ -0,0 +1 @@
|
||||
.
|
@ -0,0 +1 @@
|
||||
../var/service/qmail
|
@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=qmail, message transfer agent
|
||||
After=network.target
|
||||
Requires=runit.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=/sbin/e-smith/service-status qmail
|
||||
ExecStart=/usr/bin/sv u /service/qmail
|
||||
ExecStop=/usr/bin/sv stop /service/qmail
|
||||
ExecReload=/usr/bin/sv t /service/qmail
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=sme-server.target
|
@ -0,0 +1 @@
|
||||
# devnull - bit bucket - throw the mail away
|
@ -0,0 +1 @@
|
||||
# devnull - bit bucket - throw the mail away
|
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 2001 e-smith, inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Technical support for this program is available from e-smith, inc.
|
||||
# Please visit our web site www.e-smith.com for details.
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
NUM=$(/sbin/e-smith/db configuration getprop qmail KeepLogFiles)
|
||||
|
||||
exec \
|
||||
/usr/local/bin/setuidgid qmaill \
|
||||
/usr/local/bin/multilog t s5000000 \
|
||||
n${NUM:-10} \
|
||||
/var/log/qmail
|
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 2002-2006 Mitel Networks Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
if [ ! -f /var/qmail/queue/lock/tcpto ]
|
||||
then
|
||||
dd bs=1024 count=1 if=/dev/zero of=/var/qmail/queue/lock/tcpto
|
||||
chown qmailr:qmail /var/qmail/queue/lock/tcpto
|
||||
chmod 644 /var/qmail/queue/lock/tcpto
|
||||
fi
|
||||
|
||||
exec \
|
||||
/usr/bin/env - PATH="/var/qmail/bin:/bin:/usr/bin:/usr/local/bin" \
|
||||
/var/qmail/bin/qmail-start \
|
||||
./Maildir/ \
|
||||
2>&1
|
Loading…
Reference in New Issue