Mail delivery problems

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Mail delivery problems

Igor Novgorodov
Hello!

I have two problems that i need your help with:

1. Sometimes when VDA tries to deliver mail to user's maildirs errors
like these occur:
Jul  4 13:30:27 mail-1 postfix/virtual[9990]: fatal: update queue file active/34E705DD926: File too large
Jul  4 13:35:26 mail-1 postfix/virtual[11217]: fatal: update queue file active/4B709F060E: File too large
Jul  4 13:42:22 mail-1 postfix/virtual[11219]: fatal: update queue file active/5DCB2162C3C: File too large
Jul  4 13:45:10 mail-1 postfix/virtual[13795]: fatal: update queue file active/A9E7710255F: File too large
Jul  4 13:50:27 mail-1 postfix/virtual[16290]: fatal: update queue file active/688DD130440: File too large
Jul  4 13:55:26 mail-1 postfix/virtual[16359]: fatal: update queue file active/702551375FA: File too large
Jul  4 14:00:26 mail-1 postfix/virtual[19172]: fatal: update queue file active/570E53DA9EC: File too large
Jul  4 14:20:26 mail-1 postfix/virtual[20239]: fatal: update queue file active/D8D315DD896: File too large
Jul  4 14:30:26 mail-1 postfix/virtual[24660]: fatal: update queue file active/19748B829: File too large
Jul  4 14:30:27 mail-1 postfix/virtual[24657]: fatal: update queue file active/C5FC25D2266: File too large
Jul  4 14:40:26 mail-1 postfix/virtual[24654]: fatal: update queue file active/34E705DD926: File too large
Jul  4 14:55:49 mail-1 postfix/virtual[29631]: fatal: update queue file active/AF31C1A92D2: File too large

Postfix 2.5.2 + VDA quota patch, Gentoo, Maildirs on ReiserFS.

main.cf entries concerning the problem:

message_size_limit              = 31457280
virtual_mailbox_limit_inbox     = no
virtual_mailbox_limit           = 0
#virtual_mailbox_limit_maps     = mysql:/var/lib/postfix/mysql/mysql-quota.cf
virtual_mailbox_limit_maps      = static:0
virtual_mailbox_limit_override  = no
virtual_create_maildirsize      = yes
virtual_overquota_bounce        = yes
virtual_maildir_limit_message   = "Sorry, this mailbox is full"
virtual_trash_count             = yes
virtual_trash_name              = ".Trash"
virtual_maildir_filter          = no

As you can see i've even disabled quota by "static:0", problem
persists. Any ideas?

2. The second problem occured with the following lookup:
transport_maps                 = mysql:/var/lib/postfix/mysql/mysql-transports.cf

mysql-transports.cf:

user = postfix
password = *******
dbname = mail
query = SELECT `transport` FROM `relay` WHERE `domain` = '%s' AND `active`
hosts = unix:/var/run/mysqld/mysqld.sock

These errors appear sometimes concurrently (~300 rows) and then it
works again for about an hour or so. Then again.

Jul  3 14:53:32 mail-1 postfix/trivial-rewrite[27234]: warning: transport_maps lookup failure
Jul  3 14:53:32 mail-1 postfix/trivial-rewrite[27234]: warning: transport_maps lookup failure
Jul  3 14:53:32 mail-1 postfix/trivial-rewrite[27234]: warning: transport_maps lookup failure
Jul  3 14:53:32 mail-1 postfix/trivial-rewrite[27234]: warning: transport_maps lookup failure
Jul  3 14:53:32 mail-1 postfix/trivial-rewrite[27234]: warning: transport_maps lookup failure
Jul  3 14:53:32 mail-1 postfix/trivial-rewrite[27234]: warning: transport_maps lookup failure
Jul  3 14:53:32 mail-1 postfix/trivial-rewrite[27234]: warning: transport_maps lookup failure
Jul  3 14:53:32 mail-1 postfix/trivial-rewrite[27234]: warning: transport_maps lookup failure
Jul  3 14:53:32 mail-1 postfix/trivial-rewrite[27234]: warning: transport_maps lookup failure
Jul  3 14:53:32 mail-1 postfix/trivial-rewrite[27234]: warning: transport_maps lookup failure
Jul  3 14:53:32 mail-1 postfix/trivial-rewrite[27234]: warning: transport_maps lookup failure

And because of this SMTP clients get 'Temporary lookup failure'...

Strange thing that this SQL lookup works perfectly through 'postmap -q
domain.com mysql:/var/lib/postfix/mysql/mysql-transports.cf' and i
have a dozen of another SQL lookups that works perfectly.
For a time beign i changed sql lookup to hash and the problem
disappeared.

But in SQL error log i have this:
080704 15:17:44 [Warning] Aborted connection 1029448 to db: 'mail' user: 'postfix' host: 'localhost' (Got an error reading communication packets)
080704 15:17:44 [Warning] Aborted connection 1029447 to db: 'mail' user: 'postfix' host: 'localhost' (Got an error reading communication packets)
080704 15:20:16 [Warning] Aborted connection 1029455 to db: 'mail' user: 'postfix' host: 'localhost' (Got an error reading communication packets)
080704 15:20:16 [Warning] Aborted connection 1029454 to db: 'mail' user: 'postfix' host: 'localhost' (Got an error reading communication packets)
080704 15:20:34 [Warning] Aborted connection 1029462 to db: 'mail' user: 'postfix' host: 'localhost' (Got an error reading communication packets)
080704 15:20:34 [Warning] Aborted connection 1029461 to db: 'mail' user: 'postfix' host: 'localhost' (Got an error reading communication packets)
080704 15:22:36 [Warning] Aborted connection 1029469 to db: 'mail' user: 'postfix' host: 'localhost' (Got an error reading communication packets)
080704 15:22:36 [Warning] Aborted connection 1029470 to db: 'mail' user: 'postfix' host: 'localhost' (Got an error reading communication packets)
080704 15:22:51 [Warning] Aborted connection 1029479 to db: 'mail' user: 'postfix' host: 'localhost' (Got an error reading communication packets)
080704 15:22:51 [Warning] Aborted connection 1029478 to db: 'mail' user: 'postfix' host: 'localhost' (Got an error reading communication packets)

It goes all the time, looks like Postfix badly closes connection to
MySQL or such. It looks like this is not causing any problems, but it
bothers me :) Any thoghts?

--
Best regards,
 Igor                          mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Mail delivery problems

Wietse Venema
Igor Novgorodov:
> Postfix 2.5.2 + VDA quota patch [...]

This patch is not supported here. For support, contact the people
who maintain the VDA patch.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re[2]: Mail delivery problems

Igor Novgorodov
Hello Wietse,

Friday, July 4, 2008, 4:51:57 PM, you wrote:

> Igor Novgorodov:
>> Postfix 2.5.2 + VDA quota patch [...]

> This patch is not supported here. For support, contact the people
> who maintain the VDA patch.

>         Wietse


Yes, i know, but i hoped that maybe this problem is not related to
this patch. Although i cannot test if this is the case because the
server is under high load and quotas are needed.

But for other problems?

--
Best regards,
 Igor                            mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Mail delivery problems

Benny Pedersen
In reply to this post by Igor Novgorodov

On Fri, July 4, 2008 14:06, Igor Novgorodov wrote:

> virtual_overquota_bounce        = yes

thanks for making backscatterer :/

(tempfail i hope it does)

--
Benny Pedersen
Need more webspace ? http://www.servage.net/?coupon=cust37098

Reply | Threaded
Open this post in threaded view
|

Re: Re[2]: Mail delivery problems

Wietse Venema
In reply to this post by Igor Novgorodov
Igor Novgorodov:

> Hello Wietse,
>
> Friday, July 4, 2008, 4:51:57 PM, you wrote:
>
> > Igor Novgorodov:
> >> Postfix 2.5.2 + VDA quota patch [...]
>
> > This patch is not supported here. For support, contact the people
> > who maintain the VDA patch.
>
> >         Wietse
>
>
> Yes, i know, but i hoped that maybe this problem is not related to
> this patch. Although i cannot test if this is the case because the
> server is under high load and quotas are needed.
>
> But for other problems?

Interesting. I didn't write the patch, and you are asking me to
find out if the patch is creating a problem.

This is a bug in the VDA patch.

Postfix version 1.0 and later will not allow you to specify a
mailbox/dir file size limit that is less than the message_size_limit.
The local and virtual delivery agents will abort with:

    main.cf configuration error: virtual_mailbox_limit is smaller
    than message_size_limit

    main.cf configuration error: mailbox_size_limit is smaller than
    message_size_limit

The VDA patch was written by people who did not implement these
sanity checks. The VDA patch sets the per-process file size limit
to a value that is less than message_size_limit, and therefore
things break.

To work around this, do not specify quotas smaller than
message_size_limit.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Re[2]: Mail delivery problems

Wietse Venema
Wietse Venema:

> Igor Novgorodov:
> > Hello Wietse,
> >
> > Friday, July 4, 2008, 4:51:57 PM, you wrote:
> >
> > > Igor Novgorodov:
> > >> Postfix 2.5.2 + VDA quota patch [...]
> >
> > > This patch is not supported here. For support, contact the people
> > > who maintain the VDA patch.
> >
> > >         Wietse
> >
> >
> > Yes, i know, but i hoped that maybe this problem is not related to
> > this patch. Although i cannot test if this is the case because the
> > server is under high load and quotas are needed.
> >
> > But for other problems?
>
> Interesting. I didn't write the patch, and you are asking me to
> find out if the patch is creating a problem.
>
> This is a bug in the VDA patch.
>
> Postfix version 1.0 and later will not allow you to specify a
> mailbox/dir file size limit that is less than the message_size_limit.
> The local and virtual delivery agents will abort with:
>
>     main.cf configuration error: virtual_mailbox_limit is smaller
>     than message_size_limit
>
>     main.cf configuration error: mailbox_size_limit is smaller than
>     message_size_limit
>
> The VDA patch was written by people who did not implement these
> sanity checks. The VDA patch sets the per-process file size limit
> to a value that is less than message_size_limit, and therefore
> things break.

Actually, they have a test, but this test has an override option,
and the sample configuration file turns that override feature on,
thereby breaking Postfix.

> To work around this, do not specify quotas smaller than
> message_size_limit.
>
> Wietse
>
>

Reply | Threaded
Open this post in threaded view
|

Re[4]: Mail delivery problems

Igor Novgorodov

> Actually, they have a test, but this test has an override option,
> and the sample configuration file turns that override feature on,
> thereby breaking Postfix.

Well, i've tried virtual_mailbox_limit_override = "yes" and "no"
previously, it seems to make no difference. But i should do more
tests.

Sending a 30Mb mail into a mailbox with a 20Mb limit should be enough
to trigger a bug i think.

But the strange thing is that this bug was once triggered during
delivery to a mailbox with a zero quota and even when the quotas
all set to zero.
So i think the problem may be elsewhere...
--
С уважением,
 Igor                          mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Re[4]: Mail delivery problems

Wietse Venema
Let me get this clear.

"File too large" is a KERNEL ERROR that happens when the KERNEL
REFUSES to write to a point in a file that lies beyond the per-process
file size limit.

The VDA patch implements quota by lowering the per-process file
size limit (plus a couple things that don't affect the file size
limit).

In this case the VDA patch has lowered the the per-process file
size limit under the main.cf:message_size_limit.

You can work around this bug in the VDA patch, by not specifying
a quota that is smaller than main.cf:message_size_limit.

To prevent such bugs from affecting Postfix in the future, I will
add code to Postfix that aborts delivery under such conditions.

        Wietse