(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



masquerade sendmail mail user


What is this stuff?

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)




Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar


cartoon

/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.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.



More:
       - OSR5
       - Bofcusm


Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress