Le 03/12/2010 17:39, mouss a écrit :
Le 03/12/2010 17:28, Ben a écrit :
Le 01/12/2010 17:52, Christoph Anton Mitterer a écrit :
On Wed, 2010-12-01 at 17:41 +0100, Ben wrote:
Postfix choose
local to deliver the mail, but I can't find why. I would like it uses
maildrop instead.
You need to set up your hosted domains to be virtual hosted
(http://www.postfix.org/VIRTUAL_README.html).

Or change the transport for local delivery...


Thank you for your reply.
I have a lot of difficulties to set up what I want with Postfix...

The box have a mass hosting software that came with its own postfix
configuration. I just want to modify it slightly to use maildrop to sent
spam in an IMAP spam folder instead of inbox.

By default, local is used for delivering. Setting
virtual_mailbox_domains correctly allowed me to use maildrop transport
for delivering. But it breaks email relaying (ex : t...@test.com must be
delivered locally, and forwarded to t...@anotherdomain.com). The local
delivery works (with maildrop), but the mail is not forwarded (User
unknown in virtual mailbox table (state 14)).

So, I've tried to use maildrop for local_transport, but if I don't set
virtual_mailbox_domains, email have such a form :
user_domain....@mx1.myhost.com. So maildrop said user unknown. Command
output: Invalid user specified. It work only with u...@domain.com

It's hell so, as I don't know how the mass hosting software set Postfix,
and don't know well the postfix configuration...

Any help greatly appreciated !



you want:

- accept mail. it seems this already works for you

- pass mail to maildrop. apparently, you did so for virtual domains.
from your previous posts, you seem to have a problem with local mail. if
still, you'll need to configure postfix to pass such mail to maildrop.
there are many ways..

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
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.

- configure maildrop to accept user/recipient and to deliver where it
should. This is not a postfix issue. you'll get more help on the
maildrop-users mailing list.

- you can use maildrop for local and/or for virtual mailbox domains. you
can even use maildrop via transport_maps, in which case the domain
"class" doesn't matter.

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

- 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
alias_maps = mysql:/etc/postfix/myalias.cf hash:/etc/aliases
body_checks = regexp:/etc/postfix/body_checks
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/lib/postfix
default_destination_concurrency_limit = 10
default_privs = www-data
disable_vrfy_command = yes
header_checks = regexp:/etc/postfix/header_checks
home_mailbox = Maildir/
local_destination_concurrency_limit = 8
mail_owner = postfix
message_size_limit = 20480000
myhostname = mx1.test.com
mynetworks = 127.0.0.1 91.xxx.xxx.xxx 91.xxx.xxx.xxx
myorigin = mx1.test.com
queue_directory = /var/spool/postfix
smtp_tls_CApath = $smtpd_tls_CApath
smtp_tls_dcert_file = $smtpd_tls_dcert_file
smtp_tls_dkey_file = $smtpd_tls_dcert_file
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, 
reject_invalid_hostname, reject_non_fqdn_hostname, reject_non_fqdn_sender, 
reject_non_fqdn_recipient, reject_unknown_recipient_domain, 
reject_unauth_pipelining, reject_unauth_destination, reject_rbl_client 
cbl.abuseat.org, reject_rbl_client sbl.spamhaus.org
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = postfix
smtpd_sasl_security_options = noanonymous
smtpd_tls_CApath = /etc/ssl/certs/
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = $smtpd_tls_dcert_file
smtpd_tls_dcert_file = /etc/ssl/private/ssl.test.com.pem
smtpd_tls_dkey_file = $smtpd_tls_dcert_file
smtpd_tls_key_file = $smtpd_tls_dcert_file
smtpd_tls_loglevel = 0
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
virtual_gid_maps = proxy:mysql:/etc/postfix/mygid.cf
virtual_mailbox_base = /
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mydomain.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/myvirtual.cf
virtual_minimum_uid = 1000
virtual_transport = maildrop
virtual_uid_maps = static:33

Reply via email to