Solved

altering sendmail From field

Posted on 1997-07-11
4
589 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 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

21 Experts available now in Live!

Get 1:1 Help Now