procmail
[Top] [All Lists]

Re: Procmail won't use existing mailbox

2001-12-30 14:54:11
Luke Holton wrote,

| I've just got procmail up and running except for one problem. When I
| set up a receipt to save mail to an existing mailbox it will instead
| create a new mailbox with a '?' appended the name and save the mail there
| instead. I can't find anything in the docs I have that addresses this.
| Does anyone know what the problem is and what I can do to get it to save
| to the target mailbox??

You didn't include any of your recipes, but I have a guess: you're editing
your .procmailrc on a DOS (or Windows over DOS) machine, where the
ends-of-line are CR+LF, or you're using an editor program that writes
DOS-style ends-of-line, or your editor program sees the DOS-style
ends-of-line already in the file and goes into a mode where it writes all
ends-of-line that way; then you are running procmail on a Unix or Linux
machine, where the ends-of-line are just LF.  So every time you name a
folder as a destination in your .procmailrc, there's a carriage return
between its name and the linefeed at the end of the line.  If you already
have a folder named, say, mashnotes, and your recipe is like this:

 :0:<CR>
 * condition<CR>
 mashnotes<CR>

and somehow a message matches the condition despite the extra CR on the end
of it, procmail creates a local lockfile whose name is a single carriage
return (you were expecting it to be mashnotes.lock) and saves the message to
a new folder named mashnotes<CR> instead of the existing one named
mashnotes.  When you list the files in your folder directory, control
characters in filenames are displayed as question marks.

Solution: get those carriage returns out of your rcfile.  Either use an
editing setup that lets you do that, or run your rcfile through  tr -d \\15
now and after every future edit.



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>