Merge lp:~sakuag333/mailman/my-branch into lp:mailman

Proposed by Sandesh Kumar Agrawal
Status: Merged
Merged at revision: 7202
Proposed branch: lp:~sakuag333/mailman/my-branch
Merge into: lp:mailman
Diff against target: 39 lines (+14/-6)
1 file modified
src/mailman/core/switchboard.py (+14/-6)
To merge this branch: bzr merge lp:~sakuag333/mailman/my-branch
Reviewer Review Type Date Requested Status
Barry Warsaw Pending
Review via email: mp+142628@code.launchpad.net

Description of the change

in mailman.app.config , there is function _expand_paths(self) which contains :

queue_dir = category.queue_dir

this results in queue_dir to get added to self.path

and thus when ensure_directories_exist() is being called in config.py , it make the directory var/queue

removing "queue_dir = category.queue_dir " will not allow the directory to be created.
So i commented out this option and thus var/queue is never created.

To post a comment you must log in.
lp:~sakuag333/mailman/my-branch updated
7201. By Sandesh Kumar Agrawal <sandesh@sandesh-laptop>

non-queue runner should not create var/tmp/* directory

7202. By Sandesh Kumar Agrawal <sandesh@sandesh-laptop>

Fixed formation of /var/queue/* for non-queue runners

7203. By Sandesh Kumar Agrawal <sandesh@sandesh-laptop>

Final changes to non-queue runner bug

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/mailman/core/switchboard.py'
2--- src/mailman/core/switchboard.py 2013-01-01 14:05:42 +0000
3+++ src/mailman/core/switchboard.py 2013-01-11 11:22:21 +0000
4@@ -90,9 +90,17 @@
5 'Not a power of 2: {0}'.format(numslices))
6 self.name = name
7 self.queue_directory = queue_directory
8+ self.non_queue_runner={'lmtp','rest'}
9 # If configured to, create the directory if it doesn't yet exist.
10 if config.create_paths:
11- makedirs(self.queue_directory, 0770)
12+ for directory in self.queue_directory.split():
13+ is_non_queue_runner=False
14+ for queue in self.non_queue_runner:
15+ if queue in directory:
16+ is_non_queue_runner=True
17+ break
18+ if not(is_non_queue_runner):
19+ makedirs(directory,0770)
20 # Fast track for no slices
21 self._lower = None
22 self._upper = None
23@@ -143,11 +151,11 @@
24 data['_parsemsg'] = (protocol == 0)
25 # Write to the pickle file the message object and metadata.
26 with open(tmpfile, 'w') as fp:
27- fp.write(msgsave)
28- cPickle.dump(data, fp, protocol)
29- fp.flush()
30- os.fsync(fp.fileno())
31- os.rename(tmpfile, filename)
32+ fp.write(msgsave)
33+ cPickle.dump(data, fp, protocol)
34+ fp.flush()
35+ os.fsync(fp.fileno())
36+ os.rename(tmpfile, filename)
37 return filebase
38
39 def dequeue(self, filebase):