Difference between revisions of "Postfix"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
[[Postfix]] is an [[open source]] [[mail transfer agent]] (MTA) for [[POSIX]] systems. It is fully supported by [[Webmin]]/[[VirtualMin]] and is part of the [[Dovecot]] stack.
 
[[Postfix]] is an [[open source]] [[mail transfer agent]] (MTA) for [[POSIX]] systems. It is fully supported by [[Webmin]]/[[VirtualMin]] and is part of the [[Dovecot]] stack.
 
===Pages===
 
===Pages===
 +
* [[/aliasing]]: managing email redirects/aliases
 
* [[/fixing]]: diagnosis of installations that aren't working right
 
* [[/fixing]]: diagnosis of installations that aren't working right
 +
* see also: [[DKIM]], [[DMARC]], [[Sender Policy Framework]] (SPF)
 +
* [[/chroot]]: running Postfix in a [[chroot]]ed environment
 +
 
===Files===
 
===Files===
 
* [[/main.cf]]
 
* [[/main.cf]]
Line 103: Line 107:
 
* [[/flow]]: the flow of messages across the various helper programs that make up Postfix
 
* [[/flow]]: the flow of messages across the various helper programs that make up Postfix
 
* [[/SSL]]: Postfix and SSL
 
* [[/SSL]]: Postfix and SSL
 +
 
==Notes==
 
==Notes==
 
After making changes to the Postfix configuration files, you don't actually have to stop and restart Postfix to load the changes; you can just type (as root) "postfix reload".
 
After making changes to the Postfix configuration files, you don't actually have to stop and restart Postfix to load the changes; you can just type (as root) "postfix reload".
===aliases===
 
To set up aliases, either edit the file specified by the [[/main.cf/alias_maps|alias_maps]] setting in [[/main.cf|main.cf]] ([[etc/aliases|/etc/aliases]] by default) and then run [[newaliases]] (or <code>postalias /etc/aliases</code>) to update the database, or else use [[Webmin]] (Servers &rarr; Postfix Mail Server &rarr; "Mail Aliases" icon &rarr; "Create a new alias" link).
 
 
There is also a <code>/etc/postfix/virtual</code> file for aliases in virtual domains; it can be edited manually, but you need to run <code>postmap /etc/postfix/virtual</code> after modifying it.
 
 
'''Notes''':
 
* Webmin seems to automatically run newaliases when you add or modify an individual alias, but ''not'' when you use it to edit the [[etc/aliases|/etc/aliases]] file directly. Changes made to /etc/aliases will not take effect until the database is updated.
 
* Stopping and starting the postfix daemon does ''not'' update from the aliases file; you still have to run newaliases.
 
* see [http://www.postfix.org/aliases.5.html aliases] for more information.
 
 
===virtual users===
 
By default, virtual aliases seem to get looked up only when email comes from the outside; locally generated emails are "returned" as undeliverable with the error message "Diagnostic-Code: x-unix; user unknown"
 
 
The following change in main.cf solves that problem &ndash;
 
* '''change''': {{link/subpage|pfx=/main.cf/|receive_override_options}} = no_address_mappings
 
* '''to this''': receive_override_options =
 
&ndash; but creates a new one, in that externally-sourced messages are now delivered ''twice'' (or ''four'' times if addressed directly to a virtual user instead of a virtual alias).
 
 
Someone who understands the internal structure of postfix could probably figure out what this means (and how to fix it), but I'm still working on it.
 
 
===catch-all===
 
To set up a catch-all address, edit {{link/subpage|main.cf}} and set the following parameters:
 
* {{link/subpage|pfx=/main.cf/|local_recipient_maps}} =
 
* {{link/subpage|pfx=/main.cf/|luser_relay}} = <u>whereToSend</u>
 
 
The syntax for <u>whereToSend</u> is explained [http://www.postfix.org/postconf.5.html#luser_relay here].
 
 
Examples:
 
* luser_relay = $user@anotherdomain.org
 
** forwards all email addressed to "invaliduser@firstdomain.org" to "invaliduser@anotherdomain.org"
 
* luser_relay = youraddress@anotherdomain.org
 
** forwards all email addressed to invalid users to "youraddress@anotherdomain.org".
 
 
[http://www.cyberciti.biz/faq/howto-setup-postfix-catch-all-email-accounts/ This page] mentions some other parameters but neglects the ones above.
 
  
 
===automatic BCC===
 
===automatic BCC===

Latest revision as of 16:00, 17 September 2021

About

Postfix is an open source mail transfer agent (MTA) for POSIX systems. It is fully supported by Webmin/VirtualMin and is part of the Dovecot stack.

Pages

Files

Internal Apps

User Applets

Other Applets

These are installed as part of the postfix package; not sure how they should be classified:

Error Messages

Other Subpages

  • /flow: the flow of messages across the various helper programs that make up Postfix
  • /SSL: Postfix and SSL

Notes

After making changes to the Postfix configuration files, you don't actually have to stop and restart Postfix to load the changes; you can just type (as root) "postfix reload".

automatic BCC

To automatically BCC outgoing mail from any given set of users, set sender_bcc_maps in /main.cf to hash:/etc/postfix/sender_bcc. (In Webmin: BCC Mapping: Sender BCC mapping lookup tables)

Each line in the /sender_bcc file will contain the sender (which can be user@domain, user, or @domain), one or more blanks, then the recipient (which can be one address or multiple addresses separated by commas).

Example -- BCCs all mail sent by vbz.com users to an archive address:

@vbz.com archive2024@vbz.com

pages to index

Possibly useful pages:

Links

Official

Reference