×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Trying to find the from: field in sendmail

Trying to find the from: field in sendmail

Trying to find the from: field in sendmail

(OP)
I am trying to locate the config file that stores the setting for the from: field in the sendmail program on a sco box.  I tried to manually overwrite it with mutt by using a .muttrc file but that doesn't seem to work.

Thanks

RE: Trying to find the from: field in sendmail

I don't know where it would be in your path but you want to open sendmail.mc with your favorite text editor.  It may also be called something else.  I just chose sendmail.mc because that is the most common.  Sendmail will use the server's name in the from address by default.  The server is usually specified in the mail client's configs.  If you are using a text client or command line it uses the hostname.  You didn't specify why you wanted to know so I'd have to guess and I could be wrong a lot of times before I hit the right one so I'll pass.  ...But after thinking about it, I can't just let you sit there with an open file can I?  If you want to have all the mail from your server show the same from: address, you can use the MASQUERADE_AS directive.  Edit or add this line:

CODE

MASQUERADE_AS(`mydomain.com')dnl

There may be a 'dnl' in front of the line. That means it is commented out.  Basically it's telling the macro compiler to disregard until it comes to a new line.  If it's commented out, just remove the dnl.  There are other forms of this directive but this one just modifies the domain part of the address.  Other can modify the header or envelope.  When you are done, close the file.  You're gonna find out sooner or later so I might as well tell you now.  Sendmail is never going to see or use this file.  It needs to be compiled with other mc files to create a config file called sendmail.cf.  There are a few ways to do it but the most common is to use the m4 macro compiler.  It already knows where all the mc files are.  It just needs to know where this particular one is.  It is rare that the other mc files get edited.  The command is very simple:

CODE

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

This is the path on most linux disros.  I'm not sure about unix so you will have to change it to whatever you path is.  If you are in the same directory as both sendmail.mc and sendmail.cf, obviously you don't need the path.  If this is nowhere near what you are asking, can you be a little more specific on what you are trying to do.  Sometimes knowing why you want to do something is even more important the knowing what because we may be able to do it a better way.

  

RE: Trying to find the from: field in sendmail

(OP)
Thanks RythmAce,

I found the stupid switch for mutt that allows me to change the from: field.  I added the -F switch

I used mutt -F /usr/app/p/.muttrc

and .muttrc had

my_hdr from: username <username@company.com>

dpanimal

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close