Skip to content

Archive Trac emailserver

madscatt edited this page Jun 20, 2026 · 1 revision

Emailserver

Legacy Trac archive page imported from emailserver. Source: https://genapp.rocks/wiki/wiki/emailserver. Review age, links, and examples before treating as current.

Setting up an email server

  • an email server is needed to support email in genapp html5 instances.
  • you can set it up yourself or use an existing smtp server.
  • you will need to add email addresses specific to each app's appconfig.json.
  • if you have an available smtp server, you can configure it directly in appconfig.json under the "smtp" tag
    • N.B. just leave off the smtp tag if sendmail is working on your host server

installing postfix

  • we generally use postfix for a mail server on web servers
    • Ubuntu : {{{ $ sudo apt-get -y install postfix }}}
    • CentOS/RedHat : {{{ $ sudo yum -y install postfix }}}
  • then we edit /etc/postfix/main.cf to allow only the local server to send email
inet_interfaces = loopback-only
  • then {{{ $ sudo service postfix restart }}}

testing email

  • to make sure email is working
$ cd /opt/genapp/genapptest/output/html5/util
$ php test_mail.php <redacted-email>
  • a good result will look something like
from /opt/genapp/genapptest/appconfig.json:
stdClass Object
(
    [admin] => <redacted-email>,<redacted-email>
    [feedback] => feedback@some-google-group-or-whatever, <redacted-email>
    [from] => 149.165.169.58
)
test message to <redacted-email> using sendmail
send looks ok, now check the mail for <redacted-email> to make sure it went through

Clone this wiki locally