>не пойму в чем проблема
>существующий файл в /etc/mail/sendmail.cf размером 57k и с кучей инфы, а файл
>настройки который я пытаюсь создать с помощью m4 занимает около полубайт.
>
>последовательность действий:
>пишу файл sendmail.mc - занимает около полубайт
>m4 sendmail.mc > sendmail.cf
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- где про такое вычитал? ;)
оно разумеется можно и так, но после телодвижений с filename.mc
и включением туда соответствующего INCLUDE.
>создает файл sendmail.cf чуть меньше sendmail.mc, причем содержимое примерно аналогично .cf файлу...
>
>в чем проблема? помогите плз.
проблема в нежелании читать документацию которая идет с sources sendmail
общий формат для пропуска через препроцессор:
+--------------------------+
| INTRODUCTION AND EXAMPLE |
+--------------------------+
Configuration files are contained in the subdirectory "cf", with a
suffix ".mc". They must be run through "m4" to produce a ".cf" file.
You must pre-load "cf.m4":
m4 ${CFDIR}/m4/cf.m4 config.mc > config.cf
Alternatively, you can simply:
cd ${CFDIR}/cf
./Build config.cf
where ${CFDIR} is the root of the cf directory and config.mc is the
name of your configuration file. If you are running a version of M4
that understands the __file__ builtin (versions of GNU m4 >= 0.75 do
this, but the versions distributed with 4.4BSD and derivatives do not)
or the -I flag (ditto), then ${CFDIR} can be in an arbitrary directory.
For "traditional" versions, ${CFDIR} ***MUST*** be "..", or you MUST
use -D_CF_DIR_=/path/to/cf/dir/ -- note the trailing slash! For example:
m4 -D_CF_DIR_=${CFDIR}/ ${CFDIR}/m4/cf.m4 config.mc > config.cf
взято из sendmail_sources/cf/README