LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-12-2006, 05:02 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 490

Rep: Reputation: 30
About dnl


Friends ,

I am using the following line in sendmail.mc

dnl DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl

I know the "dnl" option is used to delete or uncomment a line , but
I don't understand why the "dnl" is used in both places "first"
and "last" . And what is the meaning of it ?

Plz inform me .. ..
 
Old 12-13-2006, 02:35 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 6,728

Rep: Reputation: 4099Reputation: 4099Reputation: 4099Reputation: 4099Reputation: 4099Reputation: 4099Reputation: 4099Reputation: 4099Reputation: 4099Reputation: 4099Reputation: 4099
Indeed: "dnl" is used to indicate to the m4 parser that the rest of that line (up to the newline) is meant as a comment and therefore that text will not appear in the output (which in this case would be your sendmail.cf file)
The use of "dnl" at the end of a line is typically in combination with a macro definition. Here, the "dnl" right after the macro definition causes the m4 parser not to add an additional newline character to the output (i.e. an unwanted empty line).
So, in your example:
Code:
dnl DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
The "dnl" at the beginning is meant for you, the admin. If you remove that "dnl" the rest of the line:
Code:
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
will be parsed by m4 to produce the correct output (without that unwanted extra newline).
So, the "dnl" at the end has no relation to the "dnl" at the beginning. It is not even really needed, but it will produce less empty lines in the output.

Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration