Re: [Dovecot] Posfix and Dovecot (dovecot like LDA) and no space left on the disk

2011-05-18 Thread Andrzej Adam Filip
On 05/10/2011 08:37 PM, Timo Sirainen wrote:
 On 10.5.2011, at 21.32, Andrzej Adam Filip wrote:
 
 Do you intent any time soon to provide some hook to alow MTA reject
 in reply to RCPT TO: (in SMTP session) messages to over quota
 mailboxes?
 
 Can you give specifics of what I'd need to do for that?
 I remember there is some sendmail protocol that is also supported by
 Postfix (I think), but I can't remember specifics (and a bit lazy to
 google for it). 
 v2.0 would finally allow easily implementing such
 service. Hmm. I guess such service would both have to check if the
 user exists and also the quota value, and give errors about both of them.

Both sendmail and postfix support milter protocol/API. Unlike API
provided by library the protocol is not officially documented.
Sendmail/sendmail.cf could also use trivial socket map protocol
(query-response) [sample Perl scripts implementing it are in contrib
directory of sendmail distribution].

IMHO the best honeypot for developers (especially without dovecot
expertise) would be simple library providing two functions
email_address - state( does_not_exist, under_quota, over_quota)
email_address, message_size - ( does_not_exist, ).


Re: [Dovecot] Posfix and Dovecot (dovecot like LDA) and no space left on the disk

2011-05-10 Thread Petr Svacina
Here is the logs: 

May  8 06:00:36 mailserver dovecot: deliver(saz...@vendys.net): 
msgid=3DEF56667E754F24B163C9767422C9A9@dlllk.local: save failed to INBOX: Not 
enough disk space
May  8 06:00:36 mailserver dovecot: deliver(saz...@vendys.net): 
msgid=3DEF56667E754F24B163C9767422C9A9@dlllk.local: rejected: Not enough disk 
space
May  8 06:00:36 mailserver postfix/pickup[27640]: D8B242F9E1: uid=150 from=
May  8 06:00:36 mailserver postfix/pipe[27978]: 4B3A72F8C0: 
to=saz...@vendys.net, relay=dovecot, delay=11, delays=11/0.02/0/0.04, 
dsn=2.0.0, status=sent (delivered via dovecot service)
May  8 06:00:36 mailserver postfix/qmgr[18807]: 4B3A72F8C0: removed

Problem is, that: 

1. spool HAVE ENOUGH space (so postfix has no problem keeps the message in the 
spool) 
2. postfix forward message to dovecot 
3. dovecot accept message, but can not deliver to /home/vmail, because there is 
no space :-)
4. so dovecot lost/delete/refuse message and tells postfix - everything is Ok ? 
5. postfix cleans qmgr (bacause message has been forward to LDA succesfully I 
suppose :-) )

Thanks Peter


 
 On Mon, 2011-05-09 at 17:37 +0200, Petr Svacina wrote:
 
 If my server is out of space (disk full) and  the postfix is LDA, the
 new messages a deffered or refused,so postfix send 450 to sender ... 
 But When I use dovecot (1.2.16) like LDA, postfix accept message (even
 there is no space), forward to dovecot, dovecot REFUSE the message and
 message is lost !
 
 Dovecot deliver should fail with tempfail, which Postfix should notice
 and forward to the original sender. If deliver doesn't return tempfail,
 it's a bug. I'd like to see Postfix logs of when this problem happens.
 
 


-- 
Tato zprava byla prohledana na vyskyt viru
a nebezpecneho obsahu antivirovym systemem
MailScanner a zda se byt cista.



Re: [Dovecot] Posfix and Dovecot (dovecot like LDA) and no space left on the disk

2011-05-10 Thread mail...@securitylabs.it

On 10/05/2011 14:44, Petr Svacina wrote:

Here is the logs:

May  8 06:00:36 mailserver dovecot: deliver(saz...@vendys.net): 
msgid=3DEF56667E754F24B163C9767422C9A9@dlllk.local: save failed to INBOX: Not 
enough disk space
May  8 06:00:36 mailserver dovecot: deliver(saz...@vendys.net): 
msgid=3DEF56667E754F24B163C9767422C9A9@dlllk.local: rejected: Not enough disk 
space
May  8 06:00:36 mailserver postfix/pickup[27640]: D8B242F9E1: uid=150 from=
May  8 06:00:36 mailserver postfix/pipe[27978]: 4B3A72F8C0: 
to=saz...@vendys.net, relay=dovecot, delay=11, delays=11/0.02/0/0.04, 
dsn=2.0.0, status=sent (delivered via dovecot service)
May  8 06:00:36 mailserver postfix/qmgr[18807]: 4B3A72F8C0: removed


To me message ID :

D8B242F9E1

seems a bounce to the sender, if that's correct I don't see troubles 
with that.


Re: [Dovecot] Posfix and Dovecot (dovecot like LDA) and no space left on the disk

2011-05-10 Thread Petr Svacina
Hi, Yes know, I know, that ANY OUT of SPACE problem is SPECIALLY 
administrator's problem and please check my previous answer ...
Out of space on the disk is my problem, but I want to know, why postfix receive 
message to it's spool (another partition - lot of space) and when postfix uses 
dovecot to deliver message
to the inbox, where is NO space, why message is lost and removed from qmgr. 

thanks a lot :-) 

Peter

 
 On 5/9/2011 10:37 AM, Petr Svacina wrote:
 Hi,
 
 Please I have a question:
 
 If my server is out of space (disk full) and  the postfix is LDA, the new 
 messages a deffered or refused,so postfix send 450 to sender ...
 But When I use dovecot (1.2.16) like LDA, postfix accept message (even there 
 is no space), forward to dovecot, dovecot REFUSE the message and message is 
 lost !
 
 How can I solve this ? I don't want tu use quota and the disk was full, 
 because of the other problem 
 
 This is more of a mail server admin 101 issue than a Dovecot issue. 
 Putting your log, mail spool, and user mail directories on separate 
 partitions, physical disks, or SAN LUNs will prevent such a problem from 
 occurring 99% of the time, assuming you have planned and sized your 
 storage appropriately for your environment.  At minimum you should have 
 your spool and user mail storage on different partitions.  To avoid this 
 issue the other 1% of the time, use monitoring or log summary tools to 
 notify you of disk space usage so you know when you're close to running 
 out of space.  For instance, I receive the following as part of my daily 
 logwatch summary on my personal domain MX:
 
  FilesystemSize  Used Avail Use% Mounted on
  /dev/sda2  33G  4.2G   28G  14% /
  /dev/sda1  92M  8.4M   79M  10% /boot
  /dev/sda6  94G  1.2G   92G   2% /home
  /dev/sda7  94G   25G   70G  26% /samba
 
 Note that I have both system logs and the mail spool on / but user mail 
 directories in /home.  This setup is acceptable for a low volume server. 
  For a high volume server the mail spool should be on a dedicated 
 partition, as well as user mail dirs.
 
 If you already know all of this and an unforeseen issue caused your 
 problem, accept my apologies for preaching to the choir.
 
 -- 
 Stan
 


-- 
Tato zprava byla prohledana na vyskyt viru
a nebezpecneho obsahu antivirovym systemem
MailScanner a zda se byt cista.



Re: [Dovecot] Posfix and Dovecot (dovecot like LDA) and no space left on the disk

2011-05-10 Thread Petr Svacina
Hi, 

No. No any version of the sieve us used  


 On 05/09/2011 05:37 PM, Petr Svacina wrote:
 Hi, 
 
 Please I have a question: 
 
 If my server is out of space (disk full) and  the postfix is LDA, the new 
 messages a deffered or refused,so postfix send 450 to sender ... 
 But When I use dovecot (1.2.16) like LDA, postfix accept message (even there 
 is no space), forward to dovecot, dovecot REFUSE the message and message is 
 lost !
 
 How can I solve this ? I don't want tu use quota and the disk was full, 
 because of the other problem 
 
 
 Are you using any plugins, like Sieve?
 
 Regards,
 
 Stephan.
 


-- 
Tato zprava byla prohledana na vyskyt viru
a nebezpecneho obsahu antivirovym systemem
MailScanner a zda se byt cista.



Re: [Dovecot] Posfix and Dovecot (dovecot like LDA) and no space left on the disk

2011-05-10 Thread Timo Sirainen
On 10.5.2011, at 15.44, Petr Svacina wrote:

 May  8 06:00:36 mailserver dovecot: deliver(saz...@vendys.net): 
 msgid=3DEF56667E754F24B163C9767422C9A9@dlllk.local: save failed to INBOX: 
 Not enough disk space
 May  8 06:00:36 mailserver dovecot: deliver(saz...@vendys.net): 
 msgid=3DEF56667E754F24B163C9767422C9A9@dlllk.local: rejected: Not enough 
 disk space

Oh, it's a rejection.. I guess it's because it's handled the same way as out 
of quota. Two things you can do:

a) give -e parameter to deliver, so it exits with the proper code instead of 
sending a new rejected message via sendmail. (I think I should have made this 
the default in v2.0.. Maybe I could change it in v2.1.)

b) quota_full_tempfail = yes to have it exit with tempfail rather than a 
permanent failure



Re: [Dovecot] Posfix and Dovecot (dovecot like LDA) and no space left on the disk

2011-05-10 Thread Andrzej Adam Filip
Timo Sirainen t...@iki.fi wrote:
 On 10.5.2011, at 15.44, Petr Svacina wrote:

 May  8 06:00:36 mailserver dovecot: deliver(saz...@vendys.net): 
 msgid=3DEF56667E754F24B163C9767422C9A9@dlllk.local: save failed to INBOX: 
 Not enough disk space
 May  8 06:00:36 mailserver dovecot: deliver(saz...@vendys.net): 
 msgid=3DEF56667E754F24B163C9767422C9A9@dlllk.local: rejected: Not enough 
 disk space

 Oh, it's a rejection.. I guess it's because it's handled the same way
 as out of quota. Two things you can do:

 a) give -e parameter to deliver, so it exits with the proper code
 instead of sending a new rejected message via sendmail. (I think I
 should have made this the default in v2.0.. Maybe I could change it in
 v2.1.)

 b) quota_full_tempfail = yes to have it exit with tempfail rather than
 a permanent failure

Do you intent any time soon to provide some hook to alow MTA reject
in reply to RCPT TO: (in SMTP session) messages to over quota
mailboxes?

Exit code of deliver -e can only be used to reject message in reply to
the final dot *for single recipient messages*.

-- 
[plen: Andrew] Andrzej Adam Filip : a...@onet.eu
Nachman's Rule:
When it comes to foreign food, the less authentic the better.
  -- Gerald Nachman


Re: [Dovecot] Posfix and Dovecot (dovecot like LDA) and no space left on the disk

2011-05-10 Thread Timo Sirainen
On 10.5.2011, at 21.32, Andrzej Adam Filip wrote:

 Do you intent any time soon to provide some hook to alow MTA reject
 in reply to RCPT TO: (in SMTP session) messages to over quota
 mailboxes?

Can you give specifics of what I'd need to do for that? I remember there is 
some sendmail protocol that is also supported by Postfix (I think), but I can't 
remember specifics (and a bit lazy to google for it). v2.0 would finally allow 
easily implementing such service. Hmm. I guess such service would both have to 
check if the user exists and also the quota value, and give errors about both 
of them.

Re: [Dovecot] Posfix and Dovecot (dovecot like LDA) and no space left on the disk

2011-05-09 Thread Timo Sirainen
On Mon, 2011-05-09 at 17:37 +0200, Petr Svacina wrote:

 If my server is out of space (disk full) and  the postfix is LDA, the
 new messages a deffered or refused,so postfix send 450 to sender ... 
 But When I use dovecot (1.2.16) like LDA, postfix accept message (even
 there is no space), forward to dovecot, dovecot REFUSE the message and
 message is lost !

Dovecot deliver should fail with tempfail, which Postfix should notice
and forward to the original sender. If deliver doesn't return tempfail,
it's a bug. I'd like to see Postfix logs of when this problem happens.




Re: [Dovecot] Posfix and Dovecot (dovecot like LDA) and no space left on the disk

2011-05-09 Thread Stan Hoeppner

On 5/9/2011 10:37 AM, Petr Svacina wrote:

Hi,

Please I have a question:

If my server is out of space (disk full) and  the postfix is LDA, the new 
messages a deffered or refused,so postfix send 450 to sender ...
But When I use dovecot (1.2.16) like LDA, postfix accept message (even there is 
no space), forward to dovecot, dovecot REFUSE the message and message is lost !

How can I solve this ? I don't want tu use quota and the disk was full, because 
of the other problem 


This is more of a mail server admin 101 issue than a Dovecot issue. 
Putting your log, mail spool, and user mail directories on separate 
partitions, physical disks, or SAN LUNs will prevent such a problem from 
occurring 99% of the time, assuming you have planned and sized your 
storage appropriately for your environment.  At minimum you should have 
your spool and user mail storage on different partitions.  To avoid this 
issue the other 1% of the time, use monitoring or log summary tools to 
notify you of disk space usage so you know when you're close to running 
out of space.  For instance, I receive the following as part of my daily 
logwatch summary on my personal domain MX:


 FilesystemSize  Used Avail Use% Mounted on
 /dev/sda2  33G  4.2G   28G  14% /
 /dev/sda1  92M  8.4M   79M  10% /boot
 /dev/sda6  94G  1.2G   92G   2% /home
 /dev/sda7  94G   25G   70G  26% /samba

Note that I have both system logs and the mail spool on / but user mail 
directories in /home.  This setup is acceptable for a low volume server. 
 For a high volume server the mail spool should be on a dedicated 
partition, as well as user mail dirs.


If you already know all of this and an unforeseen issue caused your 
problem, accept my apologies for preaching to the choir.


--
Stan




Re: [Dovecot] Posfix and Dovecot (dovecot like LDA) and no space left on the disk

2011-05-09 Thread Stephan Bosch
On 05/09/2011 05:37 PM, Petr Svacina wrote:
 Hi, 
 
 Please I have a question: 
 
 If my server is out of space (disk full) and  the postfix is LDA, the new 
 messages a deffered or refused,so postfix send 450 to sender ... 
 But When I use dovecot (1.2.16) like LDA, postfix accept message (even there 
 is no space), forward to dovecot, dovecot REFUSE the message and message is 
 lost !
 
 How can I solve this ? I don't want tu use quota and the disk was full, 
 because of the other problem 
 

Are you using any plugins, like Sieve?

Regards,

Stephan.