procmail
[Top] [All Lists]

Re: ^M in .procmailrc file

2000-07-19 14:53:44
On Wed, Jul 19, 2000 at 04:10:58PM -0500, Glen Lee Edwards wrote:
The problem is that my users are using Windows to modify the .procmailrc
file, and then uploading the modified file to $HOME.  It there any way on
their end to have the \r deleted, or do I have to periodically go through
all the .procmailrc files on my system and remove them?

Thanks,

Glen

On Wed, 19 Jul 2000, Charles Curley wrote:

On Wed, Jul 19, 2000 at 12:49:52AM -0500, Glen Lee Edwards wrote:
I'm getting the following error message in /var/log/sendmaillog.

Jul 19 01:39:03 glen procmail[20805]: Error while writing to
"/home/matt^M/.procmaillog^M"

The lines in question (I think) read such:

PATH=/bin:/usr/bin:/usr/sbin
MAILDIR=$HOME/mail
PMDIR=$HOME
LOGFILE=$PMDIR/.procmaillog
 
I don't have a clue where the extra "^M"s are coming from.  I've rewritten
the above lines using emacs, but the "^M"s still keep showin up.

emacs may be part of your problem. It is smart enough to detect files that
have alien line endings and display them correctly anyway. For example, it
will correctly display a Mess-DOS batch file on Unix. It will, however,
note the origin of the file in the left end of the mode line. There are
tools within emacs to convert line endings; you get to read the manual to
find them.





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


That depends greatly on your setup and how your users access their
.procmailrc files.

If they use FTP, have them set it to ASCII prior to transferring in
either direction.

If they use NT Emacs, have them use it to edit the files, and NT Emacs
will handle the line endings transparently. If you don't use SAMBA, check
out ange-ftp under Emacs.

If they can execute programs on the Unix server, using telnet or some
such, have them edit it on the server using Pico or emacs -nw (-nw to run
it in the telnet shell).

If you are using SAMBA to let them edit their files, you may have to find
utilities to do this.

I've seen sed one-liners for this as well, but the users have to remember
to run it after each edit session. Or else get a sed one-liner, and add it
to the user's .bash_logout, if you are letting them log in.

Of course, the preferred solution is to have them use a real operating
system like Linux.


-- 

                -- C^2

No windows were crashed in the making of this email.

Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley

Attachment: pgpVSUoj9Dorh.pgp
Description: PGP signature

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