create new tag
, view all tags
OK, I think I'm getting closer. Start from EmailServerImplementation. On this page, I'm going to start by mentioning the various configuration files and what I think their purpose is.

See AboutThesePages.



Files relevant to postfix are typically found in:

  • /etc/postfix -- configuration files
  • /var/spool/postfix -- postfix spools (maildrop, incoming, defered, etc.)
  • /var/mail, /var/spool/mail (perhaps one symbolically linked to the other) -- mailboxes
  • /var/log/mail -- logs
  • /usr/lib/postfix -- postfix daemons
  • /usr/sbin/postfix -- the main program?
  • ~/mail, ~/Mail, ~/nsmail -- individual mail folders, depending on MTA
  • /usr/share/doc/postfix-19991231_pl08 -- documentation including sample-xxx.cf configuration files

Aside: I see a ton of files like /var/spool/postfix/maildrop/C8E514B1 -- not sure they belong there, especially as I thought I had cleaned out a ton of mail.

Changing a plain text configuration file

In many cases, after a plain text file is modified, the derived database has to be recreated. The following is quoted from /usr/share/doc/postfix-19991231_pl08/sample/sample-transport.cf, a sample transport file.

Specify the types of databases to use. If you use this feature, run "postmap /etc/postfix/transport" after change, then "postfix reload".

# transport_maps = dbm:/etc/postfix/transport # transport_maps = hash:/etc/postfix/transport # transport_maps = hash:/etc/postfix/transport, nis:transport # transport_maps = hash:/etc/postfix/transport, netinfo:/transport transport_maps =


From man 5 access:

The optional access table directs the Postfix SMTP server to selectively reject or accept mail from or to specific hosts, domains, networks, host addresses or mail addresses.

The table serves as input to the postmap(1) command. The result, an indexed file in dbm or db format, is used for fast searching by the mail system. After an update it may take a minute or so before the change becomes visible. Issue a postfix reload command to eliminate the delay.

In my own words: Looks like access is the table that can prevent a postfix server from acting as an open relay, by rejecting mail from anyone except known "hosts, domains, networks, host addresses, or mail addresses". All of that leading me to think that as long as my mail appears to be coming from rhkramer@fastPLEASENOSPAM.net, it should be accepted by my ISP. But, I guess that means the envelope address has to be from rhkramer@fastPLEASENOSPAM.net.


Excerpted from /etc/postfix/aliases, the following makes it look almost self-explanatory. Looking at the big-picture.html, aliases is used by the local daemon, just before local mail is delivered to the local mailbox(es?). Question to ponder -- does local actually put email addressed to these different addresses in different mailboxes or just one?

# Basic system aliases -- these MUST be present. MAILER-DAEMON: postmaster postmaster: root

# General redirections for pseudo accounts. bin: root daemon: root games: root ...

# Well-known aliases. manager: root dumper: root operator: root

# trap decode to catch security attacks decode: root

# my aliases # dad: rhkramer # rhkramer: dad

# Person who should get root's mail #root: marc


From man 5 canonical:

The optional canonical file specifies an address mapping for local and non-local addresses. The mapping is used by the cleanup(8) daemon. The address mapping is recursive.


The canonical mapping affects both message header addresses (i.e. addresses that appear inside messages) and message envelope addresses (for example, the addresses that are used in SMTP protocol commands). Think Sendmail rule set S3, if you like.

Typically, one would use the canonical table to replace login names by Firstname.Lastname, or to clean up addresses produced by legacy mail systems.

The canonical mapping is not to be confused with virtual domain sup­port. Use the virtual(5) map for that purpose.

The canonical mapping is not to be confused with local aliasing. Use the aliases(5) map for that purpose.

In my own words: See the big-picture.html -- canonical is used by the cleanup daemon, which handles mail on the way into the postfix MTA (between the maildrop and the incoming queue). That doesn't really help me a whole lot as I still don't know exactly what the purpose is of putting an address in canonical. I guess based on the term "canonical" it must somehow make an address into the canonical address -- the one right address. Maybe this is where I have to map all outgoing mail to come from rhkramer@fastPLEASENOSPAM.net so it is accepted by fast.net?

I have two entries in this file commented out, but it appears one of them might be appropriate (right now I'd guess the second):

# dad@fastPLEASENOSPAM.net rhkramer@fastPLEASENOSPAM.net # dad@HomePLEASENOSPAM.System8 rhkramer@fastPLEASENOSPAM.net


From man 5 relocated:

The optional relocated file provides the information that is used in "user has moved to new_location" bounce messages.

On the big-picture.html, the relocated database is used by the qmngr daemon, which handles mail on the way out (to the Internet or local mailboxes).


From man 5 transport:

The optional transport file specifies a mapping from domain hierarchies to message delivery transports and/or relay hosts. The mapping is used by the trivial-rewrite(8) daemon.

Somewhat like relocated, transport is used by the resolve daemon which is used by the qmngr on outgoing mail. Not clear on the purpose. (Well, my guess is that if mail can be handled by more than one route / "transport" you can specify which to be used in various cases here.)


Aside: man 5 talks about sendmail and Postfix style virtual domains, and describes both.

From man 5 virtual:


The virtual redirection is applied only to recipient envelope addresses, and does not affect message headers. Think Sendmail rule set S0, if you like. Use canonical(5) mapping to rewrite header and envelope addresses in general.


With a Postfix-style virtual domain, the virtual domain has its own user name space. Local (i.e. non-virtual) usernames are not visible in a Postfix-style virtual domain. In particular, local aliases(5) and mailing lists are not visible as localname@virtualPLEASENOSPAM.domain.


With a Postfix-style virtual domain, the Postfix SMTP server accepts mail for known-user@virtualPLEASENOSPAM.domain and rejects mail for unknown-user@virtualPLEASENOSPAM.domain as undeliverable.


With a Sendmail-style virtual domain, every local (i.e. non-virtual) username is visible in the virtual domain. In particular, every local alias and mailing list is visible as localname@virtualPLEASENOSPAM.domain.

--+++ Contributors

  • RandyKramer - 28 Feb 2002
  • <If you edit this page, add your name here, move this to the next line>

Page Ratings

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2002-08-15 - RandyKramer
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look