Le 03/12/2010 17:56, Ben a écrit :
[snip]
All domains are virtual, I managed to pass all mails to maildrop, it
works. The problem is that in this configuration, mail are not relayed
to other hosts when the user configure mail redirection.
A user can tell : keep the received mail in my mail account, and send a
copy to any...@anyhost.com

The big question is: how do they do that?
if they edit .forward, well, for sure that won't work.

if mail is passed to maildrop, users will need maildrop filtering snippets...

or the forwarding must happen before delivery. for example, with virtual_alias_maps:

j...@example.com                j...@example.com, j...@forward.example.net

will clone the message. then you can configure postfix to relay the second address to where it should go. if you want .forward functionality,
replace forward.example.net with a domain listed under mydestination.

That's this fonctionnality that doesn't works anymore.

I noticed that when I configure domains to be virtual (with
virtual_mailbox_domains setting), the mails have a
test_thehost....@mx1.mybox.com shape.
When I don't do this setup, mails have a t...@thehost.com shape.
Maybe it's related to the relay problem.

postfix doesn't do that by default. so you either have something configured to do the rewrite or mail is processed by something external to postfix.

most probably:

- you used a virtual alias to rewrite
t...@thehost.com        test_thehost.com

- myorigin is set to mx1.mybox.com, thus test_thehost.com becomes test_thehost....@mx1.mybox.com

if it's that, then fix your virtual alias entry: add the domain part explicitely. see the example I've given above (the one with "joe...").

PS. that doesn't match your claimed 'postconf -n' (your postconf -n says "myorigin=mx1.test.com", not mx1.mybox.com). When you hide private infos, do so coherently. Otherwise, you're only making it hard for us to help you...

and anyway, do not hijack valid domains such as test.com and mybox.com. Use example.com, example.net, example.org or *.example.



I would like to always use maildrop for delivering, but mail redirection
don't works anymore when I do that.

you can either redirect before passing mail to maildrop (example above), or redirect in maildrop (maildrop has a CC and TO commands, among other things).


- if you use maildrop with virtual domains, you'll need to tell maildrop
how to find the user and his config (mailbox location, ...). This is a
maildrop configuration question.

You're true, I can set local_transport to maildrop, and try to setup
maildrop to deal correctly with test_thehost....@mx1.mybox.com mail form.
But I don't understand why mail redirection doesn't work anymore when I
set domains virtual and mail have a form of t...@thehost.com shape.

I join my postconf -n

Thank you very much for your help.

Ben

Reply via email to