Hello,
I have a question regarding mailbox locking and hope any one can help me to better understanding the locking of mbox
My Postfix lock option is fcntl dotlock mailbox_delivery_lock = fcntl, dotlock virtual_mailbox_lock = fcntl, dotlock
My Dovecot lock option is fcntl only mbox_write_locks = fcntl mbox_read_locks = fcntl
now, when user is download a large mail (20 MB) for example, dovecot locks /var/mail/user with fcntl until the users finish downloading the mail
ok here comes my question.
While the user is downloading the mail , a mail arrives so postfix make some thing weird
1- Postfix creates /var/mail/user.lock for 5 secs , then postfix defer the mail with reason that the /var/mail/user is locked and then delete the /var/mail/user.lock (after 5 secs)
My question is ? why postfix create user.lock although it shouldn't because already dovecot fcntl it …
1- Dovecot locks /var/mail/user using FCNTL
2- Posttix at the same time tries to FCNTL /var/mail/user .. but it fail since dovecot already fcnl it.
3- Postfix at the same time add dot lock /var/mail/user for 5 secs then remove the lock.
the question is how come postfix dot lock /var/mail although it couldn't FCNTL the file in the first place ??????? what i was expecting is
1- Dovecot locks /var/mail/user using FCNTL
2- Postfix tries to FCNTL /var/mail/user
3- POSTFIX WILL NOT CREATE DOTLOCK file unless the FCNTL is released by dovecot!!!!
Please advise if postfix will dot lock the file even if it couldn't FCNTL the file in the first place……
Regards