sendmail modifying "From" and "Reply-to" headers

sendmail modifying "From" and "Reply-to" headers

Post by Edward Bur » Thu, 25 Oct 2001 05:38:43



I am trying to figure out why sendmail is modifying the "From"
and "Reply-to" headers of mail being sent through, and better
yet, how to stop it from doing so.

I've read through the newsgroup here, and done a few searches
on google, but I can't find anything that's obviously related
to this. I'm not sure what to search on to narrow the search
any.

I am running sendmail 8.9.3 on red hat linux 6.2. I have it
configured to send mail directly, not to my ISP's mail
system. I have a few windows boxes on my LAN that send mail
through my linux box as a relay. Overall, this works without
any problems.

The problem comes from an interesting idea I read a few months
ago: using /etc/mail/virtusertable to create virtual users to
receive mail and pass it to a real user. I have created a
number of virtual users to hand out when giving an address to
someone I don't trust. When I start receiving spam, I can see
which virtual user it is sent to and from that determine who
let my address fall into the spammer's hands. This is working
great, too. For example, in /etc/mail/virtusertable, I have
an entry:



name, so don't bother sending mail there)

The problem is that when I send mail out with either the
"From" and/or "Reply-to" fields set to


message, it bounces with "user unknown". Sendmail is even
putting the correct real user's full name (from gecos field
in /etc/passwd) into the modified fields, so it is apparently
associating the virtual user with the real user. I can not
figure out why it is changing the host name in the email
address.

Can anyone tell me, or point me to information about, what I
need to change in the /etc/sendmail.cf file to make sendmail
stop doing this?

Thanks in advance,
Edward Burr

 
 
 

sendmail modifying "From" and "Reply-to" headers

Post by Neil W Ricker » Thu, 25 Oct 2001 07:40:35



>The problem is that when I send mail out with either the
>"From" and/or "Reply-to" fields set to



Do you, by any chance, have an "/etc/hosts" entry something
like

192.168.1.2     burr.cc email.burr.cc

This would imply that burr.cc is the real name, and email.burr.cc
is an alias.

 
 
 

sendmail modifying "From" and "Reply-to" headers

Post by Edward Bur » Fri, 26 Oct 2001 01:56:54




> >The problem is that when I send mail out with either the
> >"From" and/or "Reply-to" fields set to


> Do you, by any chance, have an "/etc/hosts" entry something
> like

> 192.168.1.2     burr.cc email.burr.cc

> This would imply that burr.cc is the real name, and email.burr.cc
> is an alias.

No, the only entry in /etc/hosts is 127.0.0.1 localhost.
I have a very complicated (I think) setup, but I haven't come
up with any better way of handling it.

I am using a Linksys router with port 25 forwarded to my linux
box for mail, so my only public IP address is actually the
linksys router, and it does NAT for my LAN to connect out.

My linux box is running a DNS server for my LAN, serving
internally the fake domain .homenet so my DNS lookup for this
box's IP address would return ns.homenet.

I am using DynDNS.org to associate burr.dyndns.org with my
DHCP-assigned IP address. I own the domain burr.cc, but the
DNS registry for that takes up to 2 days to update when my
address gets changed, so I have set the MX records for burr.cc
and email.burr.cc to point to burr.dyndns.org for a quicker
update.


for spam filtering I have a whole bunch of virtual users with

By creating these virtual users, and only giving each one out
to one specific individual or company, I can identify the
source of a spam contagion, invalidate that virtual user, and
chew out the source of the contagion.

In /etc/sendmail.cf there are lines:
# my official domain name
Dj$w.burr.cc
# masquerade as
DMburr.cc

Would these be causing the problem? If I were to take one or
both of these out, would sendmail stop modifying the fields?

I can accept sendmail modifying the "From" field, but I
wouldn't think it should ever modify the "Reply-to" field.
After all, isn't that field supposed to be specified by the
user to indicate a specific address for replies?

 
 
 

sendmail modifying "From" and "Reply-to" headers

Post by Edward Bur » Fri, 26 Oct 2001 06:45:25



> In /etc/sendmail.cf there are lines:
> # my official domain name
> Dj$w.burr.cc
> # masquerade as
> DMburr.cc

> Would these be causing the problem? If I were to take one or
> both of these out, would sendmail stop modifying the fields?

> I can accept sendmail modifying the "From" field, but I
> wouldn't think it should ever modify the "Reply-to" field.
> After all, isn't that field supposed to be specified by the
> user to indicate a specific address for replies?

Well, I finally figured it out. The masquerading caused it,
and it is even documented that it would produce this behavior.
I just didn't think to look there until after I posed the
question above.

I commented out the masquerading and changed the domain name
line to Djburr.cc and mail seems to be working the way I would
like.

Thanks for the comments and suggestions, everyone!

 
 
 

1. how to insert "Reply-to" header using UCB "mail"

    I use UCB mail (usually /usr/ucb/mail on Unix systems), and
am happy enough with it that I don't want to learn a new user
mail interface/program.

    However, when I send E-mail, I would like to have an appropriate
"reply-to" header line added, giving a more generic address than
whatever machine I happen to be on when I send the mail.

    I have figured out how to bludgeon the mailer into adding
header lines, by using the "sendmail" variable to use a script
that adds the desired header lines and pipes the modified message
into standard "sendmail".

However, this seems pretty kludgey to me,
    (not to mention that it requires explicit absolute paths,
    which have to be changed each time  my SAs decide that I
    should be on a different filesystem)
and so I wonder  if there is a better way.  Any ideas?

    Please send me E-mail; if enough people express an interest
(and I get a good answer), I will summarize for the net.

--

Courant Institute,NYU,USA     ...!cmcl2!cims.nyu.edu!mckenney   (UUCP)
Ob.Disclaimer: Even *I* don't take responsibility for what I post.
   NYU *definitely* doesn't, and, if challenged, would probably deny I wrote it.
--

Courant Institute,NYU,USA     ...!cmcl2!cims.nyu.edu!mckenney   (UUCP)
Ob.Disclaimer: Even *I* don't take responsibility for what I post.
   NYU *definitely* doesn't, and, if challenged, would probably deny I wrote it.

2. Simple question

3. How to tell "mail" program to use "Reply-To:" header?

4. what does the Tilda ~ do in C++ anyway?

5. Pine 4.31, "Setup", "Config", ..., "?" gives "Illegal instruction"

6. cable T.V & EQUIPMENT

7. "Reply-To" and "From" fields in Sendmail 8.8.8

8. migration RIPv1/v2 --> OSPF

9. Reply To "From" Instead Of "Reply-To"???

10. "@" in outgoing address changing to "-" or "#"

11. extracting the "from" or "reply-to" field?

12. Changing "from" or "reply-to"?

13. Set "From" and "Reply-To" fields: how to?