Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Postfix change maildir to mbox after massive test (maildir limit?)

909 views
Skip to first unread message

Matteo Cappadonna

unread,
Jan 29, 2007, 5:30:01 AM1/29/07
to
Hi,

I've got some little problem to understanding postfix behaviors...

I've tried to build a system with postfix+mysql+courier (either
pop/imap)+clamav+spamassassin and roundcube, to serve about 200.000
mailbox (yes, i know it's not a best practise, but it's just a test).

My current configuration of main.cf acquire information for user's
profile from the mysql db, and store the mailbox into the
directory /usr/local/virtual

Now, when I'm sure of postfix configuration (mail are sent and delivery
correctly), I've to try a massive maildir creation test.

I see the mailbox directories are created when the first mail are sent
to an user; i've insert into mysql db 200.000 entry for users
1...@domain.it, 2...@domain.it and maildir directory
at /usr/local/virtual/domain.it/1...@domain.it, etc. and launch a scripts
who sent 200.000 mail to my server (1 for user).

But...

When mailbox creation are about at 150.000, postfix stops to create
maildir and starting with creationg of mbox file, without wrote any log
of this change.

I've search on the net, but I haven't found any information about
postfix maildir limit or other related limitations.

Today another problem it's born... I've removed all created maildir and
try to send a mail to user 1...@domain.it but... surprise... postfix have
created an mbox instead of maildir!!!

I've tried to deactivate clamav and spamassassin support for excluding
possible third party problems, but nothing's changed.

Here my postfix main.cf and master.cf whitout comment's

----- main.cf -----
smtpd_banner = $myhostname SMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no

myhostname = mail.domain.it
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = mail, mail.domain.it, localhost.domain.it, localhost
relayhost =
mynetworks = 127.0.0.0/8,10.175.90.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
mydomain = domain.it

virtual_alias_maps = mysql:/etc/postfix/mysql/virtual_alias_maps.cf
virtual_gid_maps = static:106
virtual_mailbox_base = /usr/local/virtual
virtual_mailbox_domains =
mysql:/etc/postfix/mysql/virtual_domains_maps.cf virtual_mailbox_limit
= 51200000 virtual_mailbox_maps =
mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf virtual_minimum_uid =
105 virtual_transport = virtual
virtual_uid_maps = static:105

virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps =
mysql:/etc/postfix/mysql/virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes virtual_maildir_limit_message =
Mailbox piena. Eliminare la posta in eccesso. virtual_overquota_bounce
= yes

message_size_limit = 20480000

broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/postfix.cert
smtpd_tls_key_file = /etc/postfix/postfix.key
smtpd_sender_restrictions = reject_unknown_sender_domain

mailbox_command = procmail -a "$EXTENSION"
----------

----- master.cf -----
smtp inet n - n - - smtpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - - - - smtp
relay unix - - - - - smtp
-o fallback_relay=
showq unix n - - - - showq
error unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - -
1 scache maildrop unix - n n - -
pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient) ifmail unix - n n - -
pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop
($recipient) bsmtp unix - n n - -
pipe flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop
-f$sender $recipient scalemail-backend unix - n
n - 2 pipe flags=R user=scalemail
argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user}
${extension} mailman unix - n n - -
pipe flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
-----

Thanks for all help.

Bye
Matteo

--
Matteo Cappadonna
CutAway s.r.l.
mailto: mcapp...@cutaway.it
mobile: +39 320 7799298

Andreas Winkelmann

unread,
Jan 29, 2007, 5:33:30 AM1/29/07
to

You have a patched Postfix. Please remove the Patch and test again.

--
Andreas

Matteo Cappadonna

unread,
Jan 29, 2007, 6:03:32 AM1/29/07
to
Il giorno Mon, 29 Jan 2007 11:33:30 +0100
Andreas Winkelmann <m...@awinkelmann.de> ha scritto:

> [...]


>
> You have a patched Postfix. Please remove the Patch and test again.
>

> [...]

I've tried to remove postfix quota patch and install a "pure" postfix,
but the problem seems the same.

When I've try to send a mail to user 1...@domain.it postfix creating a mbox
instead of maildir.

Thanks

Tony Earnshaw

unread,
Jan 29, 2007, 7:54:30 AM1/29/07
to
Matteo Cappadonna wrote, on 29. jan 2007 12:03:

>> [...]
>>
>> You have a patched Postfix. Please remove the Patch and test again.
>>
>> [...]
>
> I've tried to remove postfix quota patch and install a "pure" postfix,
> but the problem seems the same.
>
> When I've try to send a mail to user 1...@domain.it postfix creating a mbox
> instead of maildir.

Why not use Courier maildrop as LDA (Local Delivery Agent)? First
there's no need for a patch to Postfix - it will cope both with virtual
users, second it can cope well with a user base in MySQL and third it
can cope well with user quotas. It delivers in Maildir format, can't
even deliver in mbox format. Lastly, it can give you a lot of extras
(such as filtering to subfolders and complete PCRE regexp support) that
Postfix was never designed for.

--Tonni

--
Tony Earnshaw
Email: tonni at hetnet dot nl

Wietse Venema

unread,
Jan 29, 2007, 8:49:03 AM1/29/07
to
Matteo Cappadonna:

> When mailbox creation are about at 150.000, postfix stops to create
> maildir and starting with creationg of mbox file, without wrote any log
> of this change.

Postfix does not change from maildir to mbox. I know because
I wrote Postfix.

Wietse

Matteo Cappadonna

unread,
Jan 29, 2007, 9:02:07 AM1/29/07
to
Il giorno Mon, 29 Jan 2007 13:54:30 +0100
Tony Earnshaw <to...@hetnet.nl> ha scritto:

Sorry, but I must use postfix.
It does not depend on me.

Matteo Cappadonna

unread,
Jan 29, 2007, 9:19:18 AM1/29/07
to
Il giorno Mon, 29 Jan 2007 08:49:03 -0500 (EST)
wie...@porcupine.org (Wietse Venema) ha scritto:

> Matteo Cappadonna:


> > When mailbox creation are about at 150.000, postfix stops to create
> > maildir and starting with creationg of mbox file, without wrote any
> > log of this change.
>

> Postfix does not change from maildir to mbox. I know because
> I wrote Postfix.
>
> Wietse
>
>

Thanks for your reply.
The problem is that for every mail that is received, postfix create an
mbox file, but it should create the directory associated with the
mailbox. What should be the problem at this point?
Is there a parameter entry that should be added in the postfix
main.cf file?

Thanks again

Michael Wang

unread,
Jan 29, 2007, 9:16:50 AM1/29/07
to
Matteo Cappadonna wrote:
> The problem is that for every mail that is received, postfix create an
> mbox file, but it should create the directory associated with the
> mailbox. What should be the problem at this point?
> Is there a parameter entry that should be added in the postfix
> main.cf file?

Check the data that's referenced by virtual_mailbox_maps. It sounds like
the trailing slash to signify maildir format is now missing.

--
Michael Wang

Tony Earnshaw

unread,
Jan 29, 2007, 9:20:40 AM1/29/07
to
Matteo Cappadonna wrote, on 29. jan 2007 15:02:

[...]

ox instead of maildir.
>> Why not use Courier maildrop as LDA (Local Delivery Agent)? First
>> there's no need for a patch to Postfix - it will cope both with
>> virtual users, second it can cope well with a user base in MySQL and
>> third it can cope well with user quotas. It delivers in Maildir
>> format, can't even deliver in mbox format. Lastly, it can give you a
>> lot of extras (such as filtering to subfolders and complete PCRE
>> regexp support) that Postfix was never designed for.

> Sorry, but I must use postfix.
> It does not depend on me.

Errrm ... I use Postfix (strangely enough) ... which hands off to
maildrop, which delivers the mail, quota and all. Bottom line is,
maildrop (in contrast to your method) will not give the sort of problems
you're getting.

Victor Duchovni

unread,
Jan 29, 2007, 9:22:21 AM1/29/07
to

More likely the OPs virtual_mailbox_maps table contains paths that don't
end in "/". Or the OP is delivering via procmail, or ...

Without logs or evidence of correct table contents via "postmap -q", no
help is possible.

--
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majo...@postfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.

Wietse Venema

unread,
Jan 29, 2007, 9:52:02 AM1/29/07
to
Matteo Cappadonna:

> Il giorno Mon, 29 Jan 2007 08:49:03 -0500 (EST)
> wie...@porcupine.org (Wietse Venema) ha scritto:
>
> > Matteo Cappadonna:
> > > When mailbox creation are about at 150.000, postfix stops to create
> > > maildir and starting with creationg of mbox file, without wrote any
> > > log of this change.
> >
> > Postfix does not change from maildir to mbox. I know because
> > I wrote Postfix.
> >
>
> Thanks for your reply.
> The problem is that for every mail that is received, postfix create an
> mbox file, but it should create the directory associated with the
> mailbox. What should be the problem at this point?
> Is there a parameter entry that should be added in the postfix
> main.cf file?

Postfix delivers to maildir when YOU configure it to deliver to maildir.

Postfix delivers to mbox when YOU configure it to deliver to mbox.

Postfix does not spontaneously change from one to the other.

Wietse

Mike Horwath

unread,
Jan 29, 2007, 9:54:14 AM1/29/07
to
On Mon, Jan 29, 2007 at 01:54:30PM +0100, Tony Earnshaw wrote:
> even deliver in mbox format. Lastly, it can give you a lot of extras
> (such as filtering to subfolders and complete PCRE regexp support)
> that Postfix was never designed for.

Actually, Maildrop does not handle complete PCRE support.

It would be nice if it did.

--
Mike Horwath drec...@iphouse.net
ipHouse - Welcome home!

Mike Horwath

unread,
Jan 29, 2007, 9:56:20 AM1/29/07
to
On Mon, Jan 29, 2007 at 11:30:01AM +0100, Matteo Cappadonna wrote:
> I see the mailbox directories are created when the first mail are sent
> to an user; i've insert into mysql db 200.000 entry for users
> 1...@domain.it, 2...@domain.it and maildir directory
> at /usr/local/virtual/domain.it/1...@domain.it, etc. and launch a scripts
> who sent 200.000 mail to my server (1 for user).
>
> But...
>
> When mailbox creation are about at 150.000, postfix stops to create
> maildir and starting with creationg of mbox file, without wrote any log
> of this change.

I wonder if there is something else going on.

Have you tried to hash the directories?

like this:

/usr/local/virtual/domain.it/A/B/ABC...@domain.it

instead and see what happens?

150K files (directories) in a directory will impact directory
traversal times.

I hash on 2 letters:

.../virtual/domain/aa/aabbcc@domain

but my system is ready to go if I need to split it up further.

Matteo Cappadonna

unread,
Jan 29, 2007, 10:25:08 AM1/29/07
to
Il giorno Mon, 29 Jan 2007 06:16:50 -0800
Michael Wang <postfi...@pandadesigns.com> ha scritto:

> Matteo Cappadonna wrote:
> > The problem is that for every mail that is received, postfix create
> > an mbox file, but it should create the directory associated with the
> > mailbox. What should be the problem at this point?
> > Is there a parameter entry that should be added in the postfix
> > main.cf file?
>

> Check the data that's referenced by virtual_mailbox_maps. It sounds
> like the trailing slash to signify maildir format is now missing.
>

I've look into db and the trailing slash into the maildir string it's
missing. Now all work fine.

Thanks at all

John Peach

unread,
Jan 29, 2007, 9:16:35 AM1/29/07
to
On Mon, 29 Jan 2007 15:19:18 +0100
Matteo Cappadonna <mcapp...@cutaway.it> wrote:

> Il giorno Mon, 29 Jan 2007 08:49:03 -0500 (EST)
> wie...@porcupine.org (Wietse Venema) ha scritto:
>
> > Matteo Cappadonna:

> > > When mailbox creation are about at 150.000, postfix stops to
> > > create maildir and starting with creationg of mbox file, without
> > > wrote any log of this change.
> >

> > Postfix does not change from maildir to mbox. I know because
> > I wrote Postfix.
> >

> > Wietse
> >
> >
>
> Thanks for your reply.

> The problem is that for every mail that is received, postfix create an
> mbox file, but it should create the directory associated with the
> mailbox. What should be the problem at this point?
> Is there a parameter entry that should be added in the postfix
> main.cf file?
>

http://www.google.com/search?as_q=postfix+maildir&hl=en&num=100&btnG=Google+Search&as_epq=&as_oq=&as_eq=&lr=lang_en&as_ft=i&as_filetype=&as_qdr=all&as_nlo=&as_nhi=&as_occt=any&as_dt=i&as_sitesearch=&as_rights=&safe=images

The first result returns the FAQ at postfix.org

0 new messages