Solved

altering sendmail From field

Posted on 1997-07-11
4
591 Views
Last Modified: 2013-12-26
I would like to alter the value of the From field that
sendmail uses.  Note that this is NOT the From: field (with the colon), it is the one without the colon, the one that is supplied with the SMTP MAIL FROM command.

I am running sendmail v 8.8.5-4 (the latest) and have tried
all sorts of things in /etc/sendmail.cf: setting
DM (masquerading)
CM  (some class)
O UnixFromLine=From bilbo@bogus.com $d
O SmtpGreetingMessage=blag@blorg.com Sendmail $v/$Z; $b
Dj$w.Foo.COM

none of these seem to make the smallest difference; in all cases, sendmail identifies the actual host, instead of using the masqueraded name.  What can I do?

0
Comment
Question by:linas
  • 2
4 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1293952
have you tried the  Cw  and  Dw  settings?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1293953
use the  Dl  macro, for example:

DlFrom $g  $d

(assumed that $g is set up to your desires)
0
 
LVL 1

Author Comment

by:linas
ID: 1293954
In the V7/Berkeley format for sendmail.cf (version 8.8.5) the
$l macros are replaced by the
O UnixFromLine=From $g $d
line.  

I tried the old-style format suggested above; neither DlFrom
nor the new O UnixFromLine seem to make any difference ...

0
 

Accepted Solution

by:
adso earned 200 total points
ID: 1293955
I would advise you to generate the .cf using m4 from templates
supplied with sendmail distribution (in the cf subdirectory).
Here is what you should do:

1) Create a domain file (e.g. foo.m4) in cf/domain containing lines
FEATURE(masquerade_envelope)dnl # This is the main point
MASQUERADE_AS(foo_bar_baz)dnl
(you may want other features, have a look at files in cf/domain)

2) create a file foo-system.mc in the cf/cf directory saying
divert(0)dnl
OSTYPE(solaris2)dnl
DOMAIN(mimuw.hidden)dnl
MAILER(local)dnl
MAILER(smtp)dnl
(substituting your system for solaris2)

3) generate the .cf according to docs, i.e. by
m4 ../m4/cf.m4 foo-system.mc > foo.cf
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now