Idézem/Quoting Steffen Nurpmeso <stef...@sdaoden.eu>:
SZÉPE Viktor <vik...@szepe.net> wrote:
|Idézem/Quoting Steffen Nurpmeso <stef...@sdaoden.eu>:
|> Steffen Nurpmeso <stef...@sdaoden.eu> wrote:
|>|SZÉPE Viktor <vik...@szepe.net> wrote:
|>||Idézem/Quoting Steffen Nurpmeso <stef...@sdaoden.eu>:
|> ...
|>||> s-nail -E -S from="${DAEMON} <root>" -s "domain expiry alert" root
|>||>
|>||> which should complain about an invalid address. How about
|> ...
|> Just to clarify this Viktor, the above line will likely never
|> succeed because S-nail will refuse accepting the given value for
|> *from*, since "$DAEMON <root>" is not a valid e-mail address.
...
|All things were so nice with heirloom-mailx. It accepted domain-less
|recipients, and allowed the sendmail-option hack.
It did not perform any checks at all! It also did not support
specifying sendmail arguments freely, i think.
|Is there any way - maybe in the future - to bring back domain-less \
|addresses?
|But wait!
|
|$ s-nail -V
|v14.8.16
Ahhh! Of course i should have asked you which version you
actually use, sorry. Well, the v14.8 series i have passed about
31 months ago, puuh! Yes, that is very much different. Indeed.
|$ ls -la | s-nail -d -S from="TEST <root>" -s ub root
|...
|>>> MTA: "/usr/sbin/sendmail", arguments: "sendmail" "-i" "--" "root"
...
|>>> From: TEST <root>
...
|>>> User-Agent: s-nail v14.8.16
|
|It works. Would you like to break this feature?
It has been broken already in that <root> is not a valid address
and rejected starting with the 14.9 series. We need to make sure
to generate a valid address, this is a standard, Viktor. If you
do not set *from* at all and use a MTA it will do the same:
$ </dev/null s-nail -:/ -s test root
..
From steffen@localhost Tue Jan 23 16:46:12 2018
Received: from steffen (uid 1000)
(envelope-from steffen@localhost)
id 31d
by essex (DragonFly Mail Agent v0.11.13.gf8f802f);
Tue, 23 Jan 2018 16:46:12 +0100
Date: Tue, 23 Jan 2018 16:46:12 +0100
To: root
Subject: test
User-Agent: s-nail v14.9.6-40-gdd750017
Message-Id: <5a6758c4.31d.3704b0e1@essex>
From: <steffen@localhost>
You want some kind of "automatically add the hostname if there is
an address in <> and it has no domain part". Hmm. DMA adds
@localhost, as you can see. Hmmm.
As sent in the previous email Courier MTA has this feature!
And "defaultdomain" is configurable. Usually *not* identical to hostname.
hostname is $servername + $domain like eagle.example.com
defaultdomain is something you use for mailing, like @company.com
Many of the web servers I install are called "www" + $domain but
mailing may not go under $domain!
In case of Courier MTA the s-nail-hack would be to append the contents
of /etc/courier/defaultdomain which is done *automatically* by the MTA
(has an option which is on by default)
Googling for Postfix....
Transform an incomplete address into a complete address. For
example, transform "username" into "usern...@example.com", or
transform "username@hostname" into "usern...@hostname.example.com".
http://www.postfix.org/ADDRESS_REWRITING_README.html
Please be so kind and reconsider your decision.
Thank you.
SZÉPE Viktor, honlap üzemeltetés
https://github.com/szepeviktor/debian-server-tools/blob/master/CV.md
--
+36-20-4242498 s...@szepe.net skype: szepe.viktor
Budapest, III. kerület