Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Oct 21, 2005 9:22 am 
Offline
Senior Newbie

Joined: Thu Oct 21, 2004 11:48 am
Posts: 17
1. Someone with email user1@domain.com sends email to client@other.com. I want to know if there is a way in postfix to change user1@domain.com email address in user2@domain.com at sending time?

2. I have a virtual email address media@domain.com that expands to a lot of clients' email addresses, and when a user user1@domain.com sends email to this address it goes to all his clients. Now if he sets To: to media@domain.com the clients can see that and if one of the clients sends email to media@domain.com then all the clients will receive that email, and that must not happen. So the question is: how can i forbidd in postfix that only user1@domain.com can send email to media@domain.com and no other. Right now I have a workaround and he sends email with To: to a bogus email address and Bcc: to media@domain.com, but I would like to know if there is also another way to do it.

Thanks in advance for any answers or directions.

_________________
jlin

http://www.jlin.ro
office@jlin.ro


Top
   
PostPosted: Fri Oct 21, 2005 9:59 am 
Offline
Senior Member
User avatar

Joined: Mon Sep 08, 2003 4:49 pm
Posts: 62
Location: Bucharest
jlinos wrote:
1. Someone with email user1@domain.com sends email to client@other.com. I want to know if there is a way in postfix to change user1@domain.com email address in user2@domain.com at sending time?


Yes, there is a way. What you need to do is create a sender canonical map which maps raw addresses onto rewritten addresses. I use one for local accounts on my mail server which contains the following:

Code:
@dorothy.movealong.org  @movealong.org


MUAs on my server will produce email with the FQDN of the server as the sender domain, which I rewrite to just the domain. The canonical map can map whole domains, like I do, or specific addresses. In your case, the map you need will look like this:

Code:
user1@domain.com user2@domain.com


Once you have created the map, you can refer to it in your main.cf with this:

Code:
sender_canonical_maps = hash:/etc/postfix/<your map name>


jlinos wrote:
2. I have a virtual email address media@domain.com that expands to a lot of clients' email addresses, and when a user user1@domain.com sends email to this address it goes to all his clients. Now if he sets To: to media@domain.com the clients can see that and if one of the clients sends email to media@domain.com then all the clients will receive that email, and that must not happen. So the question is: how can i forbidd in postfix that only user1@domain.com can send email to media@domain.com and no other. Right now I have a workaround and he sends email with To: to a bogus email address and Bcc: to media@domain.com, but I would like to know if there is also another way to do it.


Postfix also has recipient canonical maps, which will do the same thing as sender canonical maps except on the recipient address instead of the sender. I don't know if this will solve your problem, though, because I think after the address is rewritten the message is delivered to the new address and not the old. You may want to play around with this, though and see what you can get.

If there's no way to do this in Postfix, you could try setting up media@domain.com as a proper mailing list, for example using Mailman. I know that Mailman allows very fine-grained control over who is allowed to post messages to the list and who is not. I expect pretty much any mailing list manager would support that feature.

Good luck!


Top
   
PostPosted: Tue Nov 08, 2005 8:33 am 
Offline
Junior Member

Joined: Wed May 04, 2005 9:08 pm
Posts: 24
Website: http://xcski.com/blogs/pt/
Location: Rochester NY
inkblot wrote:
Yes, there is a way. What you need to do is create a sender canonical map which maps raw addresses onto rewritten addresses. I use one for local accounts on my mail server which contains the following:

Code:
@dorothy.movealong.org  @movealong.org



You don't need canonical maps for that. Just put
Code:
masquerade_domains = $mydomain
masquerade_exceptions = webmaster, root

in your main.cf


Top
   
PostPosted: Tue Nov 08, 2005 11:06 am 
Offline
Senior Member
User avatar

Joined: Wed Mar 17, 2004 4:11 pm
Posts: 554
Website: http://www.unixtastic.com
Location: Europe
jlinos wrote:
2. I have a virtual email address media@domain.com that expands to a lot of clients' email addresses, and when a user user1@domain.com sends email to this address it goes to all his clients. Now if he sets To: to media@domain.com the clients can see that and if one of the clients sends email to media@domain.com then all the clients will receive that email, and that must not happen. So the question is: how can i forbidd in postfix that only user1@domain.com can send email to media@domain.com and no other. Right now I have a workaround and he sends email with To: to a bogus email address and Bcc: to media@domain.com, but I would like to know if there is also another way to do it.


Set reply-to in your mailer to your email address?

It won't deny access to media@domain.com but it will stop people mailing it by accident.


Top
   
PostPosted: Tue Nov 08, 2005 11:14 am 
Offline
Junior Member

Joined: Wed May 04, 2005 9:08 pm
Posts: 24
Website: http://xcski.com/blogs/pt/
Location: Rochester NY
sednet wrote:
Set reply-to in your mailer to your email address?

It won't deny access to media@domain.com but it will stop people mailing it by accident.


You've never exchanged email with people who use Lotus Notes, have you? Notes doesn't handle Reply-To correctly. I don't know if that's true of all versions of Notes or just some, but there is a guy on my flying club mailing list who keeps sending his reply to the administrative address because of Notes.

Actually, for the original poster, I'd suggest he continue with BCCing, or set up a proper mailing list.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group