Transition from UNIX to Linux and in sendmail purgatory
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Transition from UNIX to Linux and in sendmail purgatory
Good afternoon,
New to Linux (since Monday) and have encountered a few things with sendmail that need some solutions to.
Bit of background. We took our same sendmail construct from UNIX in LINUX. Basic code structure is as follows
------------
mpack -s "Morning Report" -d <report text body> -o <report tempfile> morningspreadsheet.xls
It will send the email but we have noticed the following
1.) the "To" tag is currently always blank
2.) the "From" does not show a from name but it shows the name of the process that is running with the recipient address. For example "root (personwhoworkshere@thiscompany.com)" instead of "My Name (personwhoworkshere@thiscompany.com)"
Is there any means of working with the current options to get the "To" tag to show and fix the name of the "From"? So far we have deduced that we will have to create a text with this information in it in order to do. However, if there is a way to do this without having to update a few hundred text files that would be great.
sendmail should behave the same in Linux as it does in Unix: the source is the same.
The sendmail command you specify doesn't set a recipient in the header; use the -t switch.
Use the -F switch to set the sender's 'full name'. Different e-mail clients show different 'from' for the same message. Different recipients are seeing it differently.
Perhaps you have a different sendmail.cf - though I don't know what differences would cause the difference you report.
You should specify your distro, so we could help you better. Depending on distro, if sendmail is not installed, the sendmail command is linked to a compatibility binary of the installed smtp server s/w (like postfix, qmail, exim etc).
So while for the real sendmail, the -f switch is correct and it should work in your example, in the compatibility binaries it may not work.
That said, you can use mutt, or mail/mailx to do your job. E.g:
sendmail should behave the same in Linux as it does in Unix: the source is the same.
The sendmail command you specify doesn't set a recipient in the header; use the -t switch.
Use the -F switch to set the sender's 'full name'. Different e-mail clients show different 'from' for the same message. Different recipients are seeing it differently.
Perhaps you have a different sendmail.cf - though I don't know what differences would cause the difference you report.
Thank you for your response. Perhaps I am not reading the man page correctly but the -t options reads like it will pull the "to:" from a file. With the sendmail we did not have that in the text since we could include it as an option. We are trying to not have to update each of the files to include the "From:" and "To:" information if possible.
You should specify your distro, so we could help you better. Depending on distro, if sendmail is not installed, the sendmail command is linked to a compatibility binary of the installed smtp server s/w (like postfix, qmail, exim etc).
So while for the real sendmail, the -f switch is correct and it should work in your example, in the compatibility binaries it may not work.
That said, you can use mutt, or mail/mailx to do your job. E.g:
Question, for using mail/mailx. I thought you would have to have a file with the To and From in order to use the option that would extract them. Is that not the case?
Question, for using mail/mailx. I thought you would have to have a file with the To and From in order to use the option that would extract them. Is that not the case?
Nope. You can give the From address at command line.
But again it depends on distro, that's why I've asked you to tells us the Linux distribution you're running.
Anyway if you don't want to use mutt as in my example above, read the manpage of mail/nail/mailx (whatever your distro uses) to find the correct options.
I agree with Bathory, tell us your distro.
A lot of modern distros have moved on eg RHEL derived systems have moved on to postfix.
Even if if you then install sendmail, it might not actually be what's running.
i agree with bathory, tell us your distro.
A lot of modern distros have moved on eg rhel derived systems have moved on to postfix.
Even if if you then install sendmail, it might not actually be what's running.
We are open at this point but we were trying to not have to rewrite a bunch of programs if we do not have to. Is there something with RHEL 7 and sendmail not being compatible? Is there something with postfix that would help to keep using sendmail?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.