-
Notifications
You must be signed in to change notification settings - Fork 0
/
dovecot.rb
62 lines (56 loc) · 1.67 KB
/
dovecot.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
class Dovecot < Formula
desc "IMAP/POP3 server"
homepage "https://dovecot.org/"
url "https://dovecot.org/releases/2.2/dovecot-2.2.31.tar.gz"
version "2.2.31"
bottle do
rebuild 1
root_url "file:///Volumes/Caches/brew"
sha256 "efed535fc67500b6fa931f2cdab1634dfc6e392832ef9a9cfefb0726187e11e1" => :high_sierra
end
depends_on "openssl"
depends_on "clucene" => :optional
def caveats; <<-EOS.undent
For Dovecot to work, you may need to create a dovecot user
and group depending on your configuration file options.
EOS
end
plist_options :startup => true
def plist; <<-EOS.undent
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>KeepAlive</key>
<false/>
<key>RunAtLoad</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>#{opt_sbin}/dovecot</string>
<string>-F</string>
</array>
<key>StandardErrorPath</key>
<string>#{var}/log/dovecot/dovecot.log</string>
<key>StandardOutPath</key>
<string>#{var}/log/dovecot/dovecot.log</string>
<key>SoftResourceLimits</key>
<dict>
<key>NumberOfFiles</key>
<integer>1000</integer>
</dict>
<key>HardResourceLimits</key>
<dict>
<key>NumberOfFiles</key>
<integer>1024</integer>
</dict>
</dict>
</plist>
EOS
end
test do
assert_match /#{version}/, shell_output("#{sbin}/dovecot --version")
end
end