0

I have an old system lately upgraded from 23.04 to 23.10. However, I do not know if this problem was present in the previous versions, since I did not try to send emails in the previous versions.

My problem is that when I send an email from command line like this:

echo "Test content" | mail -s "Test subject" somebody@example.com

the mail command (or postfix) does not fill my fully qualified domain name in the From: line. This field contains only me@host as can be seen from the mail.log of the system and the email is rejected by the recipient.

When I use:

echo "Test content" | mail -s "Test subject" -r "me@host.mydomain" somebody@example.com

then the email is transferred correctly as expected.

My /etc/postfix/main.cf file contains:

myhostname = host.mydomain
mydestination = host.mydomain localhost.mydomain localhost

The mail command's version:

$ mail --version
mail (GNU Mailutils) 3.16
Copyright (C) 2007-2023 Free Software Foundation, inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Note that mail is a link to /usr/bin/mail.mailutils from:

$ dpkg -S /usr/bin/mail.mailutils
mailutils: /usr/bin/mail.mailutils

I have compared all these plus network configuration (hostname, dnsdomainname, DNS records, etc.) with another system which currently runs 23.04 and they are similar, but that system does act as expected by filling the fully qualified domain name in the From: line. So, I am hesitating to upgrade that system, in case that this problem is somehow related to binaries or default configurations provided in 23.10. :(


Obviously "host" and "mydomain" as given in the above examples are placeholders for the real names.


FedKad
  • 10,515

0 Answers0