If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):
From: Roberto Zini <fred@strhold.it>
Subject: Re: Sendmail
Date: Thu, 01 Feb 2001 09:25:23 +0100
References: <95a1gp$57e$1@nnrp1.deja.com>
timford@my-deja.com wrote:
>
> Hello,
> I have a unix machine running Sco 5.0.6. I have installed
> Sendmail, from the 5.0.6 cd. The version is 8.9.3. I have my box
> masquerading as another domain. This box will only be used to send
> email. I want to be able to map my username to the name of my exchange
> account, so that the reply will be back to my exchange account. If I
> login as Tim, on my unix machine, I want the sender to look as tford
> instead of Tim@this domain. Any suggestion is welcomed. Thanks in
> advance.
>
> Sent via Deja.com
> http://www.deja.com/
Hi !
I'm not a great Sendmail expert but a while ago I faced a similar
problem when a customer wanted to "masquerade" all the messages
from an Internet connected OS5 box as they were from a single,
well defined users. As an example, any message composed on the server
by whoever had to appear as if it was from a single, pre-defined
user such as "foo@coyote.com"
To do the trick, I modified sendmail.cf as follows:
1) I've created a Dm macro containing the dummy email address, as follows
Dmfoo@coyote.com
2) I've modified the S11 rule as follows :
S11
###
# This is the key
R$+$: < $M >
###
R$+$: $>51 $1 sender/recipient common
R$* :;<@> $@ $1 :; list:; special case
R$*$@ $>61 $1 qualify unqual'ed names
...
...
Don't touch the rest of the rule.
3) The same goes with rule S31, as follows :
S31
###
# This is the key
R$+$: < $M >
###
R$+$: $>51 $1 sender/recipient common
R$* :; <@> $@ $1 :; list:; special case
...
...
The effect of the above changes should be noticed when sendmail
actually sends the message; in fact, if you log in as (eg)
fred@strhold.it and compose a message, mailq will report
the message being queued as it was from "fred@strhold", as
in the following example :
Mail Queue (1 request)
--Q-ID-- --Size--
----Q-Time-----------------Sender/Recipient------------
MAA22338 402 Fri Nov 5 12:51 <fred@strhold.it>
<test@dummy.foo>
This is expected; when sendmail will actually try to
send the message it'll expand the above macro thus
giving the expected results, as depicted in the following
excerpt from a "sendmail -q -v" run :
Running MAA22338 (sequence 1 of 1)
Connecting to .....
>>> MAIL From:<foo@coyote.com> SIZE=45
250 <foo@coyote.com>... Sender ok
>>> RCPT To:<test@dummy.foo>
250 <test@dummy.foo>... Recipient ok
>>> DATA
354 Enter mail, end with "." on a line by itself
>>> .
250 Q AA22338 Message accepted for delivery
Please notice that the above trick was done with Sendmail 8.8.8
(the one which originally comes with SCO OS 5.0.5) which
has been updated with SCO OS 5.0.6 so I can't assure you that
it'll work under that platform.
Hope this helps !
Best,
Roberto
--
---------------------------------------------------------------------
Roberto Zini email : fred@strhold.it
Technical Support Manager -- Strhold Sistemi EDP Reggio Emilia(ITALY)
---------------------------------------------------------------------
"Has anybody around here seen an aircraft carrier?"
(Pete "Maverick" Mitchell - Top Gun)
Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)
| Views for this page | ||||
|---|---|---|---|---|
| Today | This Week | This Month | This Year | Overall |
| 1 | 14 | 14 | 1,051 | 4,234 |
/Bofcusm/984.html copyright 1997-2004 (various authors) All Rights Reserved
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Add your comments
comment on this page here