On Wed, Feb 10, 2021 at 03:47:29PM +0100, Matus UHLAR - fantomas wrote: > On 10.02.21 14:36, Chris Green wrote: > > Apart from the TLS/SASL bits the main.cf for all these headless > > systems is:- > > > > mydomain = zbmc.eu > > myorigin = $mydomain > > relayhost = [mail.gandi.net]:465 > > luser_relay = ch...@isbd.co.uk > > local_recipient_maps = > > # > > # > > # We don't accept any incoming connections > > # > > mydestination = > > inet_interfaces = loopback-only > > > > So myhostname isn't explicitly set. > > myhostname is set by default to your local hostname and mydomain is set by > default to your hostname stripped of first segment. > Local hostname doesn't have FQDN by default though:-
chris@isbdGandi$ hostname isbdGandi chris@isbdGandi$ hostname -f isbdGandi.isbd.uk > Do your OS instances have their hostnames? > See above. > > Having 'mydomain = zbmc.eu' worked until now because the systems in > > question were on a LAN which is zbmc.eu. However I'd now rather like > > to use the same main.cf on some systems which aren't on the same LAN. > > It does need to be set so that one can tell easily where messages come > > from. > > don't set the myhostname or mydomain in main.cf, and you'll get the default > values. You can use them. > If I remove the mydomain setting from main.cf outgoing mail fails:- Feb 10 15:42:03 isbdGandi postfix/smtp[3852]: A59B186D46: to=<chris@localdomain>, relay=mail.gandi.net[217.70.178.9]:465, delay=0.35, delays=0.06/0/0.07/0.21, dsn=5.5.2, status=bounced (host mail.gandi.net[217.70.178.9] said: 504 5.5.2 <chris@localdomain>: Recipient address rejected: need fully-qualified address (in reply to RCPT TO command)) -- Chris Green