Loading ...
Sorry, an error occurred while loading the content.
 

Error main.cf path, is it just me or is it a bug ?

Expand Messages
  • Gregory BELLIER
    Hi ! I downloaded postfix-2.7.0 and I need to manually build it. The goal is to place everything in a different folder than usual : /opt/postfix To do that at
    Message 1 of 4 , Mar 2, 2010
      Hi !

      I downloaded postfix-2.7.0 and I need to manually build it.
      The goal is to place everything in a different folder than usual :
      /opt/postfix

      To do that at the make install, I set the root_folder at /opt/postfix
      and then at the next questions, the default choice is good for me.

      However, if I run /opt/postfix/usr/sbin/postfix, I get the following error :
      postfix: fatal: open /etc/postfix/main.cf: No such file or directory

      Even though I said everything should be in /opt/postfix, it looks for at
      the wrong place.
      Ok then, no problem, I'll just build in a different way and at the make
      makefiles, I use the option CCARGS='-DDEF_CONFIG_DIR=\"/opt/postfix\"'

      Then, the make install, root_folder = /opt/postfix

      I run /opt/postfix/user/sbin and then I have the error :
      postfix: fatal: open /opt/postfix/etc/postfix/main.cf: No such file or
      directory

      Indeed, because now the real path is
      /opt/postfix/opt/postfix/etc/postfix/... (there are 2 /opt/postfix)

      Did I do something wrong or is there a problem ?

      It seems there is a little mix up between DEF_CONFIG_DIR and the
      root_folder.
      ./postfix looks for at $DEF_CONFIG_DIR
      whereas the make install put the file at $root_folder/$DEF_CONFIG_DIR

      and I can't change the root_folder because then the other files would
      not be at the right place.
      I could use a symbolic link but in my opinion it would be a hack.

      Thanks in advance for your help.

      Regards,
      Grégory BELLIER.
    • Stan Hoeppner
      ... http://www.postfix.org/INSTALL.html 4.4 - Overriding built-in parameter default settings All Postfix configuration parameters can be changed by
      Message 2 of 4 , Mar 2, 2010
        Gregory BELLIER put forth on 3/2/2010 6:03 AM:
        > Hi !
        >
        > I downloaded postfix-2.7.0 and I need to manually build it.
        > The goal is to place everything in a different folder than usual :
        > /opt/postfix

        <snip>

        http://www.postfix.org/INSTALL.html

        4.4 - Overriding built-in parameter default settings

        All Postfix configuration parameters can be changed by editing a Postfix
        configuration file, except for one: the parameter that specifies the
        location of Postfix configuration files. In order to build Postfix with a
        configuration directory other than /etc/postfix, use:

        % make makefiles CCARGS='-DDEF_CONFIG_DIR=\"/some/where\"'
        % make

        IMPORTANT: Be sure to get the quotes right. These details matter a lot.

        (Found the answer in less than 60 seconds with Google--1st hit, first sub
        entry, searching for "/etc/postfix hard coded")

        --
        Stan
      • Gregory BELLIER
        ... I guess you did not read my email entirely because I mentioned this option. However, thanks for the reply. Stan Hoeppner a crit : Gregory BELLIER put forth
        Message 3 of 4 , Mar 2, 2010


          Stan Hoeppner a écrit :
          Gregory BELLIER put forth on 3/2/2010 6:03 AM:
            
          Hi !
          
          I downloaded postfix-2.7.0 and I need to manually build it.
          The goal is to place everything in a different folder than usual :
          /opt/postfix
              
          <snip>
          
          http://www.postfix.org/INSTALL.html
          
          4.4 - Overriding built-in parameter default settings
          
          All Postfix configuration parameters can be changed by editing a Postfix
          configuration file, except for one: the parameter that specifies the
          location of Postfix configuration files. In order to build Postfix with a
          configuration directory other than /etc/postfix, use:
          
              % make makefiles CCARGS='-DDEF_CONFIG_DIR=\"/some/where\"'
              % make
          
          IMPORTANT: Be sure to get the quotes right. These details matter a lot.
          
          (Found the answer in less than 60 seconds with Google--1st hit, first sub
          entry, searching for "/etc/postfix hard coded")
          I guess you did not read my email entirely because I mentioned this option.
          However, thanks for the reply.
        • Wietse Venema
          ... When the make install procedure says: Please specify the prefix for installed file names. Specify this ONLY if you are building ready-to-install packages
          Message 4 of 4 , Mar 2, 2010
            Gregory BELLIER:
            > Ok then, no problem, I'll just build in a different way and at the make
            > makefiles, I use the option CCARGS='-DDEF_CONFIG_DIR=\"/opt/postfix\"'
            >
            > Then, the make install, root_folder = /opt/postfix

            When the "make install" procedure says:

            Please specify the prefix for installed file names. Specify
            this ONLY if you are building ready-to-install packages for
            distribution to other machines.

            install_root: [/]

            What did you not understand of the word ONLY?

            Wietse
          Your message has been successfully submitted and would be delivered to recipients shortly.