.CF

CF File

Sendmail Configuration File
Ask a question
QUICK ANSWER

A CF file is typically /etc/mail/sendmail.cf, the plain-text configuration the Sendmail mail server reads at startup on Unix and Linux. Open it in any text editor to inspect it, but do not edit it by hand. The correct workflow is to edit the smaller sendmail.mc macro file and regenerate the .cf with the m4 tool. A bad CF file can stop mail flow or turn the server into an open relay.

Developer: Sendmail / Eric Allman (now part of Proofpoint) Category: Settings Files MIME: text/plain
OPENS ON Windows macOS Linux
Related: .ICA · .DS_STORE · .WMZ · .CFG

On this page

19k+ extensions indexed
Last reviewed Aug 5, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the CF file format?

A .cf file is the runtime configuration file for Sendmail, one of the oldest Unix mail transfer agents, originally written by Eric Allman at UC Berkeley in 1983 and now maintained by Proofpoint. The canonical file is named sendmail.cf and lives at /etc/mail/sendmail.cf on most Linux and Unix systems; a companion submit.cf governs submission-mode operation.

The file is plain text but uses a dense, cryptic syntax that is notoriously difficult to read or write by hand. Each line begins with a single capital letter that signals its directive type: D declares macros, C and F define address classes, O sets options, S opens a ruleset, R specifies address-rewriting rules, and M defines mailer configurations. The rewriting rules use $ operators to match and transform addresses, producing a compact but nearly unreadable notation.

Because of this complexity, the supported workflow is to never edit .cf directly. Instead, administrators maintain a small, human-readable .mc macro file and regenerate sendmail.cf by running the m4 macro processor. A V line near the top of the file (for example, V10/Berkeley) records the Sendmail version that generated it.

Typical generated files weigh 30-60 KB even though the source .mc is only a few kilobytes. The .cf extension is also claimed by unrelated formats such as ColdFusion components and CFEngine policy files, so context matters when you encounter one.

Security & safety

RISK: MEDIUM

Reading a sendmail.cf is safe - it's plain text. The real risk is in EDITING: sendmail.cf controls a mail server, so a typo or bad rule can stop mail flow, cause delivery loops, or - worse - turn the server into an open relay that spammers abuse. Rules: never hand-edit the cryptic .cf; edit the small sendmail.mc and regenerate with m4. Always back up the working .cf first (cp sendmail.cf sendmail.cf.bak), change one thing at a time, and test before relying on it. Be especially careful with relay/access settings copied from untrusted tutorials, since a misconfigured relay is a security and reputation hazard.

Format details

in a nutshell
FULL NAMESendmail Configuration Fileaka sendmail.cf, Sendmail config
DEVELOPERSendmail / Eric Allman (now part of Proofpoint)since 1983 (Sendmail, one of the original Unix MTAs); sendmail.cf syntax dates to that era
MIME TYPEtext/plain
TYPEPlain-text configuration file with Sendmail's cryptic rule syntax (compiled from an .mc macro file)
This extension is also used by…
  • ColdFusion component / template - Adobe ColdFusion source files use .cfc/.cfm; some setups use .cf for ColdFusion includes or components.
  • CFEngine policy file - Configuration-management policy written in the CFEngine language, loaded by the cf-agent.
  • Generic application config - Various programs reuse .cf as a plain-text settings file with their own key/value syntax.

Programs that open CF files

Windows2 apps
Notepad Open-source Open the .cf to read it with line numbers and highlighting. For a Linux sendmail.cf, set Edit > EOL Conversion > Unix (LF). Don't hand-edit rules - change the .mc and regenerate.
Visual Studio Code Free Open the .cf to read/inspect the configuration; good for large generated sendmail.cf files. Keep LF line endings for Unix configs.
macOS1 app
TextEdit / VS Code Free Open the .cf as plain text (in TextEdit use Format > Make Plain Text). VS Code is safer for inspecting the large generated config.
Linux3 apps
Sendmail (the MTA itself) Open-source Sendmail READS sendmail.cf at startup. The supported workflow: edit /etc/mail/sendmail.mc, run 'm4 sendmail.mc > sendmail.cf' (or 'make' in /etc/mail), then restart sendmail.
vim / nano Open-source View or carefully edit the .cf in the terminal: 'sudo vim /etc/mail/sendmail.cf'. Back up first (cp sendmail.cf sendmail.cf.bak); prefer editing the .mc and regenerating.
m4 (macro processor) Open-source The tool that GENERATES sendmail.cf from sendmail.mc: 'm4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf'. This is the correct way to change a .cf.

Technical details

deep spec
MIME typetext/plain
Typical file namesendmail.cf; also submit.cf for submission-mode operation
Default path on Linux/Unix/etc/mail/sendmail.cf
EncodingASCII / UTF-8 plain text
Typical file size30-60 KB (generated file); the source .mc is usually only a few kilobytes
File signature / magic bytesNone - plain text; identified by dense single-letter directive lines (D, S, R, M, O) and $ rewrite operators
Version markerV line near the file top (e.g., V10/Berkeley) ties the file to the Sendmail release that generated it
Directive typesD (macros), C/F (address classes), O (options), P (precedence), S (rulesets), R (rewrite rules), M (mailer definitions)
Generation methodCompiled from a .mc source file using the m4 macro processor; direct hand-editing is strongly discouraged
Rewrite-rule syntaxRules use $ operators (e.g., $+, $*, $1) as pattern tokens and are grouped into numbered or named rulesets
Runtime behaviorSendmail reads sendmail.cf at startup; a SIGHUP or restart is required for changes to take effect
Associated operating systemsLinux, BSD, Solaris, AIX, HP-UX; historically also macOS (which shipped Sendmail until OS X 10.8)
Extension name collisionThe .cf extension is also used by ColdFusion components, CFEngine policy files, and generic application configs - context is required to disambiguate
Companion filesubmit.cf governs Sendmail's submission daemon (port 587); generated alongside sendmail.cf from submit.mc
Released1983 (Sendmail, one of the original Unix MTAs); sendmail.cf syntax dates to that era
Latest versionTied to Sendmail releases (8.x); sendmail.cf is generated by m4 from a .mc file
Specificationwww.proofpoint.com

CF conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with CF files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about CF files.

Frequently asked questions

What is a .cf file?
Most often a Sendmail configuration file (sendmail.cf) - the plain-text settings the Sendmail mail server reads at startup on Unix/Linux. The .cf extension is also used by ColdFusion and CFEngine, so check the source.
How do I open a sendmail .cf file?
It's plain text - open it in any code editor (vim, nano, VS Code, Notepad++). But don't edit the cryptic rules by hand; the supported way is to edit sendmail.mc and regenerate sendmail.cf with the m4 tool.
Why is sendmail.cf so hard to read?
Because it's machine-generated. The readable source is the small sendmail.mc macro file; running 'm4 sendmail.mc > sendmail.cf' expands it into thousands of low-level rewrite rules that the daemon uses but humans struggle with.
How do I change Sendmail settings safely?
Edit /etc/mail/sendmail.mc (or the access/aliases files), back up the current sendmail.cf, then run 'm4 sendmail.mc > sendmail.cf' (or 'make' in /etc/mail) and restart Sendmail. Don't edit the .cf directly.
Can I convert sendmail.cf back to the .mc file?
No - the m4 generation is one-way. If you've lost the .mc, you either recover it from backup/version control or write a new sendmail.mc and regenerate the .cf from it.
My .cf isn't a Sendmail file - what else could it be?
The .cf extension is shared. Besides Sendmail, it's used by Adobe ColdFusion files and by CFEngine policy files (cf-agent), and as a generic config by some apps. Open it as text and look at the syntax, or check which program produced it.

References

1GNU m4 - macro processor used to generate sendmail.cfwww.gnu.org
2Wikipedia - Sendmailen.wikipedia.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.DATProgram Data File (generic)
5.EXEWindows Executable (Portable Executable)
6.BINCD/DVD Disc Image (BIN/CUE)
7.RPMSGRestricted Permission Message
8.NOMEDIAAndroid No-Media Marker File
9.MDMarkdown Document
10.TMPTemporary File

Related extensions

.ICACitrix Independent Computing Architecture file
.DS_STOREmacOS Finder Desktop Services Store (.DS_Store)
.WMZWindows Media Player Skin
.CFGConfiguration File
.LICLicense File
.CONFConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z