Open JsBergbau opened 5 years ago
Obviously there is no way to pass the -h argument from sendmail. With nullmailer sendmail is just there for programs that expect a sendmail binary, see https://manpages.debian.org/jessie/nullmailer/sendmail.1.en.html So I've updated the Rewrite Wrapper Script to change local user destinations to Admin_Adress https://github.com/JsBergbau/nullmailer-Rewrite-Wrapper
The file adminaddr is used when address ends for example with "@localhost" However if only user specified like cron does like
-i -FCronDaemon -B8BITMIME -oem pi
nothing is replaced and mail is sent to e.g. pi@gmail.com Luckily google usernames must be at least 6 characters otherwise someone registering pi@gmail.com would get a lot of mails from raspberrypiI've created a wraper script, because allmailfrom just changed the returnpath header to allmailfrom content, but "From: " header still remained the original From: header. It uses NULLMAILER_USER and NULLMAILER_HOST to replace the from address and replaces any "To: " line without a "@" sign to user given admin, if you're interested see https://github.com/JsBergbau/nullmailer-Rewrite-Wrapper
Problem: To header is rewritten in the mail header is now
Nullmailer still seems to use the to address from commandline. In man nullmailer-inject is written
-h Use only data from the message header as the recipient addresses.
That is exactly what we need here.So how to pass the -h argument to nullmailer-inject? (without writing another wrapper :-) )