Transactional email sending from intranet environment

  • Published : April 30, 2024
  • Last Updated : May 7, 2024
  • 28 Views
  • 4 Min Read

An intranet is a private network that connects members of closed groups, such as workplaces, educational institutions, and government agencies. Members within the intranet environment will be able to view, share, and communicate data amongst themselves without any interference from outside.

Intranet infrastructure

An intranet infrastructure comprises the following components:

Hardware: Hardware includes all of the physical components connected in the intranet environment. This would include computers in the network, servers that store and relay information, network switches that connect the hardware components, and wires and cables that run between the components.

Network setup: The network setup consists of several sub-networks for different purposes. There will be networks dedicated to handling emails sent within the intranet environment or a dedicated network to handle all of the files and applications that users will access. All of the networks communicate with each other using standard network protocols like TCP/IP.

Software: Software outlines the rules based on which the hardware devices interact with each other. Some of the key software components in an intranet environment include operating systems, server software, web servers, and content management systems that help build content for webpages.

Security systems: The next component in an intranet environment is the security measures that ensure only authorized personnel access the intranet system. This includes user authentication, data encryptions, and firewalls to monitor the network activities.

The intranet infrastructure is similar to the internet in the sense that they use the same protocols (TCP/IP) to connect the host with users. Similarly, both the intranet and the internet use webpages built with HTML and CSS.

Sending an email from an intranet to an external server involves the addition of some extra parameters.

Transactional email sending to external clients

Sending emails from an intranet environment to external servers can be done using one of the following methods:

  1. The emails can be relayed either through an external MTA server within the intranet system.

  2. Alter the firewall settings to access a particular IP (transactional ESP here) in the internet.

Relay emails through a MTA server

A Mail Transfer Agent (MTA) is a service used to send and receive emails between servers. MTAs are used when the sender cannot directly contact the recipient server. Some of the popular MTAs include:

  1. Postfix

  2. Exim

  3. Sendmail

  4. Mail-in-a-box

  5. MailerQ

You can configure a MTA to send emails using a third-party email service provider (ESP). Let’s see how you can configure Postfix to send transactional emails using ZeptoMail.

  1. Install Postfix in your intranet's mail server. Configure Postfix to act as the SMTP relay service.

  2. Next, find Postfix's configuration file, typically located at:
    /etc/postfix/main.cf   to relay the outgoing emails via the ESP's servers.

  3. You should mention the ESP's SMTP server details—the address, port number, and authentication credentials. Copy and paste the following code into your Postfix file:

    
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options = noanonymous
    smtp_sasl_tls_security_options = noanonymous
    smtp_tls_security_level = encrypt
    header_size_limit = 4096000
    relayhost= [smtp.zeptomail.com]:587
    
        

     

  4. Next, you should create an authentication credentials file that will help Postfix authenticate its identity with the SMTP server. This file is located at:  /etc/postfix/sasl_passwd  .

  5. Once you access the "sasl_passwd" file, enter the following authentication credentials:

    
    [smtp.zeptomail.com]:587 :

     

  6. The API key will be the user name found in the SMTP tab in the setup info section of your ZeptoMail account. Copy and paste the password from the SMTP tab.

  7. You can ensure an additional layer of security by restricting access to the "sasl_passwd" file. Doing this allows you to give read and write access only to the Postfix owner and no one else.

  8. You can hash the "sasl_passwd" file to jumble the password.

  9. Reload the file to save the configuration.

  10. Point the outgoing email channels within the intranet to Postfix to send out emails.

  11. Send a test email to check the configurations.

    
    sendmail recipient@mail.com
    From:test@zep.emailsandbox.in
    Subject: Test subject
    Test content
    
        

     

Alter firewall settings

Firewalls in an intranet environment monitor the outgoing and incoming traffic and enforce access control policies. Firewalls perform access control by enforcing predefined rules on the incoming and outgoing data. These rules define which data is allowed to pass based on conditions like IP address and protocols. You can modify the firewall rules to allow traffic to specific IPs and reject everything else.

You can enforce this by sending emails via ZeptoMail's SMTP server. This way, only the emails connecting to ZeptoMail will be allowed to pass and everything else will be rejected.

Wrapping up

These are two methods using which you can send out transactional emails from an intranet environment. Since transactional emails are important and carry crucial information, you should ensure proper security protocols are in place. Measures like SPF, DKIM and DMARC help you protect your email-sending domain. In addition to this, following clean mailing practices also aid with great deliverability. 

Leave a Reply

Your email address will not be published. Required fields are marked

By submitting this form, you agree to the processing of personal data according to our Privacy Policy.

You may also like