Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Rewriting a From Address in Sendmail V8

Posted on 2000-03-14
3
Medium Priority
?
452 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
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 600 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

Industry Leaders: 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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

877 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