Hi folks, I recently upgraded to 1.0 and have a question about the right way to change the postfix configuration in /etc/postfix/main.conf.
I've configured Notifications correctly, and I have no problem getting emails from scheduled jobs in OpenMediaVault.
My original problem was that after I installed denyhosts, I would get bounced emails like this one:
Mail Delivery Subsystem <mailer-daemon@googlemail.com>2:45 PM (19 minutes ago)
Reply
to me
Delivery to the following recipient failed permanently:
root@localhost.localdomain
Technical details of permanent failure:
DNS Error: Address resolution of localhost.localdomain. failed: Domain name not found
----- Original message -----
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=from:to:subject:date:message-id;
bh=wQDgfjf9T3qNXUSx1bxttRrml6SHdDUJU9w+lkSnYE0=;
b=vmAjofieyuBnv8JTWhoKkkUKMATyRGW3MeBgHidN55moWOmZKZyN7snDPXLdSQjN46
temlnnphLlQsscY5ReaxHO/1A7ommq2fAIftNSzKUedpzzcOoa5Ohip0EMVO45lA14yg
AeH5y15Nsijd1OpyMgeWmu2ZMvXWSFfzEDRvVtIGx+yUIVN5kqvk0eVpVlc7Bw5dIBd5
OVoLA9Rk0Vkk9f3bTVytVPT8wPfd+EqTdZYHmpdHatbH5ThSOEr63nYPwRIaEmAPx7Y9
Gj+JBYDnovBLmuZTJSMk8L54pJ8RudLXXwGpIaiJ2L/xpzJr0t5RcEkspPcLIT2LFhpV
RmeA==
X-Received: by 10.70.41.231 with SMTP id i7mr9199559pdl.102.1423262724507;
Fri, 06 Feb 2015 14:45:24 -0800 (PST)
Return-Path: <firstname.lastname@gmail.com>
Received: from omv.localdomain (<myIP>)
by mx.google.com with ESMTPSA id iv1sm9023207pbc.87.2015.02.06.14.45.23
for <root@localhost.localdomain>
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Fri, 06 Feb 2015 14:45:23 -0800 (PST)
From: DenyHosts <firstname.lastname@gmail.com>
X-Google-Original-From: DenyHosts <nobody@localhost.localdomain>
Received: from omv.lan (localhost [127.0.0.1])
by omv.localdomain (Postfix) with ESMTP id 67B7040085F
for <root@localhost>; Fri, 6 Feb 2015 14:45:21 -0800 (PST)
To: root@localhost.localdomain
Subject: DenyHosts Report [omv.lan]
Date: Fri, 06 Feb 2015 14:45:21 -0800
Message-Id: <20150206224521.67B7040085F@omv.localdomain>
Added the following hosts to /etc/hosts.deny:
72.46.157.64 (unknown)
Alles anzeigen
I was able to solve the problem by adding the following line to /etc/postfix/main.cf:
recipient_canonical_maps = regexp:/etc/postfix/recipient_canonical
And creating /etc/postfix/recipient_canonical with:
/.+/ firstname.lastname@gmail.com
However, /etc/postfix/main.cf is overwritten any time I make configuration changes through the OMV user interface.
The question is: Is there a way I can persist my change to /etc/postfix/main.cf so that it's not overwritten?
The other solution is to configure denyhosts to send emails directly to a specific account instead of to "root@localhost", but I'd like to solve for the general case if I can.
Any ideas?