AIX sendmail command

When I send email via the 'sendmail' command, the email sent shows 'user@domain.com' as the From Address.  This is ok, but I have a user that would like it to display their name or something like 'user@domain.com  User Name'  or 'user@domain.com  My Company Name'.

What would I need to do to have the From address display differently than just the email address?

Note: below is the command that is currently being used, and the 'User Name" does not display just the email address in the From address.
!sendmail -t -F"User Name"  -fuser@domain.com < /tmp/tmpwork/mail.1566741834

Open in new window

LVL 3
eagle-22Asked:
Who is Participating?
 
woolmilkporcConnect With a Mentor Commented:
Hi,

you can't use "-f" and "-F" simultaneously. "-f" will take precedence!

wmp
0
 
eagle-22Author Commented:
Do you know what syntax I should use?  Something like this?

sendmail -F"User Name <user@domain.com>"

I am trying some different variations but it is not coming out right.
0
 
woolmilkporcCommented:
Your example should work!

0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
eagle-22Author Commented:
When I look at the email in Outlook, the Display name is 'User Name <user@domain.com>', which is fine, but the E-mail address is 'root@ibm520.domain.com'

So I would like the E-mail address to just be 'user@domain.com'
0
 
woolmilkporcCommented:
Try changing the From: field in your input file.

To masquerade the domain of all your emails you could change the "DM" macro in sendmail.cf, but that's a global setting! Additionally, the username must not appear in the "CE" macro.

I don't see other options at the moment, sorry!

wmp
0
 
eagle-22Author Commented:
I didn't get the answer I was looking for, but your comment helped.
0
All Courses

From novice to tech pro — start learning today.