[Dovecot] LDA problem
Hi,
I am using dovecot deliver as lda for sendmail. My problem is that when a user account is over quota, deliver program sends message in the logs, but the message is not bounced back to sender informing that their is disk quota problem at the recipient side. Further message remains in the mail queue. Details are below. Plz suggest how to figure out the problems:
- Message should be removed from queue if quota is exceeded
- Sender should get a proper response.
Regards -Azher
Apr 14 11:31:41 wm sm-mta[22712]: l3EFVKQY022711: to=azher@wm.niit.edu.pk, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=130864, dsn=4.0.0, stat=Deferred: local mailer (/usr/dovecot/libexec/dovecot/deliver) exited with EX_TEMPFAIL
wm:/etc/mail# mailq MSP Queue status... /var/spool/mqueue-client is empty Total requests: 0 MTA Queue status... /var/spool/mqueue (1 request) -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient----------- l3EFVKQY022711 99722 Sat Apr 14 20:31 azher@niit.edu.pk (Deferred: local mailer (/usr/dovecot/libexec/dovecot/deliver) azher@wm.niit.edu.pk Total requests: 1
Sendmail.mc
LOCAL_CONFIG
FEATURE(masquerade_envelope')dnl FEATURE(
allmasquerade')dnl
FEATURE(`always_add_domain')dnl
LOCAL_CONFIG
FEATURE(use_cw_file')dnl FEATURE(
use_ct_file')dnl
FEATURE(nouucp',
reject')dnl
FEATURE(bestmx_is_local')dnl FEATURE(
mailertable')dnl
FEATURE(smrsh')dnl FEATURE(
local_procmail',
/usr/dovecot/libexec/dovecot/deliver',
deliver -d $u')
dnl # FEATURE(local_procmail)
MAILER_DEFINITIONS
MAILER(local)dnl
MAILER(smtp)dnl
MODIFY_MAILER_FLAGS(LOCAL',
-f')
MAILER(procmail)dnl
LOCAL_CONFIG
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
On Sat, 2007-04-14 at 20:44 +0500, Azher Amin wrote:
Hi,
I am using dovecot deliver as lda for sendmail. My problem is that when a user account is over quota, deliver program sends message in the logs, but the message is not bounced back to sender informing that their is disk quota problem at the recipient side. Further message remains in the mail queue. Details are below. Plz suggest how to figure out the problems: .. Apr 14 11:31:41 wm sm-mta[22712]: l3EFVKQY022711: to=azher@wm.niit.edu.pk, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=130864, dsn=4.0.0, stat=Deferred: local mailer (/usr/dovecot/libexec/dovecot/deliver) exited with EX_TEMPFAIL
It failed with EX_TEMPFAIL, so Dovecot didn't properly handle the out-of-quota condition. You're using filesystem quota I guess? If you're also using maildir, that won't work if your control files are in quota partition. See http://wiki.dovecot.org/Quota/FS
Hi Timo,
Thnx for quick suggestions, however i am still in trouble. I am using FS Quota and mbox. After looking at the Quota/FS, I changed the mail_location to below. Few of my dovecot.conf settings are:
mail_location = mbox:~/mail:INBOX=/home/%u/mail/INBOX:INDEX=/var/mail/indexes/%u
protocol lda { # Address to use when sending rejection mails. postmaster_address = postmaster@localhost mail_plugins = quota }
Plz suggest what to do next ......
Regards -Azher
Timo Sirainen wrote:
On Sat, 2007-04-14 at 20:44 +0500, Azher Amin wrote:
Hi,
I am using dovecot deliver as lda for sendmail. My problem is that when a user account is over quota, deliver program sends message in the logs, but the message is not bounced back to sender informing that their is disk quota problem at the recipient side. Further message remains in the mail queue. Details are below. Plz suggest how to figure out the problems:
..
Apr 14 11:31:41 wm sm-mta[22712]: l3EFVKQY022711: to=azher@wm.niit.edu.pk, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=130864, dsn=4.0.0, stat=Deferred: local mailer (/usr/dovecot/libexec/dovecot/deliver) exited with EX_TEMPFAIL
It failed with EX_TEMPFAIL, so Dovecot didn't properly handle the out-of-quota condition. You're using filesystem quota I guess? If you're also using maildir, that won't work if your control files are in quota partition. See http://wiki.dovecot.org/Quota/FS
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
On Sat, 2007-04-14 at 23:38 +0500, Azher Amin wrote:
Hi Timo,
Thnx for quick suggestions, however i am still in trouble. I am using FS Quota and mbox. After looking at the Quota/FS, I changed the mail_location to below. Few of my dovecot.conf settings are:
mail_location = mbox:~/mail:INBOX=/home/%u/mail/INBOX:INDEX=/var/mail/indexes/%u .. Plz suggest what to do next ......
What exactly does deliver log when it happens?
I am using the latest version 1.0
This is the output from mail.log
Apr 15 00:52:29 wm sm-mta[3710]: STARTTLS=server, relay=root@ns3.niit.edu.pk [10.10.4.66] (may be forged), version=TLSv1/SSLv3, verify=NOT, cipher=DHE-RSA-AES256-SHA, bits=256/256 Apr 15 00:52:49 wm sm-mta[3710]: l3EJqS9N003710: from=azher@niit.edu.pk, size=974, class=0, nrcpts=1, msgid=462130EA.1020801@niit.edu.pk, proto=ESMTP, daemon=MTA-v4, relay=root@ns3.niit.edu.pk [10.10.4.66] (may be forged) Apr 15 00:52:49 wm sm-mta[3712]: l3EJqS9N003710: Warning: program /usr/local/libexec/dovecot/deliver unsafe: Group writable directory Apr 15 00:52:49 wm sm-mta[3711]: l3EJqS9N003710: to=azher@wm.niit.edu.pk, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31260, dsn=4.0.0, stat=Deferred: local mailer (/usr/local/libexec/dovecot/deliver) exited with EX_TEMPFAIL
and in dovecot.log:
deliver(azher): Apr 15 00:52:49 Error: net_connect(/var/run/dovecot/auth-master) failed: No such file or directory
contents of: wm:/var/mail/indexes# ls -l /var/run/dovecot/ total 8 srw------- 1 root root 0 2007-04-15 00:47 auth-worker.3668 srwxrwxrwx 1 root root 0 2007-04-15 00:47 dict-server drwxr-x--- 2 root dovecot 4096 2007-04-15 00:47 login -rw------- 1 root root 5 2007-04-15 00:47 master.pid wm:/var/mail/indexes#
Timo Sirainen wrote:
On Sat, 2007-04-14 at 23:38 +0500, Azher Amin wrote:
Hi Timo,
Thnx for quick suggestions, however i am still in trouble. I am using FS Quota and mbox. After looking at the Quota/FS, I changed the mail_location to below. Few of my dovecot.conf settings are:
mail_location = mbox:~/mail:INBOX=/home/%u/mail/INBOX:INDEX=/var/mail/indexes/%u
..
Plz suggest what to do next ......
What exactly does deliver log when it happens?
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
On 14.4.2007, at 22.55, Azher Amin wrote:
deliver(azher): Apr 15 00:52:49 Error: net_connect(/var/run/dovecot/ auth-master) failed: No such file or directory .. wm:/var/mail/indexes# ls -l /var/run/dovecot/ total 8 srw------- 1 root root 0 2007-04-15 00:47 auth-worker.3668 srwxrwxrwx 1 root root 0 2007-04-15 00:47 dict-server drwxr-x--- 2 root dovecot 4096 2007-04-15 00:47 login -rw------- 1 root root 5 2007-04-15 00:47 master.pid wm:/var/mail/indexes#
So deliver doesn't work at all, and it has nothing to do with quota?
You'll need to set up the auth-master socket as http:// wiki.dovecot.org/LDA explains.
Hi Timo,
Thnx for your time replying me. I did the steps as suggested on the link and here are the details now. IMAP, SSL , POP3 SASL, IMAP-QUOTA etc .. everything works perfect but the LDA is still giving the same error, details are below:
wm:/etc/mail# netstat -lpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
tcp 0 0 0.0.0.0:993 0.0.0.0:*
LISTEN 10853/dovecot
tcp 0 0 0.0.0.0:995 0.0.0.0:*
LISTEN 10853/dovecot
tcp 0 0 127.0.0.1:3306 0.0.0.0:*
LISTEN 3108/mysqld
tcp 0 0 127.0.0.1:587 0.0.0.0:*
LISTEN 11281/sendmail: MTA
tcp 0 0 0.0.0.0:110 0.0.0.0:*
LISTEN 10853/dovecot
tcp 0 0 0.0.0.0:143 0.0.0.0:*
LISTEN 10853/dovecot
tcp 0 0 0.0.0.0:465 0.0.0.0:*
LISTEN 11281/sendmail: MTA
tcp 0 0 0.0.0.0:113 0.0.0.0:*
LISTEN 3240/inetd
tcp 0 0 0.0.0.0:21 0.0.0.0:*
LISTEN 3240/inetd
tcp 0 0 10.10.4.20:25 0.0.0.0:*
LISTEN 11281/sendmail: MTA
tcp 0 0 127.0.0.1:25 0.0.0.0:*
LISTEN 11281/sendmail: MTA
tcp6 0 0 :::80 :::*
LISTEN 7878/apache2
tcp6 0 0 :::22 :::*
LISTEN 3281/sshd
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program
name Path
unix 2 [ ACC ] STREAM LISTENING 6934
3108/mysqld /var/run/mysqld/mysqld.sock
unix 2 [ ACC ] STREAM LISTENING 7136
3229/acpid /var/run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 7303
3271/saslauthd /var/run/saslauthd/mux
unix 2 [ ACC ] STREAM LISTENING 32330
11281/sendmail: MTA /var/run/sendmail/mta/smcontrol
unix 2 [ ACC ] STREAM LISTENING 31460
10853/dovecot /var/run/dovecot/dict-server
unix 2 [ ACC ] STREAM LISTENING 31462
10853/dovecot /var/run/dovecot/login/default
unix 2 [ ACC ] STREAM LISTENING 31467
10853/dovecot /var/run/dovecot/auth-worker.10854
unix 2 [ ACC ] STREAM LISTENING 31469
10854/dovecot-auth /var/run/dovecot/auth-master
wm:/etc/mail#
--- dovecot.conf ---------------------------------------
protocol lda { postmaster_address = postmaster@wm.niit.edu.pk auth_socket_path = /var/run/dovecot/auth-master mail_plugin_dir = /usr/local/lib/dovecot/lda/ mail_plugins = quota }
# requires roots. Note that this user is NOT used to access mails. # That user is specified by userdb above. user = root
socket listen { master { # Master socket provides access to userdb information. It's typically # used to give Dovecot's local delivery agent access to userdb so it # can find mailbox locations. path = /var/run/dovecot/auth-master mode = 0600 # Default user/group is the one who started dovecot-auth (root) #user = #group = } #client { # The client socket is generally safe to export to everyone. Typical use # is to export it to your SMTP server so it can do SMTP AUTH lookups # using it. #path = /var/run/dovecot/auth-client #mode = 0660 #} }
------------ sendmail.mc ---------------
LOCAL_CONFIG
FEATURE(use_cw_file')dnl FEATURE(
use_ct_file')dnl
FEATURE(nouucp',
reject')dnl
FEATURE(bestmx_is_local')dnl FEATURE(
mailertable')dnl
FEATURE(`smrsh')dnl
FEATURE(local_procmail',
/usr/local/libexec/dovecot/deliver',`deliver
-d $u')
MAILER_DEFINITIONS
MAILER(local)dnl
MAILER(smtp)dnl
MODIFY_MAILER_FLAGS(LOCAL',
-f')
LOCAL_CONFIG
--------------- mail.log ------------------------- Apr 15 14:42:22 wm sm-mta[11875]: STARTTLS=server, relay=root@ns3.niit.edu.pk [10.10.4.66] (may be forged), version=TLSv1/SSLv3, verify=NOT, cipher=DHE-RSA-AES256-SHA, bits=256/256 Apr 15 14:42:42 wm sm-mta[11875]: l3F9gLLc011875: from=azher@niit.edu.pk, size=972, class=0, nrcpts=1, msgid=4621F374.6050108@niit.edu.pk, proto=ESMTP, daemon=MTA-v4, relay=root@ns3.niit.edu.pk [10.10.4.66] (may be forged) Apr 15 14:42:42 wm sm-mta[11877]: l3F9gLLc011875: Warning: program /usr/local/libexec/dovecot/deliver unsafe: Group writable directory Apr 15 14:42:42 wm sm-mta[11876]: l3F9gLLc011875: to=azher@wm.niit.edu.pk, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31258, dsn=4.0.0, stat=Deferred: local mailer (/usr/local/libexec/dovecot/deliver) exited with EX_TEMPFAIL
Timo Sirainen wrote:
On 14.4.2007, at 22.55, Azher Amin wrote:
deliver(azher): Apr 15 00:52:49 Error: net_connect(/var/run/dovecot/auth-master) failed: No such file or directory .. wm:/var/mail/indexes# ls -l /var/run/dovecot/ total 8 srw------- 1 root root 0 2007-04-15 00:47 auth-worker.3668 srwxrwxrwx 1 root root 0 2007-04-15 00:47 dict-server drwxr-x--- 2 root dovecot 4096 2007-04-15 00:47 login -rw------- 1 root root 5 2007-04-15 00:47 master.pid wm:/var/mail/indexes#
So deliver doesn't work at all, and it has nothing to do with quota?
You'll need to set up the auth-master socket as http://wiki.dovecot.org/LDA explains.
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Hi Timo,
Finally I got it working. Thnx for excellent software.
Thnx -Azher Amin
Timo Sirainen wrote:
On Sat, 2007-04-14 at 20:44 +0500, Azher Amin wrote:
Hi,
I am using dovecot deliver as lda for sendmail. My problem is that when a user account is over quota, deliver program sends message in the logs, but the message is not bounced back to sender informing that their is disk quota problem at the recipient side. Further message remains in the mail queue. Details are below. Plz suggest how to figure out the problems:
..
Apr 14 11:31:41 wm sm-mta[22712]: l3EFVKQY022711: to=azher@wm.niit.edu.pk, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=130864, dsn=4.0.0, stat=Deferred: local mailer (/usr/dovecot/libexec/dovecot/deliver) exited with EX_TEMPFAIL
It failed with EX_TEMPFAIL, so Dovecot didn't properly handle the out-of-quota condition. You're using filesystem quota I guess? If you're also using maildir, that won't work if your control files are in quota partition. See http://wiki.dovecot.org/Quota/FS
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
participants (2)
-
Azher Amin
-
Timo Sirainen