Sendmail changes userid in Return-Path


 
Thread Tools Search this Thread
Operating Systems HP-UX Sendmail changes userid in Return-Path
# 1  
Old 01-08-2016
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:

Code:
Return-Path: joe.bloggs@ourcompany.com

But when sendmail sends the email it is changed to
Code:
Return-Path: root@ourcompany.com

Is possible to fix this and if so, how?

Thanks

Last edited by rsmitherscorp; 01-08-2016 at 10:57 AM..
# 2  
Old 01-08-2016
what command do you use to send these emails.
# 3  
Old 01-11-2016
Sendmail, version details below:-

Code:
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
Code:
cat email.txt | sendmail user@domain.co.uk

# 4  
Old 01-11-2016
Code:
        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.
This User Gave Thanks to jgt For This Post:
# 5  
Old 01-19-2016
Thanks jgt, I've managed to extract out of the example the bits I need and it seems to work.

Cheers
Russell
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Return path of specific tag using awk

The below awk is used with the attached index.html and matches the specific user id in the sub portion with path of /rundb/api/v1/plugin/49/. The command does run but the output is blank. Something changed in the file structure as it used to work. So using the first line in the output: ... (2 Replies)
Discussion started by: cmccabe
2 Replies

2. AIX

Sendmail "from" is not from the userID sending

On one of my servers (AIX 7.1 sendmail=V10/Berkeley) When I login and sudo su to a serviceID and send a test email, the from header shows as being from my loginID and not the serviceID. I have a second server (AIX 6.1 sendmail=V9/Berkeley) where following the same steps the email head has the... (3 Replies)
Discussion started by: LCarpenter
3 Replies

3. UNIX for Dummies Questions & Answers

userid and pw

questions: a. where can I customized the password of userid in solaris? say I wanted 10digits long, all caps? thanks (4 Replies)
Discussion started by: lhareigh890
4 Replies

4. Shell Programming and Scripting

Return Full File Path To Array PERL

Iam trying to load the full path of multiplie files in the same directory to an array if the filenames matches a pattern. The following is the current code; where $input=C:\test # change to and open the comparison directory chdir("$input2") || die "Cannot change dir: $!"; opendir(DIR2,... (2 Replies)
Discussion started by: cold_Que
2 Replies

5. Solaris

How do I configure sendmail to block all OUTGOING mail FROM one userid TO the world?

Hello, ENVIRONMENT: OS: Solaris 10 Sendmail: 8.13.8+Sun BACKGROUND: We had a user account that was compromised and was used as a relay. She sent out (or would have if we didn't kill sendmail) ~10K emails alerting people they just won $75K. The target for this spam was everyone internal... (1 Reply)
Discussion started by: avikb
1 Replies

6. Linux

userid access to a single path

Hi All, Can a user-a on linux be able to access to particular path only? I think is not possible because if the /etc have r on the other then user-a can access it. Right? Thanks for any comment you have will add. (1 Reply)
Discussion started by: itik
1 Replies

7. UNIX for Dummies Questions & Answers

to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 's

Hi All, Can anyone please let me know the syntax / how to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 'system()' function and '${?}'. I am in a process to send the mail automatically with an attachment to bulk users. I have used 'Mailx' and 'Unencode'... (0 Replies)
Discussion started by: manas6
0 Replies

8. Shell Programming and Scripting

sendmail return code

hi, I am sending mail from unix using sendmail option My requirement is that i have to check whether mail has been sent or not i can check the returnstatus using $? but is there any other option to check whether sendmail option has succeeded thanks in advance suggestions welcome (0 Replies)
Discussion started by: trichyselva
0 Replies

9. UNIX for Advanced & Expert Users

userid

I would like to know the difference between the real user-id and the effective user-id. If user-A runs a program owned by user-B then which is the real user-id and which is the effective user-id ? (1 Reply)
Discussion started by: sundaresh
1 Replies

10. Shell Programming and Scripting

SED - How to return PATH from PATH/NAME

Hi, How can I get /usr/people/me/ from /usr/people/me/file.abc with sed? Thanks... (2 Replies)
Discussion started by: cybotic
2 Replies
Login or Register to Ask a Question