Solved

Rewriting a From Address in Sendmail V8

Posted on 2000-03-14
3
430 Views
Last Modified: 2010-04-21
How can I get sendmail to rewrite the from address.  As an example I have a  mail message going out with a from address of:
louis@life.com

I would like sendmail to rewrite the from address to bill@life.com.

No a replay to will not work.  The address is really an aliases to a list of people.   Maybe if there is a way to change the to address in to a bcc address and then create a replay to address that is the one I want???

Thanks,
Louis
0
Comment
Question by:brownjohn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2616935
You could do it with a custom sendmail rule if the person part was always the same, but that's kind of a lot of work.

How about changing the alias to point to, say a perl script that reads the message, and remails it to the real alias list with what you want as the From: address? That's pretty simple and straight-forward (and I think I've got a perl script around somewhere that that does something awfully close to that)
0
 
LVL 1

Expert Comment

by:sereda
ID: 2620037
Hmm...

Will not
  sendmail -f from@address
do the trick?

Or do i miss something?

0
 
LVL 2

Accepted Solution

by:
mapc earned 200 total points
ID: 2620586
This could be accomplished by the USERDB
feature.
First, sendmail must be compiled with USERDB, this can be checked with sendmail -adda or some other bogus debug flag which will show the  compiled in modules.
If it's not, then you must recompile it.
Then, you use feature(`USERDB')dnl in the .m4 config file, and create a database which consists of:
user <space> mailname: anotheruser
Simple as that.
The sendmail 9.10.0 states that LDAP could be used for *any* database which is used in it, so I haven't verified it, but it should be possible with sendmail 9.10.0 to use LDAP database instead of USERDB which is in DB2 format.
Another use for USERDB is creating entries like:
user<space> maildrop: anotheruser@anotherhost
which accomplishes something similar to aliases/forwarding..
Other way to accomplish what you want is to write manual rule for sender address.
It should have F and 'i' and '@' if I'm not mistaken, but this sort of information should be checked in the book.
Hope that it helps.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

762 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