Results 1 to 3 of 3

Thread: Sendmail with Ubuntu Server

  1. #1
    Join Date
    Jan 2010
    Ubuntu 12.04 Precise Pangolin

    Sendmail with Ubuntu Server

    I am trying to create a mail routing solution for some services on my network.

    Basically I have a program that sends reports emails to an external client computer in a different city and on an unrelated network. I believe I need to use sendmail and use it as a relay in order for this to work. Do I need SMTP information for a route out before I can make this happen?

    I dont want the work done for me here but just to point me in the right direction would help.
    Try not to be a man of success but be a man of value
    Ubuntu Server setup guide
    setting up a DNS Server on Ubuntu

  2. #2
    Join Date
    Nov 2008
    Metro Boston
    Kubuntu 18.04 Bionic Beaver

    Re: Sendmail with Ubuntu Server

    If you are asking about the original sendmail, and not a clone like Postfix, then you can handle routings using a "mailertable". It ignores MX lookups and sends messages directly to specified servers based on host or domain names.

    For instance, let's suppose you process mail for two subdomains in, and, both of which have local mail servers at and respectively. Then in /etc/mail/mailertable you would have:

    Code:     relay:[]   relay:[]
    (When using bare IP addresses for relaying they need to be enclosed in squared brackets.)

    Mail addressed simply to "" or to any other subdomain of would still be handled locally.
    Last edited by SeijiSensei; October 26th, 2013 at 05:19 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Mar 2010
    Lubuntu 14.04 Trusty Tahr

    Re: Sendmail with Ubuntu Server

    postfix with transport entries can solve this.
    OTOH, if things are on your internal network, then just configure each end-node as a satellite and relay everything to your real-email server to be forwarded wherever it needs to go. I've got 20+ servers setup this way here. logwatch outputs daily emails on the system status. All those emails are forwarded (relayed) to my real email account on the main email server for easy filtering. It will also send email to normal internet servers this way - provided those machines accept email from my server. The MX is only needed if there is a question about the target email server to receive the emails. If you know it, the transport map will handle that for you. If postfix is already installed, then man transport will explain.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts