RE: Postoffice with virtual mailbox and a Maildrop issue [SOLVED]

2009-03-09 Thread Rocco Scappatura
Hello,

  Rocco Scappatura a écrit :
   [snip]
   Why the message is not delivered immediately to the virtual mailbox
  after
   vacation filter?
  
 
  because the domain is not listed as a virtual mailbox domain
 
 At first glance, I shoud say as above too, but I swear that the query
 is exactly the one I have reported.
 
   # postmap -q  t...@receiver.tld
   proxy:mysql:/etc/postfix/mysql-virtual-domain.cf
   receiver.tld
   virtual_mailbox_domains is looked up with the domain name as the
  key,
   not the email address. Show the output from the right command.
  
   # postmap -q domain.tld proxy:mysql:/etc/postfix/mysql-virtual-
  domain.cf
   #
  
   :-(
  
   But:
  
   # cat /etc/postfix/mysql-virtual-domain.cf
   .
   .
   query = select domain from domain where domain = '%d' and active =
 1
  
   return me correctly:
  
   ++
   | domain |
   ++
   | domain.tld |
   ++
  
   mmmhhh!?!?!?
 
  you'll need to make sure you run the right sql queries when testing
 and
  that your .cf has the right hosts, user, ... etc.
 
 Also the db configuration parameter in postfix configuration files are
 correct..

Not completely.. Infact, I have read carefully mysql_table man and I see that 
the right query is:

query = select domain from domain where domain = '%s' and active = 1

because postfix evidently passes the domain part of the recipient for lookup.. 
while I erroneously thought the the entire recipient was looked up..

I'm sorry,

rocsca


Re: Postoffice with virtual mailbox and a Maildrop issue

2009-03-07 Thread Rocco Scappatura
Thanks Magnus,

 append_at_myorigin = no

deleted.

 I have the problem that mail destined to local virtual mailbox is not
 delivered locally, even if all looks up succesfully confirm tha the
 message have to be delivered locally:

 So what does happen to the messages?

At the moment, I'm configuring the platform, so the messages tries to go
to the mail server pointed out by the MX for the domain receiver.tld:

Mar  7 10:06:01 mail1 postfix/smtpd[14046]: connect from
gw.tld[xxx.yyy.zzz.uuu]
Mar  7 10:06:01 mail1 postfix/smtpd[14046]: EF43674001:
client=gw.tld[xxx.yyy.zzz.uuu]
Mar  7 10:06:01 mail1 postfix/cleanup[14049]: EF43674001:
message-id=362aba71262c41a898506470939c1...@stt.loc
Mar  7 10:06:02 mail1 postfix/smtpd[14046]: disconnect from
gw.tld[xxx.yyy.zzz.uuu]
Mar  7 10:06:02 mail1 postfix/qmgr[13967]: EF43674001:
from=sen...@domain.tld, size=2893, nrcpt=1 (queue active)
Mar  7 10:06:02 mail1 postfix/pickup[13966]: 2A6A174002: uid=7011
from=sen...@domain.tld
Mar  7 10:06:02 mail1 postfix/cleanup[14049]: 2A6A174002:
message-id=362aba71262c41a898506470939c1...@stt.loc
Mar  7 10:06:02 mail1 postfix/pipe[14050]: EF43674001: to=Mar  7 10:06:01
mail1 postfix/smtpd[14046]: connect from gw.tld[xxx.yyy.zzz.uuu]
Mar  7 10:06:01 mail1 postfix/smtpd[14046]: EF43674001:
client=gw.tld[xxx.yyy.zzz.uuu]
Mar  7 10:06:01 mail1 postfix/cleanup[14049]: EF43674001:
message-id=362aba71262c41a898506470939c1...@stt.loc
Mar  7 10:06:02 mail1 postfix/smtpd[14046]: disconnect from
gw.tld[xxx.yyy.zzz.uuu]
Mar  7 10:06:02 mail1 postfix/qmgr[13967]: EF43674001:
from=sen...@domain.tld, size=2893, nrcpt=1 (queue active)
Mar  7 10:06:02 mail1 postfix/pickup[13966]: 2A6A174002: uid=7011
from=sen...@domain.tld
Mar  7 10:06:02 mail1 postfix/cleanup[14049]: 2A6A174002:
message-id=362aba71262c41a898506470939c1...@stt.loc
Mar  7 10:06:02 mail1 postfix/pipe[14050]: EF43674001:
to=r...@domain.tld, relay=filter, delay=0.2, delays=0.04/0/0/0.16,
dsn=2.0.0, status=sent (delivered via filter service)
Mar  7 10:06:02 mail1 postfix/qmgr[13967]: EF43674001: removed
Mar  7 10:06:02 mail1 postfix/qmgr[13967]: 2A6A174002:
from=sen...@domain.tld, size=3006, nrcpt=1 (queue active)
Mar  7 10:06:05 mail1 postfix/smtp[14061]: connect to
mx1.for.domain.tld[xxx1.yyy.zzz.uuu]:25: No route to host
Mar  7 10:06:08 mail1 postfix/smtp[14061]: connect to
mx2.for.domain.tld[xxx2.yyy.zzz.uuu]:25: No route to host
Mar  7 10:06:08 mail1 postfix/smtp[14061]: 2A6A174002:
to=r...@domain.tld, relay=none, delay=6.1, delays=0.08/0/6/0, dsn=4.4.1,
status=deferred (connect to mx1.for.domain.tld[xxx1.yyy.zzz.uuu]:25: No
route to host)
, relay=filter, delay=0.2, delays=0.04/0/0/0.16, dsn=2.0.0, status=sent
(delivered via filter service)
Mar  7 10:06:02 mail1 postfix/qmgr[13967]: EF43674001: removed
Mar  7 10:06:02 mail1 postfix/qmgr[13967]: 2A6A174002:
from=sen...@domain.tld, size=3006, nrcpt=1 (queue active)
Mar  7 10:06:05 mail1 postfix/smtp[14061]: connect to
mx1.for.domain.tld[xxx1.yyy.zzz.uuu]:25: No route to host
Mar  7 10:06:08 mail1 postfix/smtp[14061]: connect to
mx2.for.domain.tld[xxx2.yyy.zzz.uuu]:25: No route to host
Mar  7 10:06:08 mail1 postfix/smtp[14061]: 2A6A174002:
to=r...@domain.tld, relay=none, delay=6.1, delays=0.08/0/6/0, dsn=4.4.1,
status=deferred (connect to mx1.for.domain.tld[xxx1.yyy.zzz.uuu]:25: No
route to host)

Indeed, I'm using a vacation filter too. But, as there is no vacation
configured for recipient r...@domain.tld, the message should be delivered
in (local) virtual mailbox after vacation filter. Instead, I suspect that
the dns is looked up and the message is tried to be delivered to the
responsible MX for domain domain.tld (mx1.for.domain.tld and
mx2.for.domain.tld, which is not reacheable from the network on which I
setting up the postoffice).

Why the message is not delivered immediately to the virtual mailbox after
vacation filter?

 # postmap -q  t...@receiver.tld
 proxy:mysql:/etc/postfix/mysql-virtual-domain.cf
 receiver.tld

 virtual_mailbox_domains is looked up with the domain name as the key,
 not the email address. Show the output from the right command.

# postmap -q domain.tld proxy:mysql:/etc/postfix/mysql-virtual-domain.cf
#

:-(

But:

# cat /etc/postfix/mysql-virtual-domain.cf
.
.
query = select domain from domain where domain = '%d' and active = 1

return me correctly:

++
| domain |
++
| domain.tld |
++

mmmhhh!?!?!?

rocsca



Re: Postoffice with virtual mailbox and a Maildrop issue

2009-03-07 Thread mouss
Rocco Scappatura a écrit :
 [snip]
 Why the message is not delivered immediately to the virtual mailbox after
 vacation filter?
 

because the domain is not listed as a virtual mailbox domain

 # postmap -q  t...@receiver.tld
 proxy:mysql:/etc/postfix/mysql-virtual-domain.cf
 receiver.tld
 virtual_mailbox_domains is looked up with the domain name as the key,
 not the email address. Show the output from the right command.
 
 # postmap -q domain.tld proxy:mysql:/etc/postfix/mysql-virtual-domain.cf
 #
 
 :-(
 
 But:
 
 # cat /etc/postfix/mysql-virtual-domain.cf
 .
 .
 query = select domain from domain where domain = '%d' and active = 1
 
 return me correctly:
 
 ++
 | domain |
 ++
 | domain.tld |
 ++
 
 mmmhhh!?!?!?

you'll need to make sure you run the right sql queries when testing and
that your .cf has the right hosts, user, ... etc.



Postoffice with virtual mailbox and a Maildrop issue

2009-03-06 Thread Rocco Scappatura
Hello,

I'm setting up a postoffice platform based on
Postfix+Courier-authlib-Courier-IMAP-Maildrop.

Here my postfix parameters:

# postconf -n
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
append_at_myorigin = no
append_dot_mydomain = no
bounce_size_limit = 1
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
disable_vrfy_command = yes
html_directory = no
local_recipient_maps = $alias_maps, unix:passwd.byname
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
message_size_limit = 3584
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = posta.domain.tld
myhostname = posta.domain.tld
mynetworks = xxx.yyy.zzz.uuu/27, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
proxy_read_maps = $virtual_mailbox_domains $virtual_alias_maps
$virtual_mailbox_maps proxy:mysql:/etc/postfix/mysql-virtual-domain.cf
proxy:mysql:/etc/postfix/mysql-virtual-alias.cf
proxy:mysql:/etc/postfix/mysql-virtual-mailbox.cf
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_etrn_restrictions = reject
smtpd_helo_required = yes
smtpd_sasl_auth_enable = no
unknown_local_recipient_reject_code = 550
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual-alias.cf
virtual_gid_maps = static:1021
virtual_mailbox_base = /home/virtual
virtual_mailbox_domains =
proxy:mysql:/etc/postfix/mysql-virtual-domain.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual-mailbox.cf
virtual_transport = maildrop
virtual_uid_maps = static:1021

I have the problem that mail destined to local virtual mailbox is not
delivered locally, even if all looks up succesfully confirm tha the
message have to be delivered locally:

# postmap -q  t...@receiver.tld
proxy:mysql:/etc/postfix/mysql-virtual-domain.cf
receiver.tld

# postmap -q  test@ receiver.tld
proxy:mysql:/etc/postfix/mysql-virtual-alias.cf
test@ receiver.tld

# postmap -q  t...@receiver.tld
proxy:mysql:/etc/postfix/mysql-virtual-mailbox.cf
receiver.tld /test@ receiver.tld/

Indeed it could  be a matter of maildrop filter:

maildrop  unix  -   n   n   -   -   pipe
flags=Ru user=vmail argv=/usr/local/bin/maildrop -d ${recipient}

But I have also tried to disable it (commenting the lines above in
/etc/postfix/master.cf and commenting the interested lines in
/etc/postfix/main.cf).

Where is the mistake?

Thanks

rocsca


Re: Postoffice with virtual mailbox and a Maildrop issue

2009-03-06 Thread Magnus Bäck
On Friday, March 06, 2009 at 18:15 CET,
 Rocco Scappatura rocco.scappat...@infracom.it wrote:

[...]

 append_at_myorigin = no

This is not supported by Postfix. Use it at your own peril.

[...]

 I have the problem that mail destined to local virtual mailbox is not
 delivered locally, even if all looks up succesfully confirm tha the
 message have to be delivered locally:

So what does happen to the messages?

 # postmap -q  t...@receiver.tld
 proxy:mysql:/etc/postfix/mysql-virtual-domain.cf
 receiver.tld

virtual_mailbox_domains is looked up with the domain name as the key,
not the email address. Show the output from the right command.

[...]

 Indeed it could  be a matter of maildrop filter:
 
 maildrop  unix  -   n   n   -   -   pipe
 flags=Ru user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
 
 But I have also tried to disable it (commenting the lines above
 in /etc/postfix/master.cf and commenting the interested lines in
 /etc/postfix/main.cf).

Disabling an unused service seldom makes any difference.

-- 
Magnus Bäck
mag...@dsek.lth.se