Sendmail Setup for Linux



Similar documents
Workflow Configuration on R12/R11. High Level Steps. SENDMAIL configuration mostly done by System Administrator Workflow configuration for R12

Sending MIME Messages in LISTSERV DISTRIBUTE Jobs

Linux Network Administration

Journaling Guide for Archive for Exchange 2007

Basic Exchange Setup Guide

Using Red Hat Enterprise Linux with Georgia Tech's RHN Satellite Server Installing Red Hat Enterprise Linux

Creating a User Profile for Outlook 2013

Versions Addressed: Microsoft Office Outlook 2010/2013. Document Updated: Copyright 2014 Smarsh, Inc. All right reserved

Amman Jordan Mob: Tel:

Linux Mail Queue mini HOWTO

Send TLM. Table of contents

NODE4 SERVICE DESK SYSTEM

Copyright 2013 GE Multilin Inc. All rights reserved. CyberSentry SEM software revision CyberSentry, Digital Energy, Multilin, and GE Multilin

Lab - Observing DNS Resolution

WaveWare Technologies, Inc. We Deliver Information at the Speed of Light

IP Office IP Office Mode Mailbox User Guide

Configure Managed File Transfer Endpoints

IP Office 8.1 Using Voic Pro in Intuity Mode

Implementing Microsoft Exchange Mail on Demand

White Paper. Fabasoft on Linux Cluster Support. Fabasoft Folio 2015 Update Rollup 2

ReadyNAS Duo Setup Manual

Internet Technology 2/13/2013

Escalation Server Documentation For Tele-Support HelpDesk Rev 5/29/2001

Using Encrypted File Systems with Caché 5.0

Getting Started with RES Automation Manager Agent for Linux

. Introduction. Set Up Sumac To Send

Installation Guide Supplement

ReadyNAS Setup Manual

RSA Two Factor Authentication

VERSION NINE. Be A Better Auditor. You Have The Knowledge. We Have The Tools. INSTALLATION GUIDE

Enterprise Vault 6.0. SMTP Archiving

Product Guide Revision A. McAfee Secure Web Mail Client Software

How to Perform a Manual High Availability Failover

A Transend Corporation White Paper Preparing Microsoft Exchange Server for Migration

Create! Upgrade Notes

Integrated Citrix Servers

Altiris Monitor Pack for Servers 7.1 SP2 from Symantec Release Notes

Creating an ESS instance on the Amazon Cloud

B a r r a c u d a M e s s a g e A r c h i v e r O u t l o o k A d d - I n U s e r G u i d e. V e r si on 3. 0

IP Office Release 7.0 IP Office Embedded Voic User Guide

Parallels. for your Linux or Windows Server. Small Business Panel. Getting Started Guide. Parallels Small Business Panel // Linux & Windows Server

Clearswift SECURE Exchange Gateway Installation & Setup Guide. Version 1.0

Running a Default Vulnerability Scan SAINTcorporation.com

Azure Multi-Factor Authentication. KEMP LoadMaster and Azure Multi- Factor Authentication. Technical Note

Intel Storage System SSR212CC Enclosure Management Software Installation Guide For Red Hat* Enterprise Linux

Class Objectives. Introduction. Intermediate Outlook Features. Setting up Outlook

HP OpenView Patch Manager Using Radia

IP Office Embedded Voic User Guide (IP Office Mode)

JobScheduler Installation by Copying

Getting Started With Your Virtual Dedicated Server. Getting Started Guide

Quick Start Guide. Your New Account

Product Guide Revision A. McAfee Secure Web Mail Client Software

Installing Booked scheduler on CentOS 6.5

This guide consists of the following two chapters and an appendix. Chapter 1 Installing ETERNUSmgr This chapter describes how to install ETERNUSmgr.

IP Office Embedded Voic Mailbox User Guide

Installation Guide for Microsoft SQL Server 2008 R2 Express. October 2011 (GUIDE 1)

Running a Default Vulnerability Scan

sendmail Cookbook Craig Hunt O'REILLY' Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo

What is SOAP MTOM? How it works?

Configuring MDaemon for Centralized Spam Blocking and Filtering

Windows XP Virtual Private Network Connection Setup Instructions

Installing Moodle for Windows with Easy PHP Illustrated Install Guide By Floyd Collins

8.7. Resource Kit User Guide

Integrating Fax Sending Services

Connection Broker The Leader in Managing Hosted Desktop Infrastructures and Virtual Desktop Infrastructures (HDI and VDI) DNS Setup Guide

Setup Cisco Call Manager on VMware

SendMIME Pro Installation & Users Guide

Parallels Plesk Panel 9.2

Using Microsoft Windows Authentication for Microsoft SQL Server Connections in Data Archive

ConnectMail Mobile Configuration

IP Office 3.0 Intuity Emulation Mode Mailbox Users Guide

Sage HRMS 2012 Sage Employee Self Service. Technical Installation Guide for Windows Server 2003 and Windows Server 2008

Lab - Observing DNS Resolution

Plesk for Windows Copyright Notice

Web Service for Observer. Installation Manual. Part No Revision A

Flowlink Pro Server Software Installation Guide

RSA Two Factor Authentication. Feature Description

READYNAS INSTANT STORAGE. Quick Installation Guide

Setting Up on Your Palm. Treo 700wx Smartphone

Converting Prospects to Purchasers.

Elixir Schedule Designer User Manual

Installing F-Secure Anti-Virus (FSAV) Table of Contents. FSAV 8.x and FSLS 7.x End of Life. FSAV 9.x and FSLS 9.x End of Life

Basic Exchange Setup Guide

PolyServe Understudy QuickStart Guide

DOCUMENTATION LOTUS NOTES BACKUP & RESTORE OPERATIONS

mailtunnel Quick Guide ENCRYPTED TUNNEL COMENDO DATA CENTER SECURITY CENTER SPAM+VIRUS LOGS

Centralized Auditing in Windows Derek Melber

Helping Users Sync Contacts and Events with Exchange Sync (Beta)

Configuring and Integrating MAPI

How to make the s you Send with Outlook and Exchange Appear to Originate from Different Addresses

CONNECTING TO DEPARTMENT OF COMPUTER SCIENCE SERVERS BOTH FROM ON AND OFF CAMPUS USING TUNNELING, PuTTY, AND VNC Client Utilities

ASM_readme_6_10_18451.txt README.TXT

SMTP Servers. Determine if an message should be sent to another machine and automatically send it to that machine using SMTP.

2 Advanced Session... Properties 3 Session profile... wizard. 5 Application... preferences. 3 ASCII / Binary... Transfer

Configuring Notification for Business Glossary

DaimlerChrysler EBMX HTTP/s Quick Start Guide

You can attach accounts to this domain name (eg. or which also increases your corporate branding.

BillMax Ticketing Installation and Usage Guide

Tutorial Details Product Demonstrated: X-301 Estimated Completion Time: 15 minutes

Secure Agent Quick Start for Windows

Transcription:

Sendmail Setup for Linux

This work may be reproduced and redistributed, in whole or in part, without alteration and without prior written permission, provided all copies contain the following statement: Copyright 2011 sheepsqueezers.com. This work is reproduced and distributed with the permission of the copyright holder. This presentation as well as other presentations and documents found on the sheepsqueezers.com website may contain quoted material from outside sources such as books, articles and websites. It is our intention to diligently reference all outside sources. Occasionally, though, a reference may be missed. No copyright infringement whatsoever is intended, and all outside source materials are copyright of their respective author(s). Copyright 2011 sheepsqueezers.com Page 2

Table of Contents Introduction... 4 Steps to Insanity... 5 Creating the Pre-Configuration File... 6 Sending an E-mail... 8 References... 9 Copyright 2011 sheepsqueezers.com Page 3

Introduction This document guides you in setting up sendmail on your Linux box. Unfortunately, I was not able to send e-mail out of an organization. The sending and receiving of mail within an organization works fine. To alleviate this teensy-weensy problem, you can set up a mail distribution list on your Microsoft Exchange server and send all of your mail to the internal e-mail address of the distribution list; if you have any outside addresses, they will be forwarded by the Exchange Server to your external recipient automatically. Despite the bitter tone of this document, I really was able to get sendmail to work. But, check with your Linux System Administrator since there might be a better and less aggravating way of sending emails from your Linux server. Copyright 2011 sheepsqueezers.com Page 4

Steps to Insanity Let s just face facts: sendmail setup sucks and you will lose your mind in the process. With that said, these are the steps you will follow to get sendmail nearly working in your organization: 1. Admit that you will never get sendmail to work properly and leave it at that! 2. Set up your sendmail pre-configuration file by stealing someone else s pre-configuration file and modifying it to work in your organization. It won t, so just give up now. 3. Create the sendmail configuration file from the pre-configuration file by using the m4 processor. Why this is necessary, or even desirable, cannot be said. 4. Change permissions on /var/spool/mqueue to be so wide open that a Mack truck could pass through the firewall, into the server, and complete smoosh all waiting e-mails 5. Change permissions on the access.db file to be read for user, group and world. Don t ask what this file does, just change the permissions and be happy you did. Copyright 2011 sheepsqueezers.com Page 5

Creating the Pre-Configuration File Log in as root and cd to /etc/mail. Open up a new file and call it mysmtp.mc and enter the following code: divert(-1) Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers. All rights reserved. Copyright (c) 1983 Eric P. Allman. All rights reserved. Copyright (c) 1988, 1993 The Regents of the University of California. All rights reserved. By using this file, you agree to the terms and conditions set forth in the LICENSE file which can be found at the top level of the sendmail distribution. This is a generic configuration file for Linux. It has support for local and SMTP mail only. If you want to customize it, copy it to a name appropriate for your environment and do the modifications there. divert(0)dnl include(`/usr/share/sendmail-cf/m4/cf.m4')dnl VERSIONID(`setup for Red Hat Linux')dnl OSTYPE(`linux')dnl DOMAIN(`generic')dnl dnl define(`confdomain_name',`mycompany-domain-name.com')dnl dnl define(`nodns')dnl define(`confto_ident',`0s')dnl define(`smart_host',`smtp:your-email-server')dnl FEATURE(`access_db')dnl FEATURE(`accept_unresolvable_domains')dnl FEATURE(`accept_unqualified_senders')dnl FEATURE(`relay_entire_domain')dnl dnl FEATURE(`relay_local_from')dnl dnl FEATURE(`relay_mail_from')dnl FEATURE(`nocanonify')dnl EXPOSED_USER(`EXPOSED-USER')dnl MAILER(smtp)dnl Note that you may need to replace MYCOMPANY-DOMAIN-NAME.COM with your company s domain name as well as replace YOUR-EMAIL_SERVER with the name of your email server. Also, change EXPOSED-USER to the name of the user who will be using sendmail. Save this file and exit out. Create the Configuration File As root, and while still in /etc/mail, enter the following commands at the command prompt: m4 mysmtp.mc > mysmtp.cf Copyright 2011 sheepsqueezers.com Page 6

This creates the sendmail configuration file mysmtp.cf. Change Permissions As root, enter the following at the command prompt: chmod 644 /etc/mail/access.db chmod 777 /var/spool/mqueue chmod 644 /etc/mail/mysmtp.cf Update /etc/hosts Make sure that the fully-qualified domain name of your server appears in the /etc/hosts file: 192.168.123.456 SRV1 SRV1.MYCOMPANY.COM Copyright 2011 sheepsqueezers.com Page 7

Sending an E-mail To send an e-mail using sendmail, enter the following commands at the command prompt: sendmail -bm -v -C /etc/mail/mysmtp.cf bsmith@mycompany.com < final_email where v is verbose mode, -bm tells sendmail to act like an e-mail program and send the e-mail, and the C tells sendmail where the configuration file is located. The e-mail address is the address of the recipient and the file final_email is the text to place in the body (including an attachment, if desired). The final_email file must contain email headers, as shown in the next section, at the top of this file. Example E-Mail Headers Here is what the headers look like in an e-mail with an attachment: To: bsmith@mycompany.com From: bsmith@mycompany.com Subject: SUBJECT OF EMAIL GOES HER!!! MIME-Version: 1.0 Content-Type: multipart/mixed; Boundary="sendfile-attachment-boundary" --sendfile-attachment-boundary Content-Type: text/plain; charset=us-ascii BODY OF EMAIL GOES HERE!!! --sendfile-attachment-boundary Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="filename-of-attachment"; --sendfile-attachment-boundary You may want to change the Content-Type and the Content-Disposition filename. At this point, you can append your attachment to the e-mail to create the final_email file. Note that you do not need to uuencode your attachment. Copyright 2011 sheepsqueezers.com Page 8

References Click the links to get more information on Amazon.com s website. 1. sendmail by Bryan Costales with Eric Allman (ISBN-13: 978-0596510299) 2. sendmail Cookbook by Craig Hunt (ISBN-13: 978-0596004712) Copyright 2011 sheepsqueezers.com Page 9

Support sheepsqueezers.com If you found this information helpful, please consider supporting sheepsqueezers.com. There are several ways to support our site: Buy me a cup of coffee by clicking on the following link and donate to my PayPal account: Buy Me A Cup Of Coffee?. Visit my Amazon.com Wish list at the following link and purchase an item: http://amzn.com/w/3obk1k4eiwir6 Please let me know if this document was useful by e-mailing me at comments@sheepsqueezers.com. Copyright 2011 sheepsqueezers.com Page 10