[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Exim Rewrite for anonymous member list remailing

Posted on 2013-01-18
14
Medium Priority
?
341 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Suggested Courses

650 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