?
Solved

Exim Rewrite for anonymous member list remailing

Posted on 2013-01-18
14
Medium Priority
?
336 Views
Last Modified: 2014-01-30
Hi,

I wonder if somebody could shed some light on whether it is possible to rewrite the From field of an outbound message to the BCC field on certain domains.

Example:
anyuser@anyexternaldomain.com sends a message to abc@internaldomain.com, for the BCC field he uses user1@internaldomain.com

Exim then rewrites the the From field of the message from anyuser@anyexternaldomain.com to the value of the BCC (user1@internaldomain.com) before the message is processed through /etc/valiases

I came across Exim Specification - 33 Address rewriting, but I don't see how I would fetch the value of the BCC field in the rewrite.

Any pointers are appreciated. Ideally, if you could show an example, you'd make my day!
0
Comment
Question by:jdailey59
[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
  • 5
  • 4
  • 2
  • +1
14 Comments
 

Author Comment

by:jdailey59
ID: 38793518
I have 2 lists
1. alias: real email and 2. real email: alias
I tried this Exim configuration to accomplish what I'm trying to do but it doesn't work - if anyone knows how to make this work it would be a good solution as well:

Remail Configuration.


Part 1)    - Registered Users
    # /etc/freeport.aliases
    # (standard alias file)
    local_username:    your.real@???


part 2) - Reply Address
    # /etc/freeport.users
    # (basically, the reverse of the above file)
    your.real@???:        Local.username


part 3) - The Exim Director
   remailer:
    domains = freeport.itmagic.ltd.uk  (or whatever)
    driver = aliasfile
    search_type = lsearch
    file = /etc/freeport.aliases
    headers_remove = From:Reply_To
    headers_add = "From: ${lookup{$sender_address}\
        lsearch{/etc/freeport.users}\
        {${value}@???}\
        {${sender_address}}}"
0
 
LVL 37

Expert Comment

by:ArneLovius
ID: 38802737
I'm going to ask the dumb question here, what is the bigger picture that you are trying to achieve ?

As an example, I asked a question recently (not on here) detailing the overall end result I wanted, the way I was trying to do it and a problem that I had encountered, the first reply suggested a huge simplification which removed the problem that I had encountered, it was also a particularly obvious method which I simply hadn't seen until it was pointed out, sometimes you can't see the wood for the trees...
0
 

Author Comment

by:jdailey59
ID: 38804240
We have a subscription network with members who need to send messages to each other anonymously. There is an internal messaging system in place but it's problematic for certain member configurations. We decided to let them communicate with each other using their own email and email clients, however each member's true email must remain undisclosed. We have a forwarding list in place which works fine, it's simple - member_number@domain.com: true_email@anotherdomain.com, so if you send and email to member_number@domain.com it will be redirected to true_email@anotherdomain.com, but your true email will be visible as the sender to the member you send it to, which is normal because your email client provides this information. In theory Exim is capable of rewriting the email headers and replacing the FROM before delivering the message - this is what we're trying to accomplish, so when member A sends an email to member B, member B will see as sender member_number_A@domain.com and when member B replies (using his own email client), member A will receive a message from member_number_B@domain.com. I know I can easily modify the email header info with PHP but I want to avoid using a web form and do this simply through a mailto link and have Exim change the FROM before sending.
0
Supports up to 4K resolution!

The VS192 2-Port 4K DisplayPort Splitter is perfect for anyone who needs to send one source of DisplayPort high definition video to two or four DisplayPort displays. The VS192 can split and also expand DisplayPort audio/video signal on two or four DisplayPort monitors.

 
LVL 37

Expert Comment

by:ArneLovius
ID: 38804585
You are using aliases for delivery. You can do a similar thing for sender address substitution, usually it would be used to change $username to $fullname, but you could have "anything" there.

This would however means that people couldn't send from "any" email client, they would have to send using a mail client that used the "internaldomain" as the from, this could be enforced by only accepting emails that were "From:" the internal domain.

What you are trying to achieve is close to a "nym server" but without the encryption, I've had a quick search but not found much apart from http://blog.phrog.org/2007/05/12/nymserv-install-notes/ and the github page linked from it.
0
 

Author Comment

by:jdailey59
ID: 38804982
I couldn't control which email client the members use.

I've never heard of a nym server but will look into this.

Exim is supposed to be able to do this, are there any Exim experts out there who could clarify why this example doesn't work? It doesn't throw any errors and there's nothing in the logs.

Part 1) - Registered Users
# /etc/freeport.aliases
# (standard alias file)
local_username: your.real@???


part 2) - Reply Address
# /etc/freeport.users
# (basically, the reverse of the above file)
your.real@???: Local.username


part 3) - The Exim Director
remailer:
domains = freeport.itmagic.ltd.uk (or whatever)
driver = aliasfile
search_type = lsearch
file = /etc/freeport.aliases
headers_remove = From:Reply_To
headers_add = "From: ${lookup{$sender_address}\
lsearch{/etc/freeport.users}\
{${value}@???}\
{${sender_address}}}"
0
 
LVL 40

Expert Comment

by:noci
ID: 38805585
Maybe this helps, it uses exim as mailer, but a special server to process the mails.

https://github.com/pymander/nymserv

There are more places where the users identity can be revealed like the unique mail hash for getting conversation together.
0
 
LVL 37

Expert Comment

by:ArneLovius
ID: 38805782
@noci as linked to in the link that I posted...
0
 
LVL 40

Expert Comment

by:noci
ID: 38806595
Ok didn't read that link though.
0
 
LVL 37

Expert Comment

by:ArneLovius
ID: 38807091
not a problem :-)

If two of use could only find the same pages, then there quite possibly is very little source out there...
0
 

Expert Comment

by:eran123
ID: 38993445
Hi jdailey59,

I'd like to have the same service at my site.
If you came up with anything useful since, I would appreciate if you can share.

Kind Regards,
Eran.
0
 

Accepted Solution

by:
jdailey59 earned 0 total points
ID: 39809159
No solution was found to accomplish exactly what was needed, so the project was abandoned.
0
 

Author Closing Comment

by:jdailey59
ID: 39820332
No solution was found to accomplish exactly what was needed, so the project was abandoned.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses
Course of the Month8 days, 3 hours left to enroll

765 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