Closed
Bug 733536
Opened 13 years ago
Closed 13 years ago
set up postfix in PuppetAgain
Categories
(Infrastructure & Operations Graveyard :: CIDuty, task, P4)
Infrastructure & Operations Graveyard
CIDuty
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dustin, Assigned: kmoir)
References
Details
(Whiteboard: [puppet])
Attachments
(1 file, 3 obsolete files)
3.35 KB,
patch
|
Callek
:
review+
kmoir
:
checked-in+
|
Details | Diff | Splinter Review |
Systems should be able to send mail using a simple smarthost arrangement, probably with postfix.
This is not a B2G priority.
Updated•13 years ago
|
Assignee: nobody → kmoir
Whiteboard: [puppet]
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #630332 -
Flags: review?(Callek)
Reporter | ||
Comment 2•13 years ago
|
||
I think postfix::atboot was accidentally included in the patch..
Also, the module name implies postfix specifically, but when we install this on windows systems, it won't be postfix - maybe "smarthost" or just "mail"?
Which brings me to a question I should probably know the answer to, since I filed the bug: do we need this on slaves, or just on servers?
Comment 3•13 years ago
|
||
Comment on attachment 630332 [details] [diff] [review]
patch
Review of attachment 630332 [details] [diff] [review]:
-----------------------------------------------------------------
I'm not as hung up over the module name as dustin's comment (I feel if we need/want a generic module name we would be served well by a simple include of postfix in there for linux, then to magically switch linux/windows to use postfix in one case, etc.
Though I do agree with the "we likely don't want/need this everywhere" and is why I set r- here, among my other nits :-)
::: modules/postfix/manifests/atboot.pp
@@ +1,1 @@
> +class postfix::atboot {
Nothing in this patch uses this class, intentional? And actually since postfix::daemon is instantiated directly from init, this would conflict with things as written.
::: modules/postfix/manifests/config.pp
@@ +1,3 @@
> +class postfix::config {
> +
> +#include postfix::params
Were you intending to use some params this way? either way use it or remove the comment.
I suspect using the config magic (the csv's) would be a better way to do so though.
::: modules/postfix/templates/main.cf.erb
@@ +6,5 @@
> +mydomain = <%= domain %>
> +myorigin = $mydomain
> +mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
> +unknown_local_recipient_reject_code = 550
> +relay_domains = smtp.mozilla.org
Even though most of our stuff will use this, I'd suggest/request we just make relay_domains a default value in our .csv from the config module. Though I'm unsure if that suggests we'd need/want other configurables that way.. (I'm also no postfix config-file expert, so I would also ask that you get an rs+ from someone who is better than me for this postfix config itself)
Attachment #630332 -
Flags: review?(bugspam.Callek) → review-
Assignee | ||
Comment 4•13 years ago
|
||
Changed name to smarthost, now only installed on servers, mail relay now loaded from default-config.csv file, superfluous comments and files removed.
Callek, you suggested getting a postfix expert to review, who would you recommend?
Attachment #630332 -
Attachment is obsolete: true
Attachment #631385 -
Flags: review?(bugspam.Callek)
Comment 5•13 years ago
|
||
Comment on attachment 631385 [details] [diff] [review]
patch
Review of attachment 631385 [details] [diff] [review]:
-----------------------------------------------------------------
As I said before I'm not great on postfix stuff, so would be best if we had someone else skim this who is familiar, but imo not a blocker [I read descriptions of the configuration args we used at http://www.postfix.org/postconf.5.html and comments there is strictly based on what I read there, so if you disagree with a comment to that file, *please* don't take my word as authoratative]
I have a few "bikeshed" nits as well, feel free to do as you like with them, they don't affect my acceptance of the patch.
Marking r+ as I feel all notes are trivial, if you feel unsure, re-request
::: modules/smarthost/manifests/config.pp
@@ +1,3 @@
> +class smarthost::config {
> +
> +include ::config
nit: indent
bikeshed nit: if we name this something like smarthost::setup we can avoid the need to |include ::config| with the global namespace, which might confuse people at a glance.
@@ +5,5 @@
> + File {
> + owner => "postfix",
> + group => "postfix",
> + mode => 0644,
> + }
I was just looking for the doc I wanted on puppetlabs but I can't find it. Short answer is doing this |File { ... }| for defaults like this can bite us hard. Please use explicit values where you need this.
::: modules/smarthost/templates/main.cf.erb
@@ +1,5 @@
> +soft_bounce = no
> +command_directory = /usr/sbin
> +daemon_directory = /usr/libexec/postfix
> +mail_owner = postfix
> +myhostname = <%= hostname %>
Should we use fqdn here instead?
@@ +5,5 @@
> +myhostname = <%= hostname %>
> +mydomain = <%= domain %>
> +myorigin = $mydomain
> +mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
> +unknown_local_recipient_reject_code = 550
just a general note, per docs: "The default setting is 550 (reject mail) but it is safer to initially use 450 (try again later) so you have time to find out if your local_recipient_maps settings are OK. "
::: modules/toplevel/manifests/server.pp
@@ +3,5 @@
>
> class toplevel::server inherits toplevel::base {
> include puppet::periodic
> include ntp::daemon
> + include smarthost
bikeshed nit: I'm not a fan of the `smarthost` module name, but I don't have a better suggestion. So I'd go with this unless you come up with something, we can always change it later.
Attachment #631385 -
Flags: review?(bugspam.Callek) → review+
Assignee | ||
Comment 6•13 years ago
|
||
Renamed config to setup to avoid confusion, fixed indenting, I think the domain is fine instead of fqdn. I'm not a fan of the name smarthost either yet can't think of a better name :-)
Not sure what you mean by "Short answer is doing this |File { ... }| for defaults like this can bite us hard. Please use explicit values where you need this."
Attachment #631385 -
Attachment is obsolete: true
Attachment #632234 -
Flags: review?(bugspam.Callek)
Assignee | ||
Comment 7•13 years ago
|
||
changed the setting of the permissions on /etc/postfix/main.cf to be safer :-) Thanks Callek for the suggestion.
Attachment #632234 -
Attachment is obsolete: true
Attachment #632234 -
Flags: review?(bugspam.Callek)
Assignee | ||
Updated•13 years ago
|
Attachment #632339 -
Flags: review?(bugspam.Callek)
Comment 8•13 years ago
|
||
Comment on attachment 632339 [details] [diff] [review]
patch
>+class smarthost::setup {
>+
>+ include config
>+
>+ file { "/etc/postfix/main.cf":
nit: inconsistent indent width. I'm not picky which one you choose.
Attachment #632339 -
Flags: review?(bugspam.Callek) → review+
Assignee | ||
Updated•13 years ago
|
Attachment #632339 -
Flags: checked-in+
Assignee | ||
Comment 10•13 years ago
|
||
I should have mentioned that there isn't any Darwin configuration for postfix because at this time we're just installing it on the servers.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Product: mozilla.org → Release Engineering
Updated•7 years ago
|
Component: Platform Support → Buildduty
Product: Release Engineering → Infrastructure & Operations
Updated•6 years ago
|
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•