Automate the installation of postfix on Ubuntu

You can use pre-seeding for this, using the debconf-set-selections command to pre-answer the questions asked by debconf before installing the package. For example: debconf-set-selections <<< “postfix postfix/mailname string your.hostname.com” debconf-set-selections <<< “postfix postfix/main_mailer_type string ‘Internet Site'” apt-get install –assume-yes postfix