Solved

AIX sendmail command

Posted on 2010-11-22
6
917 Views
Last Modified: 2012-05-10
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

0
Comment
Question by:eagle-22
  • 3
  • 3
6 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 34191812
Hi,

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

wmp
0
 
LVL 3

Author Comment

by:eagle-22
ID: 34192113
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
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34192126
Your example should work!

0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 3

Author Comment

by:eagle-22
ID: 34192183
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
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 34192306
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
 
LVL 3

Author Closing Comment

by:eagle-22
ID: 34244137
I didn't get the answer I was looking for, but your comment helped.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Coding C# in Linux 8 133
android secure ftp 3 52
Why  my code (program) build with old compiler? 11 78
insert flat files in to tables based upon first character 1 18
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question