[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Procmail, qmail and file locking



David Maslen writes:
 > I'm a bit unsure if it's safe to use procmail with qmail.

qmail only uses flock as a locking mechanism (no dotlocking). If your
procmail binary also uses flock, there should be no problem. Try 'procmail -v'
to check:

Locking strategies:     dotlocking, flock()

 > If I use vm to view the folders created by procmail directly, this process
 > won't occur. I'll be reading a mailbox that could well have something added 
 > to it, and that would be bad I think.

You can use procmail delivery folders as vm incoming folders, eg

procmail delivers to ~/folders/DEBIAN, which vm uses as the incoming folder
for ~/folders/debian. Then you can type g to get new mail, without problems.

Try the code attached below in your .vm file (I don't know who wrote it, so
I can't give the due credit). 

There are other solutions as well: 

create a .qmail-debian file that delivers to a Maildir (not Mailbox), make
procmail forward the mail to <you-debian> and make vm use maildirs. Maildirs
don't require file locking, so you are safe. 

Also, there's a patch to make procmail deliver to maildirs, see www.qmail.org.

HTH,

--
Adriano 


;; Since I use procmail to filter my mail, I like to shove my incoming
;; mail to folders. Due to Emacs (and hence VM) locking, it's not wise
;; to view the incoming spool file, so I make procmail dump mail to
;; folders IN ALL CAPS. Then I have VM make spool files from each one of
;; those, except they'll be in all lower case.

(setq vm-spool-files
      (append
       (list
	(list vm-primary-inbox
	      "~/Mailbox"
	      (concat vm-primary-inbox ".crash")))
       ;; Mailing list inboxes
       ;; I arrange that all my procmail maildrops are in ~/Mail/[A-Z]*
       (mapcar '(lambda (s)
		  "make the appropriate entry for vm-spool-files"
		  (list
		   (concat vm-folder-directory "lists/" s)
		   (concat vm-folder-directory "lists/" (upcase s))
		   (concat vm-folder-directory "lists/" s ".crash")))
	       ;; So I create a vm-spool-files entry for each mail drop
	       (mapcar 'downcase 
		       (directory-files 
			(concat vm-folder-directory "lists/")
			nil "^[A-Z].+")))))


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: