Description of problem: The sendmail.mc file (below) creates an invalid sendmail.cf file when run through m4. The .cf file has approx 23 blank lines between line 68 and 90; starting sendmail with such a file gives an error: Starting sendmail: 554 5.0.0 /etc/mail/sendmail.cf: line 68: unknown configuration line " " Deleting the extra blank lines permits sendmail to start. I've been over and over the .mc file but can't find anything that would account for this. Version-Release number of selected component (if applicable): m4-1.4.1-14 How reproducible: Every Time Steps to Reproduce: 1. Save the above text of the sendmail.mc file to disk 2. From command line, run 'm4 [filename.mc] > [filename.cf] 3. open the resulting .cf file and observe extra blank lines starting at line 68. 4. For extra credit, use above-created cf file as sendmail.cf, restart sendmail. Actual results: I receive a .cf file with 23 extra blank lines starting at line 68. Expected results: I should have received a .cf file without those extra lines. Additional info:
Created attachment 98305 [details] sendmail.mc file
Created attachment 98306 [details] First 100 or so lines of faulty sendmail.cf created by m4
Created attachment 98307 [details] Diff to original .mc file This is NOT a bug. Your editor (or you) mangle the lines somehow. [kajtzu@jill ~/a]% cp original.mc new.mc [kajtzu@jill ~/a]% patch -p0 < workingmc.diff patching file new.mc [kajtzu@jill ~/a]% m4 new.mc > sendmail.cf [78 kajtzu@jill ~/a]% /usr/sbin/sendmail -C./sendmail.cf ./sendmail.cf: line 170: fileclass: cannot open '/etc/mail/generics-domains': No such file or directory (the error is normal as I don't use a generics-domains file but the new sendmailcf specified it)
Created attachment 98308 [details] File as it sits on the machine Previous example was translated through a Windows machine. This version is as it sits on the Fedora box. When I attempt to apply the patch as suggested in the previous message, I get the following output: root@davinci root]# patch -p0 < workingmc.diff patching file new.mc Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] y Hunk #1 FAILED at 13. Hunk #2 FAILED at 37. Hunk #3 FAILED at 65. Hunk #4 FAILED at 88. 4 out of 4 hunks FAILED -- saving rejects to file new.mc.rej I am using vi as an editor at the command-line. Can you give me any more details as to how I (or vi) might be mangling these lines?
...The thrust of the original problem, which I lost before entering the original entry: If my input .mc file is mangling the lines somehow, why does m4 continue and output what would seem to be a valid file for use? Why doesn't it error out, as the output is not valid?
I am sorry, but this is the way m4 works. Closing as wontfix.
Uh, *what* is the way that m4 works? Just adding random lines? What is it that's actually causing the problem? If m4 can be expected to produce this output every time, there must be something in the input which is doing it - what is it?