 |
Linode.com Forum Linode Community Forums
|
| Author |
Message |
jlinos
Joined: 21 Oct 2004
Posts: 17
|
| Posted: Fri Oct 21, 2005 8:22 am Post subject: 2 beautifull postfix problems |
|
|
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. |
|
| Back to top |
|
inkblot
Joined: 08 Sep 2003
Posts: 62
Location: Bucharest
|
| Posted: Fri Oct 21, 2005 8:59 am Post subject: Re: 2 beautifull postfix problems |
|
|
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! |
|
| Back to top |
|
ptomblin
Joined: 04 May 2005
Posts: 24
Location: Rochester NY
|
| Posted: Tue Nov 08, 2005 7:33 am Post subject: Re: 2 beautifull postfix problems |
|
|
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 |
|
| Back to top |
|
sednet
Joined: 17 Mar 2004
Posts: 106
Location: Europe
|
| Posted: Tue Nov 08, 2005 10:06 am Post subject: Re: 2 beautifull postfix problems |
|
|
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. |
|
| Back to top |
|
ptomblin
Joined: 04 May 2005
Posts: 24
Location: Rochester NY
|
| Posted: Tue Nov 08, 2005 10:14 am Post subject: Re: 2 beautifull postfix problems |
|
|
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. |
|
| Back to top |
|
| |
|