[Dovecot] Courier-mta with Dovecot LDA again
Hi all
Sorry for repost, but i don't believe that there is noone who know where the problem can be. At least developers should know :-)
I have sent this post once, but without answer.
I have setup dovecot lda instead of maildrop on my courier server. Delivery is working, sieve plugin too, but i can't figure out why lda can't send emails via sendmail (vacation).
I always get error
Error: Sendmail process terminated abnormally, exit status 67
And i know why, but i don't know how to setup lda to make it work .
Here is .courier file where is redirect to lda.
| /usr/libexec/dovecot/deliver -a $RECIPIENT -f $SENDER
But the deliver does not pass recipient address to sendmail.
Here is some output of strace
execve("/usr/libexec/dovecot/deliver", ["/usr/libexec/dovecot/deliver", "-a", "komodo@somedomain", "-f", "someuser@somedomain"], [/* 22 vars */]) = 0
So it's clear that deliver have those variables, but then i can see this
execve("/usr/sbin/sendmail", ["/usr/sbin/sendmail", "-i", "-f", "<>", "--", "someuser@somedomain"], [/* 2 vars */] <unfinished ...>
And there is empty -f , so here is the problem.
How should i setup this to make it work correctly ?
Here is my config
[root@OVZ.mail ~]# dovecot -n # 2.0.7: /etc/dovecot/dovecot.conf # OS: Linux 2.6.18-194.8.1.el5.028stab070.5 x86_64 CentOS release 5.5 (Final) disable_plaintext_auth = no hostname = ovzmail listen = 10.0.10.34 mail_location = maildir:~/Maildir managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date mbox_write_locks = fcntl namespace { inbox = yes location = prefix = INBOX. separator = . type = private } namespace { location = maildir:/home/shared/Maildir prefix = spam_learner. separator = . type = public } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = imap sieve ssl_cert = </etc/pki/dovecot/certs/server.pem ssl_key = </etc/pki/dovecot/private/server.pem userdb { driver = prefetch } protocol lda { mail_plugins = " sieve" } protocol imap { mail_max_userip_connections = 40 }
Many thanks
Martin
Op 4-1-2011 11:12, komodo schreef:
I have setup dovecot lda instead of maildrop on my courier server. Delivery is working, sieve plugin too, but i can't figure out why lda can't send emails via sendmail (vacation).
I always get error
Error: Sendmail process terminated abnormally, exit status 67
And i know why, but i don't know how to setup lda to make it work . The problem details should be logged somewhere by the sendmail process. The above error is produced by LDA and tells me little about the problem itself. Does executing sendmail manually even work?
Here is some output of strace
execve("/usr/libexec/dovecot/deliver", ["/usr/libexec/dovecot/deliver", "-a", "komodo@somedomain", "-f", "someuser@somedomain"], [/* 22 vars */]) = 0
So it's clear that deliver have those variables, but then i can see this
execve("/usr/sbin/sendmail", ["/usr/sbin/sendmail", "-i", "-f", "<>", "--", "someuser@somedomain"], [/* 2 vars */]<unfinished ...>
And there is empty -f , so here is the problem. I am not convinced that this is the problem. This looks like a valid rejection or vacation notification mail being sent out, probably from Sieve; notice that the original sender is specified as recipient and that the new sender is empty, indicating an automated message. So, what caused this message to be sent out? It is definitely not a redirect.
Regards,
Stephan.
Here is some output of strace
execve("/usr/libexec/dovecot/deliver", ["/usr/libexec/dovecot/deliver", "-a", "komodo@somedomain", "-f", "someuser@somedomain"], [/* 22 vars */]) = 0
So it's clear that deliver have those variables, but then i can see this
execve("/usr/sbin/sendmail", ["/usr/sbin/sendmail", "-i", "-f", "<>", "--", "someuser@somedomain"], [/* 2 vars */]<unfinished ...>
And there is empty -f , so here is the problem.
I am not convinced that this is the problem. This looks like a valid rejection or vacation notification mail being sent out, probably from Sieve; notice that the original sender is specified as recipient and that the new sender is empty, indicating an automated message. So, what caused this message to be sent out? It is definitely not a redirect.
Thanks for the answer, but this must be the problem, because when i run sendmail from command line (exactly like in the strace output)
[root@OVZ.mail ~]# /usr/sbin/sendmail -i -f <> -- komodo@domain.com
511 Headers specify no receipients.
sendmail: Unable to submit message.
[root@OVZ.mail ~]# echo $?
67
And there is exactly return code 67 as reported by LDA
Regards
Martin
On Tue, 2011-01-04 at 11:43 +0100, komodo wrote:
execve("/usr/sbin/sendmail", ["/usr/sbin/sendmail", "-i", "-f", "<>", "--", "someuser@somedomain"], [/* 2 vars */]<unfinished ...>
Thanks for the answer, but this must be the problem, because when i run sendmail from command line (exactly like in the strace output)
[root@OVZ.mail ~]# /usr/sbin/sendmail -i -f <> -- komodo@domain.com
Note that you need to use '<>' here when running from command line.
So I think your problem is that it sends a bounce instead of a vacation message. deliver should log what it's doing, probably "rejected: <reason>". What do you see in logs?
On Tuesday 04 January 2011 11:46:41 Timo Sirainen wrote:
On Tue, 2011-01-04 at 11:43 +0100, komodo wrote:
execve("/usr/sbin/sendmail", ["/usr/sbin/sendmail", "-i", "-f", "<>", "--", "someuser@somedomain"], [/* 2 vars */]<unfinished ...>
Thanks for the answer, but this must be the problem, because when i run sendmail from command line (exactly like in the strace output)
[root@OVZ.mail ~]# /usr/sbin/sendmail -i -f <> -- komodo@domain.com
Note that you need to use '<>' here when running from command line.
Ok, with this i get
[root@OVZ.mail ~]# /usr/sbin/sendmail -i -f '<>' -- komodo@domain.com 517 Syntax error. [root@OVZ.mail ~]# echo $? 67
So again 67 error.
So I think your problem is that it sends a bounce instead of a vacation message. deliver should log what it's doing, probably "rejected: <reason>". What do you see in logs?
Here is the log
Jan 4 11:54:12 OVZ courierd: newmsg,id=0000000000220008.000000004D22FC54.00000F48: dns; acheron([::ffff:10.0.10.21]) Jan 4 11:54:12 OVZ courierd: started,id=0000000000220008.000000004D22FC54.00000F48,from=<komodo@domain.net>,module=local,host=komodo@domain.cz!!10162! 100!/home/komodo!!,addr=<komodo@domain.cz> Jan 4 11:54:12 OVZ courierd: Waiting. shutdown time=none, wakeup time=Tue Jan 4 11:58:09 2011, queuedelivering=2, inprogress=1 Jan 4 11:54:12 OVZ dovecot: lda(komodo@domain.cz): Error: Sendmail process terminated abnormally, exit status 67 Jan 4 11:54:12 OVZ dovecot: lda(komodo@domain.cz): Error: sieve: msgid=<201101041154.06487.komodo@domain.net>: failed to send vacation response to <komodo@domain.net> (refer to server log for more information) Jan 4 11:54:12 OVZ dovecot: lda(komodo@domain.cz): sieve: msgid=<201101041154.06487.komodo@domain.net>: sent vacation response to <komodo@domain.net> Jan 4 11:54:12 OVZ dovecot: lda(komodo@domain.cz): sieve: msgid=<201101041154.06487.komodo@domain.net>: stored mail into mailbox 'INBOX' Jan 4 11:54:12 OVZ courierlocal: id=0000000000220008.000000004D22FC54.00000F48,from=<komodo@domain.net>,addr=<komodo@domain.cz>: 517 Syntax error. Jan 4 11:54:12 OVZ courierlocal: id=0000000000220008.000000004D22FC54.00000F48,from=<komodo@domain.net>,addr=<komodo@domain.cz>,size=542,success: Message delivered.
So localy is delivered, but vacation not.
And there is no other log.
On Tue, 2011-01-04 at 11:59 +0100, komodo wrote:
[root@OVZ.mail ~]# /usr/sbin/sendmail -i -f '<>' -- komodo@domain.com 517 Syntax error.
What is your /usr/sbin/sendmail? It shouldn't be behaving like this. You could try if /usr/lib/sendmail works better. If it does, set:
sendmail_path = /usr/lib/sendmail
Jan 4 11:54:12 OVZ dovecot: lda(komodo@domain.cz): Error: sieve: msgid=<201101041154.06487.komodo@domain.net>: failed to send vacation response to <komodo@domain.net> (refer to server log for more information)
Oh, I guess the message is then sent from <> address. Makes sense. I forgot about that.
On Tue, 2011-01-04 at 13:03 +0200, Timo Sirainen wrote:
On Tue, 2011-01-04 at 11:59 +0100, komodo wrote:
[root@OVZ.mail ~]# /usr/sbin/sendmail -i -f '<>' -- komodo@domain.com 517 Syntax error.
What is your /usr/sbin/sendmail? It shouldn't be behaving like this. You could try if /usr/lib/sendmail works better. If it does, set:
sendmail_path = /usr/lib/sendmail
Right, looks like Courier's sendmail doesn't like the -i parameter. Its purpose is to not stop when there's a line with only "." in it. So if the -i parameter is removed and a rejected/vacation message body has a line with only ".", the mail is truncated. So I don't think I want to remove that parameter either.
You could of course create a sendmail.sh wrapper that removes the -i parameter. Or use sendmail binary from something else than Courier.
Op 4-1-2011 11:59, komodo schreef:
On Tuesday 04 January 2011 11:46:41 Timo Sirainen wrote:
So I think your problem is that it sends a bounce instead of a vacation message. deliver should log what it's doing, probably "rejected: <reason>". What do you see in logs? Here is the log
Jan 4 11:54:12 OVZ dovecot: lda(komodo@domain.cz): Error: sieve: msgid=<201101041154.06487.komodo@domain.net>: failed to send vacation response to<komodo@domain.net> (refer to server log for more information)
Right, it fails.
Jan 4 11:54:12 OVZ dovecot: lda(komodo@domain.cz): sieve: msgid=<201101041154.06487.komodo@domain.net>: sent vacation response to<komodo@domain.net>
Unrelated to your problem, but the second (success) message is not supposed to be there. This is a bug, fixed:
http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/a8da6eef445d
Regards,
Stephan.
participants (3)
-
komodo
-
Stephan Bosch
-
Timo Sirainen