2 beautifull postfix problems
2. I have a virtual email address
Thanks in advance for any answers or directions.
4 Replies
@jlinos:
1. Someone with email
user1@domain.com sends email toclient@other.com . I want to know if there is a way in postfix to changeuser1@domain.com email address inuser2@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:
@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:
user1@domain.com user2@domain.com
Once you have created the map, you can refer to it in your main.cf with this:
sender_canonical_maps = hash:/etc/postfix/
@jlinos:
2. I have a virtual email address
media@domain.com that expands to a lot of clients' email addresses, and when a useruser1@domain.com sends email to this address it goes to all his clients. Now if he sets To: tomedia@domain.com the clients can see that and if one of the clients sends email tomedia@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 onlyuser1@domain.com can send email tomedia@domain.com and no other. Right now I have a workaround and he sends email with To: to a bogus email address and Bcc: tomedia@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
Good luck!
@inkblot:
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:
@dorothy.movealong.org @movealong.org
You don't need canonical maps for that. Just put
masquerade_domains = $mydomain
masquerade_exceptions = webmaster, root
in your main.cf
@jlinos:
2. I have a virtual email address
media@domain.com that expands to a lot of clients' email addresses, and when a useruser1@domain.com sends email to this address it goes to all his clients. Now if he sets To: tomedia@domain.com the clients can see that and if one of the clients sends email tomedia@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 onlyuser1@domain.com can send email tomedia@domain.com and no other. Right now I have a workaround and he sends email with To: to a bogus email address and Bcc: tomedia@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
@sednet:
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.