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: [email protected]. I want to remove stk.

1 Answer 1

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 [email protected]:

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .