1

Topic: dovecot: temporary failure

Hi all,
First sorry for my english.

Since a few days I get the following error "status = deferred (temporary failure)" in mail.log and this by sending messages to some users only.
Thank's for help.



==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: dovecot: temporary failure

1: Please post related log in mail.log, starts with SMTP session beginning, ends with SMTP session closed.
2: Any related log in Dovecot log files (/var/log/dovecot.log, /var/log/sieve.log)?

3

Re: dovecot: temporary failure

Hi;
This this the mail.log  :

admin@domaine.com [x.x.x.x]; Message for xxx@domaine.com; 250: 2.0.0 Ok: queued as D927D2D20392
Oct 14 11:03:04 server amavis[21838]: (21838-11) Passed CLEAN, MYNETS/MYUSERS LOCAL [127.0.0.1] [127.0.0.1] <admin@domain.com> -> <xxx@domaine.com>, Message-ID: <e4d561d13a0d8f96d881dcde591a3aa8@usthb.dz>, mail_id: yBs7fA-wAvDt, Hits: -11.899, size: 957, queued_as: 316C82D20398, 286 ms
Oct 14 11:03:04 machine1 postfix/smtp[24478]: D927D2D20392: to=<xxx@domaine.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.36, delays=0.05/0/0/0.3, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=21838-11, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 316C82D20398)
Oct 14 11:03:04 machine1 postfix/pipe[24487]: 316C82D20398: to=<xxx@domaine.com>, relay=dovecot, delay=0.06, delays=0.01/0/0/0.05, dsn=4.3.0, status=deferred (temporary failure)

The sieve.log :

Oct 14 11:03:04 deliver(xxx@domaine.com): Error: stat(//var/vmail/vmail1/domaine.com/xxx/Maildir/.dovecot.sieve/tmp) failed: Not a directory
Oct 14 11:03:04 deliver(xxx@domaine.com): Error: Internal quota calculation error
Oct 14 11:03:04 deliver(xxx@domaine.com): Error: sieve: msgid=<e4d561d13a0d8f96d881dcde591a3aa8@domaine.com>: failed to store into mailbox 'INBOX': Internal error occurred. Refer to server log for more information. [2012-10-14 11:03:04]
Oct 14 11:03:04 deliver(xxx@domaine.com): Error: sieve: script /var/vmail/sieve/domaine/xxx/dovecot.sieve failed with unsuccessful implicit keep
Oct 14 11:09:54 deliver(xxx@domaine.com): Error: stat(//var/vmail/vmail1/domaine/xxx/Maildir/.dovecot.sieve/tmp) failed: Not a directory
Oct 14 11:09:54 deliver(xxx@domaine.com): Error: Internal quota calculation error
Oct 14 11:09:54 deliver(xxx@domaine.com): Error: sieve: msgid=<e4d561d13a0d8f96d881dcde591a3aa8@domaine.com>: failed to store into mailbox 'INBOX': Internal error occurred. Refer to server log for more information. [2012-10-14 11:09:54]

And i have only this error with a few users.
NB: First this user have quota=1024 MO  and than i have increase it to 2048 MO
Thank's for the help

4

Re: dovecot: temporary failure

mekerri wrote:

Oct 14 11:03:04 deliver(xxx@domaine.com): Error: stat(//var/vmail/vmail1/domaine.com/xxx/Maildir/.dovecot.sieve/tmp) failed: Not a directory

dovecot.sieve should be a regular file, not a directory. There may be something wrong in your Dovecot config file. Could you please paste me output of command "dovecot -n" to help troubleshoot?

5

Re: dovecot: temporary failure

Hi;
This is my dovecot -n  ( i have not modifiy any files after installation with iredmail..), hope have a solution


log_path: /var/log/dovecot.log
protocols: pop3 pop3s imap imaps managesieve
listen(default): *
listen(imap): *
listen(pop3): *
listen(managesieve): 127.0.0.1:4190
ssl_ca_file: /etc/ssl/certs/iRedMail_CA.pem
ssl_cert_file: /etc/ssl/certs/iRedMail_CA.pem
ssl_key_file: /etc/ssl/private/iRedMail.key
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
login_executable(managesieve): /usr/lib/dovecot/managesieve-login
first_valid_uid: 1001
last_valid_uid: 1001
mail_uid: 1001
mail_gid: 1001
mail_location: maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/
mbox_write_locks: fcntl dotlock
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_executable(managesieve): /usr/lib/dovecot/managesieve
mail_process_size: 1024
mail_plugins(default): quota imap_quota autocreate
mail_plugins(imap): quota imap_quota autocreate
mail_plugins(pop3): quota
mail_plugins(managesieve):
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve
imap_client_workarounds(default): tb-extra-mailbox-sep
imap_client_workarounds(imap): tb-extra-mailbox-sep
imap_client_workarounds(pop3):
imap_client_workarounds(managesieve):
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
pop3_client_workarounds(managesieve):
namespace:
  type: private
  separator: /
  inbox: yes
  list: yes
  subscriptions: yes
namespace:
  type: shared
  separator: /
  prefix: Shared/%%u/
  location: maildir:/%%Lh/Maildir/:INDEX=/%%Lh/Maildir/Shared/%%u
  list: children
  subscriptions: yes
lda:
  postmaster_address: admin@domaine.com
  auth_socket_path: /var/run/dovecot/auth-master
  mail_plugins: quota sieve autocreate
  sieve_global_path: /var/vmail/sieve/dovecot.sieve
  log_path: /var/log/sieve.log
auth default:
  mechanisms: plain login
  default_realm: domaine.com
  user: vmail
  passdb:
    driver: sql
    args: /etc/dovecot/dovecot-mysql.conf
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-mysql.conf
  socket:
    type: listen
    client:
      path: /var/spool/postfix/dovecot-auth
      mode: 438
      user: postfix
      group: postfix
    master:
      path: /var/run/dovecot/auth-master
      mode: 438
      user: vmail
      group: vmail
plugin:
  quota_warning: storage=85%% /usr/local/bin/dovecot-quota-warning.sh 85
  quota_warning2: storage=90%% /usr/local/bin/dovecot-quota-warning.sh 90
  quota_warning3: storage=95%% /usr/local/bin/dovecot-quota-warning.sh 95
  quota: dict:user::proxy::quotadict
  quota_rule: *:storage=0
  sieve_before: /var/vmail/vmail1/globalsieve.sieve
  expire: Trash 7 Trash/* 7 Junk 30
  expire_dict: proxy::expire
  auth_socket_path: /var/run/dovecot/auth-master
  sieve: /%Lh/sieve/dovecot.sieve
  autocreate: INBOX
  autocreate2: Sent
  autocreate3: Trash
  autocreate4: Drafts
  autocreate5: Junk
  autosubscribe: INBOX
  autosubscribe2: Sent
  autosubscribe3: Trash
  autosubscribe4: Drafts
  autosubscribe5: Junk
  acl: vfile
  acl_shared_dict: proxy::acl
  sieve: /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
  sieve_dir: /var/vmail/sieve/%Ld/%Ln
dict:
  expire: db:/var/lib/dovecot/expire/expire.db
  quotadict: mysql:/etc/dovecot/dovecot-used-quota.conf
  acl: mysql:/etc/dovecot/dovecot-share-folder.conf


Thank's again for help

6

Re: dovecot: temporary failure

Looks like you have duplicate sieve settings in dovecot.conf:

  sieve: /%Lh/sieve/dovecot.sieve
  sieve: /var/vmail/sieve/%Ld/%Ln/dovecot.sieve

Also, could you please paste /etc/dovecot/dovecot-mysql.conf here to help troubleshoot? Remove password before posting.

7

Re: dovecot: temporary failure

Hi Zhang,

Thank's for replay.
Which line should I comment?  the first one or the second one?
sieve: /%Lh/sieve/dovecot.sieve
  sieve: /var/vmail/sieve/%Ld/%Ln/dovecot.sieve

This this the dovecot-mysql.conf:

driver = mysql
default_pass_scheme = CRYPT
connect = host=127.0.0.1 dbname=vmail user=vmail password=xxxxxxx
password_query = SELECT password FROM mailbox WHERE username='%u' AND active='1'
user_query = SELECT CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) AS home, CONCAT('*:bytes=', mailbox.quota*1048576) AS quota_rule FROM     mailbox,domain WHERE mailbox.username='%u' AND mailbox.domain='%d' AND mailbox.enable%Ls%Lc=1 AND mailbox.domain=domain.domain AND domain.backupmx=0 AND domain.active=1 AND     mailbox.active=1

Thank's again for help

8

Re: dovecot: temporary failure

Below is what it complains:

Oct 14 11:03:04 deliver(xxx@domaine.com): Error: stat(//var/vmail/vmail1/domaine.com/xxx/Maildir/.dovecot.sieve/tmp) failed: Not a directory

So i suggest commenting out the second one for testing first:

  sieve: /var/vmail/sieve/%Ld/%Ln/dovecot.sieve

Restart Dovecot to see whether it works as expected.

9

Re: dovecot: temporary failure

tkank's i will try


ZhangHuangbin wrote:

Below is what it complains:

Oct 14 11:03:04 deliver(xxx@domaine.com): Error: stat(//var/vmail/vmail1/domaine.com/xxx/Maildir/.dovecot.sieve/tmp) failed: Not a directory

So i suggest commenting out the second one for testing first:

  sieve: /var/vmail/sieve/%Ld/%Ln/dovecot.sieve

Restart Dovecot to see whether it works as expected.