Sendmail changes userid in Return-Path

Hi,

sendmail on our hp-ux box is changing the userid of the from address. I have searched the web and read the man pages but can't stop this from happening.

We have a process which creates a text file we pass into sendmail. In the text file we write for example:

Return-Path: joe.bloggs@ourcompany.com

But when sendmail sends the email it is changed to

Return-Path: root@ourcompany.com

Is possible to fix this and if so, how?

Thanks

what command do you use to send these emails.

Sendmail, version details below:-

sendmail -d0.1 -bt < /dev/null
Version 8.9.3 (PHNE_29774)
 Compiled with: LDAPMAP MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7
                NAMED_BIND NDBM NETINET NETUNIX NEWDB NIS NISPLUS QUEUE SCANF
                SMTP USERDB XDEBUG

We then create the email as a text file, and pass it into sendmail, example would be

cat email.txt | sendmail user@domain.co.uk
        IFS="~"
        cat requests/$request | read  user email subject memo attachments
#user is from email address
#email is email address of recipient
#subject is subject of email
#memo is a text file containing the body of the email
#attachments is a list of file (usually pdf) names
        IFS=" "
        cd /u2/email/temp
        domain=`echo $user|cut -d"@" -f2`
        local=`echo $user|cut -d"@" -f1`
        echo $email >>email2.log
        /u2/email/delvmime34.all $attachments <../requests/$request \
        |/usr/lib/sendmail -f$user $email document $user
#document is a local mail box that archives a copy of the email

'delvmimne34' assembles the actual email text file.
The -f option on sendmail, sends the mail as $user.

1 Like

Thanks jgt, I've managed to extract out of the example the bits I need and it seems to work.

Cheers
Russell