0
Is there a way to modify the hostname or, more precisely, remove the defaulthost from the address? When I'm sending mails issuing qmail-inject
the recipient gets mails from an address like this: USER@stk.HOST. I want to remove stk.
0
Is there a way to modify the hostname or, more precisely, remove the defaulthost from the address? When I'm sending mails issuing qmail-inject
the recipient gets mails from an address like this: USER@stk.HOST. I want to remove stk.
0
You can override this by setting the QMAILDEFAULTHOST environment variable when you run qmail-inject. For example, if my hostname is set to a.example.com, this will inject the mail as $USER@example.com:
echo -e 'Subject: Test inject\n\nHello' | \
env QMAILDEFAULTHOST=$(hostname -d) /var/qmail/bin/qmail-inject $RECIPIENT
See also the qmail-inject manual: http://qmail.org/man/man8/qmail-inject.html.