Compare commits

...

12 Commits
sme9 ... master

Author SHA1 Message Date
Daniel Berteaud 8761671533 Spec file update 2015-01-07 17:55:19 +01:00
Daniel Berteaud 405eb1157d Allow args to passdb 2015-01-07 17:01:20 +01:00
Daniel Berteaud 0075251890 Spec file update 2014-07-09 08:44:41 +02:00
Daniel Berteaud 79b21830af Spec file update 2014-02-07 15:28:46 +01:00
Daniel Berteaud 07711461cf Migrate limits from imaps to imap DB entry 2014-02-07 14:55:26 +01:00
Daniel Berteaud 8a97c4d939 Backport fix from http://bugs.contribs.org/show_bug.cgi?id=7570 2014-02-07 14:52:32 +01:00
Daniel Berteaud af29cbe4dc Spec file update 2014-01-04 00:57:55 +01:00
Daniel Berteaud 20f8d3181a Apply process limits 2013-12-24 10:14:53 +01:00
Daniel Berteaud 952bf0e709 update spec file 2013-10-29 16:48:12 +01:00
Daniel Berteaud 0cd9571a65 Use SMTP to send sieve notif (forward, vacation etc...) so the From envolop is correctly set 2013-10-29 16:47:23 +01:00
Daniel Berteaud bf99846901 update spec file 2013-03-25 16:25:10 +01:00
Daniel Berteaud c24e5140ec Fix ACL and default ACL on maildirs which have to be 755/644 2013-03-25 16:23:51 +01:00
7 changed files with 58 additions and 6 deletions

View File

@ -0,0 +1,12 @@
{
# Those limits are now defined on the imap entry
foreach my $prop (qw/ConcurrencyLimit ConcurrencyLimitPerIP ProcessMemoryLimit/){
my $imaps_value = $DB->get_prop_and_delete('imaps', $prop);
next unless ($imaps_value);
my $imap_value = $DB->get_prop('imap', $prop);
next if ($imap_value);
$DB->set_prop('imap', $prop, $imaps_value);
}
}

View File

@ -64,7 +64,7 @@ sub set_acl {
system('/usr/bin/setfacl',
'-R',
'-m',
'u::rwX,g::rwX,g:sharedmailbox:rwX,d:u::rwX,d:g::rwX,d:g:sharedmailbox:rwX',
'u::rwX,g::rwX,o::rX,g:sharedmailbox:rwX,d:u::rwX,d:g::rwX,d:g:sharedmailbox:rwX,d:o::rX',
"/home/e-smith/files/users/$user/Maildir") == 0 &&
# Grant sharedmailbox group permission to go through
# the home dir so it can access the Maildir, but don't let it read

View File

@ -1,9 +1,11 @@
{
my $greeting = $dovecot{'Greeting'} || 'SME Server IMAP service powered by doveot';
$OUT .= "login_greeting = \"$greeting\"\n";
our $args = $dovecot{PassDBArgs} || '';
}
passdb \{
driver = pam
{ $OUT .= ($args ne '') ? "args = $args\n" : ''; }
\}
{
if (($dovecot{'AdminIsMaster'} || 'disabled') eq 'enabled'){
@ -11,7 +13,7 @@ if (($dovecot{'AdminIsMaster'} || 'disabled') eq 'enabled'){
passdb {
driver = pam
args = dovecotadmin
args = $args dovecotadmin
master = yes
}
auth_master_user_separator = *

View File

@ -0,0 +1,18 @@
{
my $ConcurrencyLimit = $imap{ConcurrencyLimit} || '400';
my $ConcurrencyLimitPerIP = $imap{ConcurrencyLimitPerIP} || '12';
my $ProcessMemoryLimit = $imap{ProcessMemoryLimit} || '256000000';
$OUT .=<<"END";
service imap {
process_limit = $ConcurrencyLimit
vsz_limit = $ProcessMemoryLimit
}
protocol imap {
mail_max_userip_connections = $ConcurrencyLimitPerIP
}
END
}

View File

@ -15,5 +15,6 @@ if ($subject ne ''){
protocol lda \{
mail_plugins = $mail_plugins {$OUT .= (($sieve{'status'} || 'disabled') eq 'enabled') ? 'sieve':''}
submission_host = 127.0.0.1
\}

View File

@ -33,8 +33,8 @@ my $pem = "./ssl/imapd.pem";
# Now copy system pem file into jail used by ldap
copy("/home/e-smith/ssl.pem/$s.$d.pem", "$pem.$$")
or die "failed to copy SSL PEM: $!";
chmod 0400, "$pem.$$";
esmith::util::chownFile("root", "root", "$pem.$$");
chmod 0440, "$pem.$$";
esmith::util::chownFile("root", "stunnel", "$pem.$$");
rename("$pem.$$", "$pem")
or die "failed to rename $pem.$$ to $pem: $!";

View File

@ -1,4 +1,4 @@
%define version 0.1.0
%define version 0.1.6
%define release 1.beta0
%define name smeserver-dovecot
@ -29,6 +29,25 @@ Configure the dovecot IMAP server with sieve scripts support,
quota, ACL, extended logging, master user
%changelog
* Wed Jan 7 2015 Daniel Berteaud <daniel@firewall-services.com> - 0.1.6-1
- Allow args in passdb
* Wed Jul 9 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.1.5-1
- Remove trailing / when defining permissions on sharedmailbox dir
* Fri Feb 7 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.1.4-1
- Migrate limits from imaps to imap DB entry
- Fix permissions on imapd.pem (for pop3s)
* Tue Dec 24 2013 Daniel Berteaud <daniel@firewall-services.com> - 0.1.3-1
- Apply process limits
* Tue Oct 29 2013 Daniel Berteaud <daniel@firewall-services.com> - 0.1.2-1
- Use SMTP for sending sieve notifications
* Mon Mar 25 2013 Daniel Berteaud <daniel@firewall-services.com> - 0.1.1-1
- Fix ACL and default ACL to set 755/644 on maildirs
* Tue Feb 12 2013 Daniel Berteaud <daniel@firewall-services.com> - 0.1.0-1
- Pass the recipient variable to dovcot-lda
@ -52,7 +71,7 @@ perl createlinks
--file /var/service/dovecot/log/run 'attr(0755,root,root)' \
--file /var/service/dovecot/control/1 'attr(0755,root,root)' \
--dir /var/log/dovecot 'attr(0750,smelog,smelog)' \
--dir /etc/dovecot/sharedmailbox/ 'attr(2770,root,sharedmailbox)' \
--dir /etc/dovecot/sharedmailbox 'attr(2770,root,sharedmailbox)' \
--file /etc/dovecot/sharedmailbox/dict.db 'attr(0660,root,sharedmailbox) %config(noreplace)' \
--file /usr/bin/imap-postlogin 'attr(0755,root,root)' \
> %{name}-%{version}-filelist