Jesper Langkjær wrote:
if ( $RETURNCODE == 0 )
exit
to "| ( cat - ; echo ''; cat vacation.msg) | $SENDMAIL"
But now the server got another mail domain (companyB) and
whenever sombody from CompanyB create an vacation messages
and it got send it seems like it coming from CompanyA.
Eg.
1. user1@companyB make an vacation message
2. sombody@somwhere sends an e-mail to user1@companyB
3. The vacation messages that comes back to
sombody@somewhere got it from user1@companyA
How can I fix it so that sombody@somewhere will get it from
user1@companyB ??
What do you mean when you say that it appears to come from
companyA? Do
you mean that the From: header shows the wrong name? Is the recipient
*really* user1@companyB or is that an alias and the mail is actually
being delivered to a different account?
It's an mailaliases. The mail are sent to user1@companyB and then delivered to
user2, when the mail(vacation messages) are returned it seems like it comes from
user2@companyA and not user1@companyB as it should.
Assuming that the problem is the From: header and that
user1@companyB is
the actual recipient, then you need to add the proper From: header to
the vacation message before you mail it.
to "| ( cat - ; echo "From: $RECIPIENT"; echo ''; cat vacation.msg) |
$SENDMAIL -f $RECIPIENT"
I've try this and it made no difference.
/Jesper