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
=== modified file 'src/mailman/core/switchboard.py'
--- src/mailman/core/switchboard.py 2013-01-01 14:05:42 +0000
+++ src/mailman/core/switchboard.py 2013-01-11 11:22:21 +0000
@@ -90,9 +90,17 @@
90 'Not a power of 2: {0}'.format(numslices))90 'Not a power of 2: {0}'.format(numslices))
91 self.name = name91 self.name = name
92 self.queue_directory = queue_directory92 self.queue_directory = queue_directory
93 self.non_queue_runner={'lmtp','rest'}
93 # If configured to, create the directory if it doesn't yet exist.94 # If configured to, create the directory if it doesn't yet exist.
94 if config.create_paths:95 if config.create_paths:
95 makedirs(self.queue_directory, 0770)96 for directory in self.queue_directory.split():
97 is_non_queue_runner=False
98 for queue in self.non_queue_runner:
99 if queue in directory:
100 is_non_queue_runner=True
101 break
102 if not(is_non_queue_runner):
103 makedirs(directory,0770)
96 # Fast track for no slices104 # Fast track for no slices
97 self._lower = None105 self._lower = None
98 self._upper = None106 self._upper = None
@@ -143,11 +151,11 @@
143 data['_parsemsg'] = (protocol == 0)151 data['_parsemsg'] = (protocol == 0)
144 # Write to the pickle file the message object and metadata.152 # Write to the pickle file the message object and metadata.
145 with open(tmpfile, 'w') as fp:153 with open(tmpfile, 'w') as fp:
146 fp.write(msgsave)154 fp.write(msgsave)
147 cPickle.dump(data, fp, protocol)155 cPickle.dump(data, fp, protocol)
148 fp.flush()156 fp.flush()
149 os.fsync(fp.fileno())157 os.fsync(fp.fileno())
150 os.rename(tmpfile, filename)158 os.rename(tmpfile, filename)
151 return filebase159 return filebase
152160
153 def dequeue(self, filebase):161 def dequeue(self, filebase):