Results 1 to 3 of 3

Thread: Sendmail with Ubuntu Server

  1. #1
    Join Date
    Jan 2010
    Location
    Germany
    Beans
    165
    Distro
    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
    USE FUL LINKS
    Ubuntu Server setup guide
    setting up a DNS Server on Ubuntu

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,840
    Distro
    Kubuntu 14.04 Trusty Tahr

    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 example.com, hr.example.com and mktg.example.com, both of which have local mail servers at 10.10.10.10 and 10.10.10.11 respectively. Then in /etc/mail/mailertable you would have:

    Code:
    hr.example.com     relay:[10.10.10.10]
    mktg.example.com   relay:[10.10.10.11]
    (When using bare IP addresses for relaying they need to be enclosed in squared brackets.)

    Mail addressed simply to "example.com" or to any other subdomain of example.com would still be handled locally.
    Last edited by SeijiSensei; October 26th, 2013 at 05:19 PM.
    If you ask for help, 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
    Location
    Metro-ATL
    Beans
    Hidden!
    Distro
    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.

Bookmarks

Posting Permissions

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