• PRODUCT

    PRODUCT

  • PRICING
    PRICING

  • HELP
    HELP

  • BLOG
    BLOG

  • APPSTORE
    APPSTORE

  • COMPANY
    COMPANY

  • LEGAL
    LEGAL

  • LOGIN
    LOGIN

  • Configuring an email reception service as SMTP in the IzyCloud Grid


  • In the IzyCloud architecture SMTP is an optional component: Emails can be 'recieved' and generated also via APIs, IzyCloud apps (webforms, mobile apps, etc.) and thirdparty actions such as HTTP hooks and CRM sync. In this article we will describe how to add SMTP to your IzyCloud grid.


  • For a general overview of feeding email data to the IzyCloud AI cloud and artifical intelligence engine see email-pipeline-with-izycloud.

    Notice that this article does not address setting up a the Reception, Storage and Browse (which IMAP and POP3 are part of), Indexing and Machine Learning Services the the pipeline. Also notice that the data encryption happens in the storage service and layer.

    Izyware AMI for SMTP

    You can use the Izyware AMI (Machine Image) inside your autoscaling group for building a large SMTP grid. All the configuration may be done from the IzyCloud dahsboard.

    DNS MX records for the IzyCloud emails

    To route the data through the IzyCloud gateway, use the following MX records for your DNS:

    0 mx.izyware.com

    10 mx10.izyware.com

    Note on legacy customers

    we recommend that you upgrade to the newer version for the following reasons:
    • no need to use sendmail + perl database hook to generate the payloads
    • no need to restart for new domains

    Setup

    The main configuration for sendmail is called sendmail.mc which will be built below:

    yum install sendmail-cf;

    The Lambda function hook
    You can create the Lambda function in any language you like. In this setup we will use perl:
    • Get the path to perl by:

    which perl

    • you would need to add symlinks to the /etc/smrsh/ , otherwise you would get 'Service unavailable'.

    ln -s /your_path/maildump.pl /etc/smrsh/maildump.pl

    ln -s /usr/bin/perl /etc/smrsh/perl
    • Make sure that the Lambda function will return exit code 0, ptherwise you would get 'unknown mailer' error.
    • Add a reference to /etc/aliases and inform the system that mail that gets delivered to the user needs to get piped to your lambda function, i.e.:

    yourlocaluseralias: "| perl /your_path/maildump.pl"

    You can also dump the mail to another user:

    yourlocaluseralias: root

    • Finally rebuild the mail aliases database from /etc/aliases:

    cd /etc/mail/;chmod 644 /etc/aliases; newaliases;

    Rebuild sendmail.mc

    m4 sendmail.mc > sendmail.cf;

    chmod 755 /etc/mail;

    referencing the domain
    /etc/mail/local-host-names is the file that will define aliases for your machine, so add the domain to the file.

    /etc/mail/virtusertable will define the username the the incoming email to the domain will be mapped to, so add a line for your domain, and reference the yourlocaluseralias that was added to the aliases file i.e.:

    @mydomain.com yourlocaluseralias

    You should then build the virtusertable.db database by:

    makemap hash virtusertable.db < virtusertable;

    Restart Sendmail

    /sbin/service sendmail restart; > /var/log/maillog; echo OK;tail /var/log/maillog

    email-pipeline-with-izycloud: https://izyware.com/blog/article/how-to-build-an-customized-and-automated-email-pipeline-with-izycloud


  • Izyware Blog
    Izyware Blog