GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

VPS v2: M4 Macro Set: Configuring Sendmail

bullet Introduction

Because the sendmail configuration file uses a cryptic format, the M4 macros were developed to make configuring sendmail easier. Instead of having to learn the complex commands sendmail uses, the macros are relatively simple.

NOTE: unless you are familiar with the M4 macros and sendmail configuration, we strongly advise against modifying your sendmail settings.

The M4 macros, along with some example master configuration files, are already installed on your VPS v2. The default sendmail.cf that your VPS v2 comes with is generated from the /etc/mail/freebsd.mc file, which is a good template to use when creating your own custom sendmail configuration files. The macros themselves are located in the /usr/share/sendmail/ directory.

 

bullet Using the M4 macros

In order to use the M4 macros, you must first create a master configuration file (.mc) containing the features and options you want sendmail to have. The .mc file should be located in the /etc/mail directory on your VPS v2.

Before replacing your current sendmail.cf file, you should create a copy of it in case you need to revert back to the original. As root, run the following commands from your VPS v2 shell.

# cp sendmail.cf sendmail.cf.bak

Run the following command to convert the .mc file to a .cf file that sendmail can use.

# /usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/ /usr/share/sendmail/cf/m4/cf.m4 
your-file-name.mc > your-file-name.cf 

You can now replace the sendmail.cf with your custom .cf file.

# cp /etc/mail/your-file-name.cf /etc/mail/sendmail.cf

As with any time you make changes to the sendmail configuration, you must restart the sendmail daemon for the changes to take effect.

# cd /etc/mail
# make restart

 

bullet Common uses for the M4 macros

There are several different reasons why you may want to modify your sendmail.cf using the M4 macros. In addition to creating mail filters directly in sendmail, you may want to use procmail or SpamAssassin to filter messages.


Toll Free 1-866-GSP-4400 • 1-301-464-9363 • service@gsp.com
Copyright © 1994-2016 GSP Services, Inc.