Dave Howorth wrote:
On Mon, 15 Jun 2020 08:24:10 +0200 Per Jessen <per@computer.org> wrote:
Dave Howorth wrote:
Thanks for the reply. After my last message, I discovered that the setting should be in main.cf rather than master.cf so I did that and restarted postfix. After that I can see in /var/log/mail that it is getting a connection from the other host, but there's no mail for the user:
Can't get the log to format (it's too late :) - I've attached a copy that's hopefully OK.
2020-06-14T23:26:15.486595+01:00 acer-suse postfix/smtpd[1627]: connect from emonpi.fritz.box[192.168.1.24] 2020-06-14T23:26:15.486949+01:00 acer-suse postfix/smtpd[1627]: improper command pipelining after HELO from emonpi.fritz.box[192.168.1.24]: MAIL FROM: emonpi@emonpi.fritz.box\nRCPT TO: emoncms@acer-suse.fritz.box\nDATA\nDoes this work?\n.\n
This is postfix choking on your data from the Raspi. Normally the SMTP setup is an exchange of commands and replies, not just a stream of commands.
Maybe try with "EHLO raspi" instead of just "HELO". I think that might enable the pipelining. (yes, EHLO, not HELO).
Using EHLO instead doesn't seem to make any difference. Neither does typing the commands one at a time instead of via <<EOF.
Okay, I wasn't sure it would - pipelining is an extension, and you have start with EHLO to enable SMTP extensions. If you want to see what it should look like, maybe try telnet.
Question - do you have an already working postfix setup on this machine? The above suggests 'not quite'. The machine should at least be prepared to receive mails for acer-suse.fritz.box. (or @fritz.box).
Exactly so. I installed postfix on the pi early on but haven't configured it or removed it yet.
Ahah! The key is the "mail for acer-suse.fritz.box loops back to myself" bit. Google tells me I need to add acer-suse.fritz.box to mydestination in main.cf and having done that it works!
Perfect, good stuff!
If you will be using 'fritz.box' as your local domain, and send mails from e.g. 'emonpi@fritz.box' to 'emoncms@fritz.box', on your 'acer-suse' machines, I would add this to /etc/postfix/main.cf :
mydestination=fritz.box
Hmm, just fritz.box didn't work but acer-suse.fritz.box did.
It depends on which email addresses you will be using - also including the hostname is a little unusual, but that's just my opinion. -- Per Jessen, Zürich (22.0°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org