Solved

Exim Rewrite for anonymous member list remailing

Posted on 2013-01-18
14
315 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
  • 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 36

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
 
LVL 36

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 39

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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 36

Expert Comment

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

Expert Comment

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Resolve DNS query failed errors for Exchange
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now