Hi!
I've inherited a server environment where all the servers have local postfix agents installed, relaying mail to our central email server. I'm trying to understand the main.cf settings shared by all our servers, but there is one setting that I can't understand: mydestination = Aka nothing assigned to the mydestination value. To me the documentation makes it sound like this is an error, but I'm unclear as to the exact consequences of forcing this setting to be blank. Mail delivery works as expected (mostly). If it makes any difference, here is the complete main.cf file that we deploy: mydomain = dsv.su.se myorigin = $mydomain mydestination = relayhost = [smtp.su.se] mynetworks = 127.0.0.0/8 [::1]/128 inet_interfaces = loopback-only biff = no append_dot_mydomain = no Thanks, Erik Thuning |
Hi Erik,
If $mydestination is empty, it defaults to $myhostname, which defaults to the FQDN of the machine: http://www.postfix.org/postconf.5.html#mydestination Kind regards, Hans On 25-09-2020 16:37, Erik Thuning wrote: > Hi! > > I've inherited a server environment where all the servers have local > postfix agents installed, relaying mail to our central email server. I'm > trying to understand the main.cf settings shared by all our servers, but > there is one setting that I can't understand: > > mydestination = > > Aka nothing assigned to the mydestination value. To me the documentation > makes it sound like this is an error, but I'm unclear as to the exact > consequences of forcing this setting to be blank. Mail delivery works as > expected (mostly). > > If it makes any difference, here is the complete main.cf file that we > deploy: > > mydomain = dsv.su.se > myorigin = $mydomain > mydestination = > relayhost = [smtp.su.se] > mynetworks = 127.0.0.0/8 [::1]/128 > inet_interfaces = loopback-only > biff = no > append_dot_mydomain = no > > > Thanks, > Erik Thuning |
Hi Hans,
Thanks for the clarification. Just to make sure I understand correctly, setting "myhostname = " is equivalent to not setting the value at all? The output of 'postconf' vs 'postconf -d' confused me here: # postconf | grep 'mydestination =' mydestination = # postconf -d | grep 'mydestination =' mydestination = $myhostname, localhost.$mydomain, localhost /T On 2020-09-25 16:48, Hans van Zijst
wrote:
|
In reply to this post by Erik Thuning
On Fri, 2020-09-25 at 16:37 +0200, Erik Thuning wrote:
> Hi! > > I've inherited a server environment where all the servers have local > postfix agents installed, relaying mail to our central email server. > I'm > trying to understand the main.cf settings shared by all our servers, > but > there is one setting that I can't understand: > > mydestination = > > Aka nothing assigned to the mydestination value. To me the > documentation > makes it sound like this is an error, but I'm unclear as to the > exact > consequences of forcing this setting to be blank. Mail delivery works > as > expected (mostly). > Thanks, > Erik Thuning Hello Erik, A blank entry for mydestination means 'do not deliver mail to the local machine' and all mail will be sent to the relayhost. This is known as a 'null client' See http://www.postfix.org/STANDARD_CONFIGURATION_README.html#null_client for details. Regards, Richard |
In reply to this post by Erik Thuning
Hi Erik,
I might have been a little quick to react. Explicitly setting it to empty actually makes it an empty value :) What $mydestination means is what domains the machine should accept mail for as its final destination. Explicitly setting it empty would ensure that no mail whatsoever is ever considered to be local, what would mean that it ends up in a local mailstore. Where it will probably be unnoticed forever... Your predecessor probably did this to make absolutely sure that that would never happen, and that every message had to be passed on to the central relaying server. Kind regards, Hans On 25-09-2020 17:07, Erik Thuning wrote: > Hi Hans, > > Thanks for the clarification. Just to make sure I understand correctly, > setting "myhostname = " is equivalent to not setting the value at all? > > The output of 'postconf' vs 'postconf -d' confused me here: > > # postconf | grep 'mydestination =' > mydestination = > # postconf -d | grep 'mydestination =' > mydestination = $myhostname, localhost.$mydomain, localhost > > > /T > > On 2020-09-25 16:48, Hans van Zijst wrote: >> Hi Erik, >> >> If $mydestination is empty, it defaults to $myhostname, which defaults >> to the FQDN of the machine: >> >> http://www.postfix.org/postconf.5.html#mydestination >> >> Kind regards, >> >> Hans >> >> >> On 25-09-2020 16:37, Erik Thuning wrote: >> > Hi! >> > >> > I've inherited a server environment where all the servers have local >> > postfix agents installed, relaying mail to our central email server. I'm >> > trying to understand the main.cf settings shared by all our servers, but >> > there is one setting that I can't understand: >> > >> > mydestination = >> > >> > Aka nothing assigned to the mydestination value. To me the documentation >> > makes it sound like this is an error, but I'm unclear as to the exact >> > consequences of forcing this setting to be blank. Mail delivery works as >> > expected (mostly). >> > >> > If it makes any difference, here is the complete main.cf file that we >> > deploy: >> > >> > mydomain = dsv.su.se >> > myorigin = $mydomain >> > mydestination = >> > relayhost = [smtp.su.se] >> > mynetworks = 127.0.0.0/8 [::1]/128 >> > inet_interfaces = loopback-only >> > biff = no >> > append_dot_mydomain = no >> > >> > >> > Thanks, >> > Erik Thuning > |
On Fri, Sep 25, 2020 at 05:16:26PM +0200, Hans van Zijst wrote:
> I might have been a little quick to react. Explicitly setting it to > empty actually makes it an empty value :) Correct. More specifically it ensures that no domains are in the "local" address class. See ADDRESS_CLASS_README. > What $mydestination means is what domains the machine should accept mail > for as its final destination. Final destinations include and - Local domains (listed in $mydestination) - Virtual mailbox domains (listed in $virtual_mailbox_domains) - Virtual alias domains (listed in $virtual_alias_domains), but for these, the address has to then actually rewrite to some "real" domain. Additionally, Postfix will by default also accept inbound email to domains in the "relay address class, which are then (unsurprisingly) relayed (ideally closer) to their final destination. > Explicitly setting it empty would ensure that no mail whatsoever is > ever considered to be local, what would mean that it ends up in a > local mailstore. Where it will probably be unnoticed forever... It largely disables delivery to local accounts listed in /etc/passwd, and in the local aliases(5) (but not virtual(5) aliases) table. Delivery to virtual mailbox domains, and virtual alias domains is not affected, nor is forwarding to any relay domains dependent on a non- empty $mydestination. > Your predecessor probably did this to make absolutely sure that that > would never happen, and that every message had to be passed on to the > central relaying server. It ensures that mail to local user accounts is forwarded to the relayhost for processing. -- Viktor. |
Free forum by Nabble | Edit this page |