Solved

Rewriting a From Address in Sendmail V8

Posted on 2000-03-14
3
423 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 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
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.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

831 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