sendmail - Sending emails from the machine with name of the HOSTNAME
Hi,
In my server I work with sendmail, for a long time I try to send emails from user "root" and get this mail with full name of the HOSTNAME machine. but in the from I only see "root" and not root@myhostname.com, when I add the LOCAL_USER(`root')dnl to /etc/mail/submit.mc file, it's work i see the root@myhostname.com but if I try to send mail from user "root" like - echo "bla" | mail -s "test" root i get this error: "root... User address required" in addition, I use a file ".forward" anybody know as a problem and know the solution ? If there is a solution with "aliases" file, I like to see an example... Thanks, Oz. |
http://www.linuxhomenetworking.com/w...x_Mail_Servers
the chapter "Using Sendmail to Change the Sender's Email Address " might be of interest.... or, kill sendmail, and stat using postfix :D |
Hi JSkywalker,
Thanks for the help... it work's, but if I send mail from "root" user I get the mail from "root" and not from "root@e1.mydomain.com" is there anything else you could recommend ? thanks again, Oren. |
sendmail masquerading
Oz,
There is a useful explanation of masquerading written by Eric Himself(tm) here. It sounds like you need to use EXPOSED_USER(`usernames') or EXPOSED_USER_FILE(`filename') in your sendmail.mc to ensure that the hostname is not masqueraded for system messages. You shouldn't need to mess with submit.mc. You might consider starting with a clean source tree and building a new sendmail.cf having modified only your sendmail.mc. Here is an easy cheat sheet for building sendmail and its config files. |
A quick question - I have noticed that system email arrive as sent from "root<root@e1.mydomain.com>", so in a way sendmail already adds the localhost.localdomain.
The problem is with the attached nickname (e.g. root<>), which makes it harder for us to read from cellular devices. Emails sent from other users arrive as sent from the raw address (e.g. "user@e1.wizaboo.com"). Do you have any idea how can we strip the nickname from the root user as well? |
sendmail address re-writing
Oz,
You can use the genericstable to re-write local addresses, both "From:" addresses and envelope addresses, to anything you choose. First, make the needed changes to your sendmail.mc: Code:
FEATURE(genericstable, hash /etc/mail/genericstable) Code:
root: root@SERVER1.domain.com Code:
makemap hash /etc/mail/genericstable.db < /etc/mail/genericstable Do something that causes system messages to be generated. Your sender address and envelope address should be masqueraded to the same address. |
Thanks,
I'll try to do it! Thanks again :) Oz. |
All times are GMT -5. The time now is 04:25 AM. |