Please add a script to allow filter services to be programatically added to master.cf

Bug #247332 reported by Scott Kitterman
2
Affects Status Importance Assigned to Milestone
postfix (Ubuntu)
Fix Released
Wishlist
LaMont Jones

Bug Description

Binary package hint: postfix

It'd be handy for the postfix package to provide a way to do this so that integration of content filters could be automated.

Changed in postfix:
assignee: nobody → kitterman
importance: Undecided → Wishlist
milestone: none → intrepid-alpha-4
status: New → In Progress
Revision history for this message
Scott Kitterman (kitterman) wrote :

First whack at the script and man page.

Revision history for this message
Scott Kitterman (kitterman) wrote :

23:15] <lamont> 'twould be nice if USAGE were a function, just to have it not evaluate every run - but that's a nit
[23:15] <lamont> and very minor grumbles about you making me update debian/copyright
[23:16] <lamont> could you pretty please pick one of the standard licenses, and name it?
[23:16] <ScottK> OK.
[23:16] * ScottK tries to remember
[23:16] <lamont> I don't care if it's the postfix license, or another non-conflicting one
[23:16] <ScottK> That's MIT license.
[23:17] <lamont> and I think PEP-8 (?) or somewhere wants imports to be one per line
[23:17] <lamont> or such
[23:17] <lamont> OTOH, you're much closer to PEP-8 that most of my stuff before I started paying attention to it under threat of pain
[23:18] <lamont> I also tend to make a function called __main__ or such and just say if __name__ == '__main__': \n __main__()
[23:18] <lamont> which gives me something I can call when I'm playing with python -i and such
[23:19] <ScottK> Right.
[23:19] <ScottK> I looked and PEP-8 says one per line.
[23:20] <lamont> so general feedback would be PEP-8 conformance, the muttering about main() and USAGE, and otherwise a handwavy "looks at least not-unreasonable, if not just plain reasonable, +1"
[23:21] <lamont> and is shutil all the rage these days? /me hasn't ever used it
[23:21] <lamont> while understanding that it may be the new hotness and I'm not. :)
[23:21] <ScottK> OK. The one functional shortcut that it takes that might be an excessive one is it just assumes if the name of the smtpd you want setup appears anywhere in master.cf it's a bad idea.
[23:22] <ScottK> The shutil usage is a result of, "Gee, never had to do that before, let's see what the shiny new edition of Python in a Nutshell has to say about it."
[23:23] <ScottK> Honestly I don't want to go to the effort to make it smart enough to do the case where it has to find out if it's a duplicative service name or something else.
[23:23] <ScottK> Maybe I just add MIT to common-licenses and make it easy.
[23:24] <lamont> anywhere as in anywhere? or anywhere as first token?
[23:25] <ScottK> Anywhere like it parses line by line through your master.cf and if it finds the string you gave as your desired service name it says no thanks.
[23:25] <ScottK> And stops.
[23:25] <ScottK> For a helper script like this I think it's better to bail out in the face of any uncertainty that to try to be to smart about it.
[23:26] <ScottK> The use case I'm thinking about it you don't want to run it twice by accident and end up adding the same service two times in master.cf.

Revision history for this message
Scott Kitterman (kitterman) wrote :

Now fortified with more pep-8 happiness.

Revision history for this message
Scott Kitterman (kitterman) wrote :

And more corrector spelling in the comments.

Revision history for this message
Scott Kitterman (kitterman) wrote :

Added the policy server one too, decided I was too tired for git and made a debdiff against the current Ubuntu package. I did notional debian/changelog entries and debian/copyright changes. I did not do debian/rules changes to install this stufff. I'm leaving that to you.

Revision history for this message
Martin Pitt (pitti) wrote :

This isn't a blocker for alpha-4.

Changed in postfix:
milestone: intrepid-alpha-4 → none
Revision history for this message
Martin Pitt (pitti) wrote :

Sorry, as per https://wiki.ubuntu.com/RCBugTargetting milestones on non-release bugs can be used for personal scheduling.

Changed in postfix:
milestone: none → intrepid-alpha-4
Revision history for this message
Martin Pitt (pitti) wrote :

Too late now, please upload right after alpha4.

Changed in postfix:
milestone: intrepid-alpha-4 → intrepid-alpha-5
LaMont Jones (lamont)
Changed in postfix:
assignee: kitterman → lamont
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package postfix - 2.5.5-1

---------------
postfix (2.5.5-1) unstable; urgency=low

  [Wietse Venema]

  * local file descriptor leak with 2.6 kernels and epoll.

postfix (2.5.4-2) unstable; urgency=low

  [Nicolas Valcárcel]

  * Add ufw integration (from 2.5.4-1ubuntu2)

  [LaMont Jones]

  * mail_params: drop relay_domains from default
    parent_domain_matches_subdomains. LP: #242383

  [Kees Cook]

  * debian/{control,rules}: enable PIE hardening (from 2.5.4-1ubuntu1)

  [Scott Kitterman]

  * Add postfix-add-{filter,policy} scripts for easier integration of
    same. LP: #247332

 -- LaMont Jones <email address hidden> Wed, 03 Sep 2008 15:04:54 +0100

Changed in postfix:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.