[Dovecot] Dovecot Virtual Users with Sendmail
I'm trying to get Dovecot working with Virtual Users and Sendmail on OpenIndiana 151a7. OpenIndiana is the Open Source continuation of OpenSolaris after Oracle tried to kill it off a couple of years ago shortly after acquiring Sun Microsystems.
I'm not sure if this is so much a Dovecot problem, as much of a Sendmail problem. I thought this would probably be a better list to start with, though. If not, please let me know.
I initially used this Dovecot wiki page to approach this: Simple Virtual User Installation
http://wiki2.dovecot.org/HowTo/SimpleVirtualInstall
I had to make few minor changes, but I don't think anything significant to the problem I'm having.
I can log into SquirrelMail with both virtual users, and with system users.
I can send mail to system users from both virtual and system users.
I can see the mail that I sent in the Sent Messages folder for both types of users.
I just can't send mail to virtual users. When I try to, I get the following message:
ERROR: Message not sent. Server replied: Requested action not taken: mailbox unavailable 550 5.1.1 dswebstore@localhost... User unknown My configuration info is as follows:
systemuser@openindiana:~# /usr/local/sbin/dovecot --version 2.1.12
systemuser@openindiana:~# /usr/local/sbin/dovecot -n
# 2.1.12: /usr/local/etc/dovecot/dovecot.conf
# OS: SunOS 5.11 i86pc
auth_verbose = yes
base_dir = /var/run/dovecot/
disable_plaintext_auth = no
first_valid_uid = 101
info_log_path = /var/log/dovecot-info.log
log_path = /var/log/dovecot.log
mail_location = mbox:/home/vmail/%u/mail:INBOX=/var/mail/%u
passdb {
args = /usr/local/etc/dovecot/passwd
driver = passwd-file
}
pop3_uidl_format = %g
protocols = imap pop3
service auth {
unix_listener auth-userdb {
group = vmail
mode = 0600
user = vmail
}
}
ssl = no
userdb {
args = uid=vmail gid=vmail home=/home/vmail/%u
driver = static
}
protocol lda {
postmaster_address = systemuser@localhost
}
My dovecot password file looks something like this, though changed for obvious security reasons:
systemuser:{PLAIN} systemuserPASS virtualuser1:{PLAIN}virtualuser1PASS virtualuser2:{PLAIN}virtualuser2PASS
I read on this page that I needed to put the following in my sendmail dovecot.m4 file:
Dovecot LDA with Sendmail http://wiki2.dovecot.org/LDA/Sendmail
So this is my dovecot.m4 file, which shows up in my sendmail.cf file after recompiling my sendmail.mc file.
######################*****############## ### DOVECOT Mailer specification ### ##################*****################## Mdovecot, P=/usr/local/libexec/dovecot/dovecot-lda, F=DFMPhnu9, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, T=DNS/RFC822/X-Unix, A=/usr/local/libexec/dovecot/dovecot-lda -d $u
Finally, this is my sendmail.mc file:
divert(-1) # # Copyright (c) 1983 Eric P. Allman # Copyright (c) 1988, 1993 # The Regents of the University of California. All rights reserved. # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # This is a configuration file for SunOS 5.8 (a.k.a. Solaris 8) and later # subsidiary machines. It has support for local and SMTP mail. The # confFALLBACK_SMARTHOST macro is enabled, which means that messages will # be sent to that host (which is set to mailhost.$m [$m is the local domain]) # if MX records are unavailable. A short-cut rule is also defined, which # says if the recipient host is in the local domain, send to it directly # instead of the smart host. # # If you want to customize this further, copy it to a name appropriate # for your environment and do the modifications there. #
divert(0)dnl
VERSIONID(sendmail.mc (Sun)') OSTYPE(
solaris8')dnl
DOMAIN(solaris-generic')dnl define(
confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl
define(PROCMAIL_MAILER_PATH',
/usr/bin/procmail')dnl
FEATURE(local_procmail,',
procmail -t -Y -a $h -d $u')dnl
MAILER(local')dnl MAILER(
smtp')dnl
MAILER(procmail')dnl MAILER(
dovecot')dnl
LOCAL_NET_CONFIG R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3
I think it is obvious that it is a problem with Sendmail not recognizing Dovecot's virtual users. But how do I fix it?
If anyone could help me with this, I would *greatly* appreciate it. I've been picking away at this for about three weeks now, and I'm pretty much out of ideas of anything else to try.
Cordially,
Peter, hieromonk
Dormition Skete Monastery Website: http://www.DormitionSkete.org Convent Website: http://www.HolyApostlesConvent.org
Dovecot has no problem with virtual users, but Sendmail's idea of virtual users is not quite as 'virtual'.
One possible solution: http://www.cs.fsu.edu/~langley/USVH-tr.pdf That was 2007.. so perhaps somebody has written this up in a more concise way..
or you can wrestle with ldap. :-(
or switch MTAs.
Ken A.
On 12/30/2012 9:19 PM, DormitionSkete@hotmail.com wrote:
I'm trying to get Dovecot working with Virtual Users and Sendmail on OpenIndiana 151a7. OpenIndiana is the Open Source continuation of OpenSolaris after Oracle tried to kill it off a couple of years ago shortly after acquiring Sun Microsystems.
I'm not sure if this is so much a Dovecot problem, as much of a Sendmail problem. I thought this would probably be a better list to start with, though. If not, please let me know.
I initially used this Dovecot wiki page to approach this: Simple Virtual User Installation
http://wiki2.dovecot.org/HowTo/SimpleVirtualInstall
I had to make few minor changes, but I don't think anything significant to the problem I'm having.
I can log into SquirrelMail with both virtual users, and with system users.
I can send mail to system users from both virtual and system users.
I can see the mail that I sent in the Sent Messages folder for both types of users.
I just can't send mail to virtual users. When I try to, I get the following message:
ERROR: Message not sent. Server replied: Requested action not taken: mailbox unavailable 550 5.1.1 dswebstore@localhost... User unknown My configuration info is as follows:
systemuser@openindiana:~# /usr/local/sbin/dovecot --version 2.1.12
systemuser@openindiana:~# /usr/local/sbin/dovecot -n # 2.1.12: /usr/local/etc/dovecot/dovecot.conf # OS: SunOS 5.11 i86pc
auth_verbose = yes base_dir = /var/run/dovecot/ disable_plaintext_auth = no first_valid_uid = 101 info_log_path = /var/log/dovecot-info.log log_path = /var/log/dovecot.log mail_location = mbox:/home/vmail/%u/mail:INBOX=/var/mail/%u passdb { args = /usr/local/etc/dovecot/passwd driver = passwd-file } pop3_uidl_format = %g protocols = imap pop3 service auth { unix_listener auth-userdb { group = vmail mode = 0600 user = vmail } } ssl = no userdb { args = uid=vmail gid=vmail home=/home/vmail/%u driver = static } protocol lda { postmaster_address = systemuser@localhost }
My dovecot password file looks something like this, though changed for obvious security reasons:
systemuser:{PLAIN} systemuserPASS virtualuser1:{PLAIN}virtualuser1PASS virtualuser2:{PLAIN}virtualuser2PASS
I read on this page that I needed to put the following in my sendmail dovecot.m4 file:
Dovecot LDA with Sendmail http://wiki2.dovecot.org/LDA/Sendmail
So this is my dovecot.m4 file, which shows up in my sendmail.cf file after recompiling my sendmail.mc file.
######################*****############## ### DOVECOT Mailer specification ### ##################*****################## Mdovecot, P=/usr/local/libexec/dovecot/dovecot-lda, F=DFMPhnu9, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, T=DNS/RFC822/X-Unix, A=/usr/local/libexec/dovecot/dovecot-lda -d $u
Finally, this is my sendmail.mc file:
divert(-1) # # Copyright (c) 1983 Eric P. Allman # Copyright (c) 1988, 1993 # The Regents of the University of California. All rights reserved. # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # This is a configuration file for SunOS 5.8 (a.k.a. Solaris 8) and later # subsidiary machines. It has support for local and SMTP mail. The # confFALLBACK_SMARTHOST macro is enabled, which means that messages will # be sent to that host (which is set to mailhost.$m [$m is the local domain]) # if MX records are unavailable. A short-cut rule is also defined, which # says if the recipient host is in the local domain, send to it directly # instead of the smart host. # # If you want to customize this further, copy it to a name appropriate # for your environment and do the modifications there. #
divert(0)dnl VERSIONID(
sendmail.mc (Sun)') OSTYPE(
solaris8')dnl DOMAIN(solaris-generic')dnl define(
confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnldefine(
PROCMAIL_MAILER_PATH',
/usr/bin/procmail')dnl FEATURE(local_procmail,',
procmail -t -Y -a $h -d $u')dnlMAILER(
local')dnl MAILER(
smtp')dnlMAILER(
procmail')dnl MAILER(
dovecot')dnlLOCAL_NET_CONFIG R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3
I think it is obvious that it is a problem with Sendmail not recognizing Dovecot's virtual users. But how do I fix it?
If anyone could help me with this, I would *greatly* appreciate it. I've been picking away at this for about three weeks now, and I'm pretty much out of ideas of anything else to try.
Cordially,
Peter, hieromonk
Dormition Skete Monastery Website: http://www.DormitionSkete.org Convent Website: http://www.HolyApostlesConvent.org
-- Ken Anderson Pacific Internet - http://www.pacific.net Latest Pacific.Net Status - http://twitter.com/pacnetstatus
Thank you very much for the article. It was quite interesting. All thirteen pages!
Unless somebody else posts that they've managed to get Sendmail to work with Dovecot virtual users, then I think your suggestion to look at a different MTA might just be the best route to take.
Thank you again. I do appreciate it.
I hope you have a happy new year! -- All year long!!
fp
On Dec 31, 2012, at 12:14 PM, Ken A wrote:
Dovecot has no problem with virtual users, but Sendmail's idea of virtual users is not quite as 'virtual'.
One possible solution: http://www.cs.fsu.edu/~langley/USVH-tr.pdf That was 2007.. so perhaps somebody has written this up in a more concise way..
or you can wrestle with ldap. :-(
or switch MTAs.
Ken A.
On 12/30/2012 9:19 PM, DormitionSkete@hotmail.com wrote:
I'm trying to get Dovecot working with Virtual Users and Sendmail on OpenIndiana 151a7. OpenIndiana is the Open Source continuation of OpenSolaris after Oracle tried to kill it off a couple of years ago shortly after acquiring Sun Microsystems.
I'm not sure if this is so much a Dovecot problem, as much of a Sendmail problem. I thought this would probably be a better list to start with, though. If not, please let me know.
I initially used this Dovecot wiki page to approach this: Simple Virtual User Installation
http://wiki2.dovecot.org/HowTo/SimpleVirtualInstall
I had to make few minor changes, but I don't think anything significant to the problem I'm having.
I can log into SquirrelMail with both virtual users, and with system users.
I can send mail to system users from both virtual and system users.
I can see the mail that I sent in the Sent Messages folder for both types of users.
I just can't send mail to virtual users. When I try to, I get the following message:
ERROR: Message not sent. Server replied: Requested action not taken: mailbox unavailable 550 5.1.1 dswebstore@localhost... User unknown My configuration info is as follows:
systemuser@openindiana:~# /usr/local/sbin/dovecot --version 2.1.12
systemuser@openindiana:~# /usr/local/sbin/dovecot -n # 2.1.12: /usr/local/etc/dovecot/dovecot.conf # OS: SunOS 5.11 i86pc
auth_verbose = yes base_dir = /var/run/dovecot/ disable_plaintext_auth = no first_valid_uid = 101 info_log_path = /var/log/dovecot-info.log log_path = /var/log/dovecot.log mail_location = mbox:/home/vmail/%u/mail:INBOX=/var/mail/%u passdb { args = /usr/local/etc/dovecot/passwd driver = passwd-file } pop3_uidl_format = %g protocols = imap pop3 service auth { unix_listener auth-userdb { group = vmail mode = 0600 user = vmail } } ssl = no userdb { args = uid=vmail gid=vmail home=/home/vmail/%u driver = static } protocol lda { postmaster_address = systemuser@localhost }
My dovecot password file looks something like this, though changed for obvious security reasons:
systemuser:{PLAIN} systemuserPASS virtualuser1:{PLAIN}virtualuser1PASS virtualuser2:{PLAIN}virtualuser2PASS
I read on this page that I needed to put the following in my sendmail dovecot.m4 file:
Dovecot LDA with Sendmail http://wiki2.dovecot.org/LDA/Sendmail
So this is my dovecot.m4 file, which shows up in my sendmail.cf file after recompiling my sendmail.mc file.
######################*****############## ### DOVECOT Mailer specification ### ##################*****################## Mdovecot, P=/usr/local/libexec/dovecot/dovecot-lda, F=DFMPhnu9, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, T=DNS/RFC822/X-Unix, A=/usr/local/libexec/dovecot/dovecot-lda -d $u
Finally, this is my sendmail.mc file:
divert(-1) # # Copyright (c) 1983 Eric P. Allman # Copyright (c) 1988, 1993 # The Regents of the University of California. All rights reserved. # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # This is a configuration file for SunOS 5.8 (a.k.a. Solaris 8) and later # subsidiary machines. It has support for local and SMTP mail. The # confFALLBACK_SMARTHOST macro is enabled, which means that messages will # be sent to that host (which is set to mailhost.$m [$m is the local domain]) # if MX records are unavailable. A short-cut rule is also defined, which # says if the recipient host is in the local domain, send to it directly # instead of the smart host. # # If you want to customize this further, copy it to a name appropriate # for your environment and do the modifications there. #
divert(0)dnl VERSIONID(
sendmail.mc (Sun)') OSTYPE(
solaris8')dnl DOMAIN(solaris-generic')dnl define(
confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnldefine(
PROCMAIL_MAILER_PATH',
/usr/bin/procmail')dnl FEATURE(local_procmail,',
procmail -t -Y -a $h -d $u')dnlMAILER(
local')dnl MAILER(
smtp')dnlMAILER(
procmail')dnl MAILER(
dovecot')dnlLOCAL_NET_CONFIG R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3
I think it is obvious that it is a problem with Sendmail not recognizing Dovecot's virtual users. But how do I fix it?
If anyone could help me with this, I would *greatly* appreciate it. I've been picking away at this for about three weeks now, and I'm pretty much out of ideas of anything else to try.
Cordially,
Peter, hieromonk
Dormition Skete Monastery Website: http://www.DormitionSkete.org Convent Website: http://www.HolyApostlesConvent.org
-- Ken Anderson Pacific Internet - http://www.pacific.net Latest Pacific.Net Status - http://twitter.com/pacnetstatus
On Jan 1, 2013, at 10:31 AM, Andrzej A. Filip wrote:
On 12/31/2012 04:19 AM, DormitionSkete@hotmail.com wrote:
[...]
- Do you use virtual users with or without domain part? [virtual-user or virtual-user@exaple.net ]
Without.
virtual-user
- How many entries do you have in paswdb/userdb files? [<100,<1000,....]
<100
Around 10.
- Is SMTP AUTH crucial for virtual users?
No. I'd like it, but it's not crucial.
We don't have it now for anyone. The only way we access our email outside the monastery is through SquirrelMail. I was hoping to add that with this server upgrade. It'd be nice to open our email access up more, but we can live without it if we have to.
Am 01.01.2013 18:40, schrieb DormitionSkete@hotmail.com:
- Is SMTP AUTH crucial for virtual users?
No. I'd like it, but it's not crucial.
We don't have it now for anyone. The only way we access our email outside the monastery is through SquirrelMail. I was hoping to add that with this server upgrade. It'd be nice to open our email access up more, but we can live without it if we have to.
get rid of sendmail postfix supports SASL via dovecot
who in the world does a setup which allows SMTP without authentication? if some of your user accounts get hacked and used for spam you even have no chance to see in the smtp-log which user is affected
On 01/01/2013 06:40 PM, DormitionSkete@hotmail.com wrote:
On Jan 1, 2013, at 10:31 AM, Andrzej A. Filip wrote:
On 12/31/2012 04:19 AM, DormitionSkete@hotmail.com wrote:
[...]
- Do you use virtual users with or without domain part? [virtual-user or virtual-user@exaple.net ]
Without.
virtual-user
- How many entries do you have in paswdb/userdb files? [<100,<1000,....] <100
Around 10.
- Is SMTP AUTH crucial for virtual users?
No. I'd like it, but it's not crucial.
We don't have it now for anyone. The only way we access our email outside the monastery is through SquirrelMail. I was hoping to add that with this server upgrade. It'd be nice to open our email access up more, but we can live without it if we have to.
Based on the above replies I would suggest first modified version of the recipe below. There are many other ways but it seems to best fit your case with simple and stable changes to sendmail.mc/sendmail.cf. http://anfi.homeunix.org/sendmail/localNalias.html
- In *.mc file add LOCAL_CONFIG
declare DOVECOT "magic word"
CPDOVECOT
Deliver messages to *@DOVECOT using dovecot mailer [requires FEATURE(`mailertable')]. mailertable: DOVECOT dovecot:localhost
Do not accept messages to *@DOVECOT via SMTP [requires FEATURE(
access_db') and FEATURE(
blacklist_recipients')] access: to:DOVECOT REJECTcreate aliases for virtualusers (one alias per one virtual user) aliases: virtualuser1: virtualuser1@DOVECOT virtualuser2: virtualuser2@DOVECOT
Comments about "narrowing" questions:
- case with domain part is usually more complex
- sendmail may be configured to check recipient existence in dovecot's userdb/paswdb files but it would use method I would not recommend for bigger userdb/passwd files
- sendmail supports cyrus-sasl, sendmail does not support dovecot-sasl
Thank you, Andrzej, for helping us. I really appreciate it.
It no longer rejects the mail that I try to send to the virtual users. It just tries to send it for eternity. SquirrelMail says, "Waiting for localhost". It does not get rejected. It does not get sent. It does not leave anything in any log that I can find. It does not even seem to time out. I think I waited at least five minutes while it tried to send a message to a virtual user @localhost.
I'm not sure if I did this right. Below are my sendmail files. Of course, I rebuilt the .mc -> .cf file, and all of the .db files.
sendmail.mc
divert(-1) # # Copyright (c) 1983 Eric P. Allman # Copyright (c) 1988, 1993 # The Regents of the University of California. All rights reserved. # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # This is a configuration file for SunOS 5.8 (a.k.a. Solaris 8) and later # subsidiary machines. It has support for local and SMTP mail. The # confFALLBACK_SMARTHOST macro is enabled, which means that messages will # be sent to that host (which is set to mailhost.$m [$m is the local domain]) # if MX records are unavailable. A short-cut rule is also defined, which # says if the recipient host is in the local domain, send to it directly # instead of the smart host. # # If you want to customize this further, copy it to a name appropriate # for your environment and do the modifications there. #
divert(0)dnl
VERSIONID(sendmail.mc (Sun)') OSTYPE(
solaris8')dnl
DOMAIN(solaris-generic')dnl define(
confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl
define(PROCMAIL_MAILER_PATH',
/usr/bin/procmail')dnl
FEATURE(local_procmail,',
procmail -t -Y -a $h -d $u')dnl
FEATURE(`mailertable')
FEATURE(access_db') FEATURE(
blacklist_recipients')
MAILER(local')dnl MAILER(
smtp')dnl
MAILER(procmail')dnl MAILER(
dovecot')dnl
LOCAL_CONFIG # declare DOVECOT "magic word" CPDOVECOT
LOCAL_NET_CONFIG R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3
access -- I am wondering if this is the problem?
# Check the /usr/share/doc/sendmail/README.cf file for a description # of the format of this file. (search for access_db in that file) # The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc # package. #
to:DOVECOT REJECT
# by default we allow relaying from localhost... localhost.localdomain RELAY localhost RELAY 127.0.0.1 RELAY dsicons.net RELAY dormitionskete.net RELAY holyapostlesconvent.org RELAY dormitionskete.info RELAY 174.32.127.90 RELAY 174.32.127.91 RELAY 174.32.127.92 RELAY 174.32.127.93 RELAY 174.32.127.94 RELAY
aliases
# # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # #ident "%Z%%M% %I% %E% SMI"
## # Aliases can have any mix of upper and lower case on the left-hand side, # but the right-hand side should be proper case (usually lower) # # >>>>>>>>>> The program "newaliases" must be run after # >> NOTE >> this file is updated for any changes to # >>>>>>>>>> show through to sendmail. ##
# The following alias is required by the mail protocol, RFC 2821 # Set it to the address of a HUMAN who deals with this system's mail problems. postmaster: root
# Alias for mailer daemon; returned messages from our MAILER-DAEMON # should be routed to our local Postmaster. MAILER-DAEMON: postmaster
# General redirections for pseudo accounts. bin: root daemon: root system: root toor: root uucp: root
# Well-known aliases. manager: root dumper: root operator: root
# trap decode to catch security attacks decode: root
# Aliases to handle mail to programs or files, eg news or vacation nobody: /dev/null
# Sample aliases:
# Alias for distribution list, members specified here: #staff:wnj,mosher,sam,ecc,mckusick,sklower,olson,rwh@ernie
# Alias for distribution list, members specified elsewhere: #keyboards: :include:/usr/jfarrell/keyboards.list
# Alias for a person, so they can receive mail by several names: #epa:eric
####################### # Local aliases below # #######################
dswebstore: dswebstore@DOVECOT hacwebstore: hacwebstore@DOVECOT
mailertable
DOVECOT dovecot:localhost
virtualusertable -- empty.
Did I do it right? Any ideas?
On Jan 1, 2013, at 11:26 AM, Andrzej A. Filip wrote:
On 01/01/2013 06:40 PM, DormitionSkete@hotmail.com wrote:
On Jan 1, 2013, at 10:31 AM, Andrzej A. Filip wrote:
On 12/31/2012 04:19 AM, DormitionSkete@hotmail.com wrote:
[...]
- Do you use virtual users with or without domain part? [virtual-user or virtual-user@exaple.net ]
Without.
virtual-user
- How many entries do you have in paswdb/userdb files? [<100,<1000,....] <100
Around 10.
- Is SMTP AUTH crucial for virtual users?
No. I'd like it, but it's not crucial.
We don't have it now for anyone. The only way we access our email outside the monastery is through SquirrelMail. I was hoping to add that with this server upgrade. It'd be nice to open our email access up more, but we can live without it if we have to.
Based on the above replies I would suggest first modified version of the recipe below. There are many other ways but it seems to best fit your case with simple and stable changes to sendmail.mc/sendmail.cf. http://anfi.homeunix.org/sendmail/localNalias.html
- In *.mc file add LOCAL_CONFIG
declare DOVECOT "magic word"
CPDOVECOT
Deliver messages to *@DOVECOT using dovecot mailer [requires FEATURE(`mailertable')]. mailertable: DOVECOT dovecot:localhost
Do not accept messages to *@DOVECOT via SMTP [requires FEATURE(
access_db') and FEATURE(
blacklist_recipients')] access: to:DOVECOT REJECTcreate aliases for virtualusers (one alias per one virtual user) aliases: virtualuser1: virtualuser1@DOVECOT virtualuser2: virtualuser2@DOVECOT
Comments about "narrowing" questions:
- case with domain part is usually more complex
- sendmail may be configured to check recipient existence in dovecot's userdb/paswdb files but it would use method I would not recommend for bigger userdb/passwd files
- sendmail supports cyrus-sasl, sendmail does not support dovecot-sasl
On 01/01/2013 10:18 PM, DormitionSkete@hotmail.com wrote:
Thank you, Andrzej, for helping us. I really appreciate it.
It no longer rejects the mail that I try to send to the virtual users. It just tries to send it for eternity. SquirrelMail says, "Waiting for localhost". It does not get rejected. It does not get sent. It does not leave anything in any log that I can find. It does not even seem to time out. I think I waited at least five minutes while it tried to send a message to a virtual user @localhost.
I'm not sure if I did this right. Below are my sendmail files. Of course, I rebuilt the .mc -> .cf file, and all of the .db files.
sendmail.mc
divert(-1) # # Copyright (c) 1983 Eric P. Allman # Copyright (c) 1988, 1993 # The Regents of the University of California. All rights reserved. # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # This is a configuration file for SunOS 5.8 (a.k.a. Solaris 8) and later # subsidiary machines. It has support for local and SMTP mail. The # confFALLBACK_SMARTHOST macro is enabled, which means that messages will # be sent to that host (which is set to mailhost.$m [$m is the local domain]) # if MX records are unavailable. A short-cut rule is also defined, which # says if the recipient host is in the local domain, send to it directly # instead of the smart host. # # If you want to customize this further, copy it to a name appropriate # for your environment and do the modifications there. #
divert(0)dnl VERSIONID(
sendmail.mc (Sun)') OSTYPE(
solaris8')dnl DOMAIN(solaris-generic')dnl define(
confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnldefine(
PROCMAIL_MAILER_PATH',
/usr/bin/procmail')dnl FEATURE(local_procmail,',
procmail -t -Y -a $h -d $u')dnlFEATURE(`mailertable')
FEATURE(
access_db') FEATURE(
blacklist_recipients')MAILER(
local')dnl MAILER(
smtp')dnlMAILER(
procmail')dnl MAILER(
dovecot')dnlLOCAL_CONFIG # declare DOVECOT "magic word" CPDOVECOT
LOCAL_NET_CONFIG R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3
access -- I am wondering if this is the problem?
# Check the /usr/share/doc/sendmail/README.cf file for a description # of the format of this file. (search for access_db in that file) # The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc # package. #
to:DOVECOT REJECT
# by default we allow relaying from localhost... localhost.localdomain RELAY localhost RELAY 127.0.0.1 RELAY dsicons.net RELAY dormitionskete.net RELAY holyapostlesconvent.org RELAY dormitionskete.info RELAY 174.32.127.90 RELAY 174.32.127.91 RELAY 174.32.127.92 RELAY 174.32.127.93 RELAY 174.32.127.94 RELAY
aliases
# # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # #ident "%Z%%M% %I% %E% SMI"
## # Aliases can have any mix of upper and lower case on the left-hand side, # but the right-hand side should be proper case (usually lower) # # >>>>>>>>>> The program "newaliases" must be run after # >> NOTE >> this file is updated for any changes to # >>>>>>>>>> show through to sendmail. ##
# The following alias is required by the mail protocol, RFC 2821 # Set it to the address of a HUMAN who deals with this system's mail problems. postmaster: root
# Alias for mailer daemon; returned messages from our MAILER-DAEMON # should be routed to our local Postmaster. MAILER-DAEMON: postmaster
# General redirections for pseudo accounts. bin: root daemon: root system: root toor: root uucp: root
# Well-known aliases. manager: root dumper: root operator: root
# trap decode to catch security attacks decode: root
# Aliases to handle mail to programs or files, eg news or vacation nobody: /dev/null
# Sample aliases:
# Alias for distribution list, members specified here: #staff:wnj,mosher,sam,ecc,mckusick,sklower,olson,rwh@ernie
# Alias for distribution list, members specified elsewhere: #keyboards: :include:/usr/jfarrell/keyboards.list
# Alias for a person, so they can receive mail by several names: #epa:eric
####################### # Local aliases below # #######################
dswebstore: dswebstore@DOVECOT hacwebstore: hacwebstore@DOVECOT
mailertable
DOVECOT dovecot:localhost
virtualusertable -- empty.
Did I do it right? Any ideas?
As root execute test command below: sendmail -d60.5 -d27.2 -bv hacwebstore
-d60.5 should trace map lookups (including mailertable) -d27.2 should trace alias expansion
Most likely you should among other things fix R= and S= part of dovecot mailer to make it strip envelope recipient domain. S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, [ http://wiki.dovecot.org/LDA/Sendmail ]
On Jan 1, 2013, at 3:34 PM, Andrzej A. Filip wrote:
On 01/01/2013 10:18 PM, DormitionSkete@hotmail.com wrote:
Thank you, Andrzej, for helping us. I really appreciate it.
It no longer rejects the mail that I try to send to the virtual users. It just tries to send it for eternity. SquirrelMail says, "Waiting for localhost". It does not get rejected. It does not get sent. It does not leave anything in any log that I can find. It does not even seem to time out. I think I waited at least five minutes while it tried to send a message to a virtual user @localhost.
I'm not sure if I did this right. Below are my sendmail files. Of course, I rebuilt the .mc -> .cf file, and all of the .db files.
sendmail.mc
divert(-1) # # Copyright (c) 1983 Eric P. Allman # Copyright (c) 1988, 1993 # The Regents of the University of California. All rights reserved. # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # This is a configuration file for SunOS 5.8 (a.k.a. Solaris 8) and later # subsidiary machines. It has support for local and SMTP mail. The # confFALLBACK_SMARTHOST macro is enabled, which means that messages will # be sent to that host (which is set to mailhost.$m [$m is the local domain]) # if MX records are unavailable. A short-cut rule is also defined, which # says if the recipient host is in the local domain, send to it directly # instead of the smart host. # # If you want to customize this further, copy it to a name appropriate # for your environment and do the modifications there. #
divert(0)dnl VERSIONID(
sendmail.mc (Sun)') OSTYPE(
solaris8')dnl DOMAIN(solaris-generic')dnl define(
confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnldefine(
PROCMAIL_MAILER_PATH',
/usr/bin/procmail')dnl FEATURE(local_procmail,',
procmail -t -Y -a $h -d $u')dnlFEATURE(`mailertable')
FEATURE(
access_db') FEATURE(
blacklist_recipients')MAILER(
local')dnl MAILER(
smtp')dnlMAILER(
procmail')dnl MAILER(
dovecot')dnlLOCAL_CONFIG # declare DOVECOT "magic word" CPDOVECOT
LOCAL_NET_CONFIG R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3
access -- I am wondering if this is the problem?
# Check the /usr/share/doc/sendmail/README.cf file for a description # of the format of this file. (search for access_db in that file) # The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc # package. #
to:DOVECOT REJECT
# by default we allow relaying from localhost... localhost.localdomain RELAY localhost RELAY 127.0.0.1 RELAY dsicons.net RELAY dormitionskete.net RELAY holyapostlesconvent.org RELAY dormitionskete.info RELAY 174.32.127.90 RELAY 174.32.127.91 RELAY 174.32.127.92 RELAY 174.32.127.93 RELAY 174.32.127.94 RELAY
aliases
# # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # #ident "%Z%%M% %I% %E% SMI"
## # Aliases can have any mix of upper and lower case on the left-hand side, # but the right-hand side should be proper case (usually lower) # # >>>>>>>>>> The program "newaliases" must be run after # >> NOTE >> this file is updated for any changes to # >>>>>>>>>> show through to sendmail. ##
# The following alias is required by the mail protocol, RFC 2821 # Set it to the address of a HUMAN who deals with this system's mail problems. postmaster: root
# Alias for mailer daemon; returned messages from our MAILER-DAEMON # should be routed to our local Postmaster. MAILER-DAEMON: postmaster
# General redirections for pseudo accounts. bin: root daemon: root system: root toor: root uucp: root
# Well-known aliases. manager: root dumper: root operator: root
# trap decode to catch security attacks decode: root
# Aliases to handle mail to programs or files, eg news or vacation nobody: /dev/null
# Sample aliases:
# Alias for distribution list, members specified here: #staff:wnj,mosher,sam,ecc,mckusick,sklower,olson,rwh@ernie
# Alias for distribution list, members specified elsewhere: #keyboards: :include:/usr/jfarrell/keyboards.list
# Alias for a person, so they can receive mail by several names: #epa:eric
####################### # Local aliases below # #######################
dswebstore: dswebstore@DOVECOT hacwebstore: hacwebstore@DOVECOT
mailertable
DOVECOT dovecot:localhost
virtualusertable -- empty.
Did I do it right? Any ideas?
As root execute test command below: sendmail -d60.5 -d27.2 -bv hacwebstore
-d60.5 should trace map lookups (including mailertable) -d27.2 should trace alias expansion
Most likely you should among other things fix R= and S= part of dovecot mailer to make it strip envelope recipient domain. S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, [ http://wiki.dovecot.org/LDA/Sendmail ]
I ran it without making any changes. This is the output.
systemuser@openindiana:~/Downloads/Sendmail# sendmail -d60.5 -d27.2 -bv hacwebstore map_lookup(dequote, systemuser, %0=systemuser) => NOT FOUND (0) map_lookup(dequote, hacwebstore, %0=hacwebstore) => NOT FOUND (0) alias(hacwebstore) aliaswait: sleeping for 2 seconds (loopcount = 1) aliaswait: sleeping for 4 seconds (loopcount = 2) aliaswait: sleeping for 8 seconds (loopcount = 3) aliaswait: sleeping for 16 seconds (loopcount = 4) aliaswait: sleeping for 32 seconds (loopcount = 5) aliaswait: sleeping for 60 seconds (loopcount = 6) ^Csystemuser@openindiana:~/Downloads/Sendmail#
Then I made these changes to the sendmail.cf file, and restarted sendmail.
######################*****############## ### DOVECOT Mailer specification ### ##################*****################## Mdovecot, P=/usr/local/libexec/dovecot/dovecot-lda, F=DFMPhnu9, S=EnvFromL/HdrFromL, R=EnvToL/HdrFromL, T=DNS/RFC822/X-Unix, A=/usr/local/libexec/dovecot/dovecot-lda -d $u
This was the output with the modified sendmail.cf:
systemuser@openindiana:~/Downloads/Sendmail# sendmail -d60.5 -d27.2 -bv hacwebstore map_lookup(dequote, systemuser, %0=systemuser) => NOT FOUND (0) map_lookup(dequote, hacwebstore, %0=hacwebstore) => NOT FOUND (0) alias(hacwebstore) aliaswait: sleeping for 2 seconds (loopcount = 1) aliaswait: sleeping for 4 seconds (loopcount = 2) aliaswait: sleeping for 8 seconds (loopcount = 3) ^Csystemuser@openindiana:~/Downloads/Sendmail#
On 01/02/2013 12:09 AM, DormitionSkete@hotmail.com wrote:
[...] I ran it without making any changes. This is the output.
systemuser@openindiana:~/Downloads/Sendmail# sendmail -d60.5 -d27.2 -bv hacwebstore map_lookup(dequote, systemuser, %0=systemuser) => NOT FOUND (0) map_lookup(dequote, hacwebstore, %0=hacwebstore) => NOT FOUND (0) alias(hacwebstore) aliaswait: sleeping for 2 seconds (loopcount = 1) aliaswait: sleeping for 4 seconds (loopcount = 2) aliaswait: sleeping for 8 seconds (loopcount = 3) aliaswait: sleeping for 16 seconds (loopcount = 4) aliaswait: sleeping for 32 seconds (loopcount = 5) aliaswait: sleeping for 60 seconds (loopcount = 6) ^Csystemuser@openindiana:~/Downloads/Sendmail# [...] Have you executed newaliases command after modifying aliases file? The command adds special "magic" entry to the compiled version of aliases file used by sendmail.
URL(s): http://etutorials.org/Server+Administration/Sendmail/Part+III+The+Configurat...
On Jan 2, 2013, at 4:05 AM, Andrzej A. Filip wrote:
On 01/02/2013 12:09 AM, DormitionSkete@hotmail.com wrote:
[...] I ran it without making any changes. This is the output.
systemuser@openindiana:~/Downloads/Sendmail# sendmail -d60.5 -d27.2 -bv hacwebstore map_lookup(dequote, systemuser, %0=systemuser) => NOT FOUND (0) map_lookup(dequote, hacwebstore, %0=hacwebstore) => NOT FOUND (0) alias(hacwebstore) aliaswait: sleeping for 2 seconds (loopcount = 1) aliaswait: sleeping for 4 seconds (loopcount = 2) aliaswait: sleeping for 8 seconds (loopcount = 3) aliaswait: sleeping for 16 seconds (loopcount = 4) aliaswait: sleeping for 32 seconds (loopcount = 5) aliaswait: sleeping for 60 seconds (loopcount = 6) ^Csystemuser@openindiana:~/Downloads/Sendmail# [...] Have you executed newaliases command after modifying aliases file? The command adds special "magic" entry to the compiled version of aliases file used by sendmail.
URL(s): http://etutorials.org/Server+Administration/Sendmail/Part+III+The+Configurat...
Andrzej, I think we're making progress. Now I can send mail to the virtual users, but it gets stuck in the mqueue.
This is what your test says now:
systemuser@openindiana:/etc/mail/cf/cf/DsMiscFiles# !481 sendmail -d60.5 -d27.2 -bv hacwebstore map_lookup(dequote, systemuser, %0=systemuser) => NOT FOUND (0) map_lookup(dequote, hacwebstore, %0=hacwebstore) => NOT FOUND (0) alias(hacwebstore) hacwebstore (, hacwebstore) aliased to hacwebstore@DOVECOT map_lookup(mailertable, DOVECOT, %0=DOVECOT) => dovecot:localhost (0) self_reference(hacwebstore@DOVECOT) ... no self ref hacwebstore@DOVECOT... deliverable: mailer dovecot, host localhost, user hacwebstore
This is the mail header from the mqueue:
V8 T1357147927 K1357147927 N1 P30692 I0/2/205980 MDeferred: dovecot mailer (/usr/local/libexec/dovecot/dovecot-lda) exited with EX_TEMPFAIL Fbs $_openindiana [IPv6:::1] $rESMTP $slocalhost ${daemon_flags} Ssystemuser@localhost MDeferred: dovecot mailer (/usr/local/libexec/dovecot/dovecot-lda) exited with EX_TEMPFAIL Chacwebstore:1:0:hacwebstore@localhost rRFC822; hacwebstore@localhost RPFDA:hacwebstore@DOVECOT H?P?Return-Path: <g> H??Received: from localhost (openindiana [IPv6:::1]) by openindiana.local (8.14.4+Sun/8.14.4) with ESMTP id r02HW7V8001896 for hacwebstore@localhost; Wed, 2 Jan 2013 10:32:07 -0700 (MST) H?x?Full-Name: systemuser H??Received: from ::1 (SquirrelMail authenticated user systemuser) by localhost with HTTP; Wed, 2 Jan 2013 10:32:07 -0700 H??Message-ID: 313a44da88c9ce12dd7a0bd790ce85b1.squirrel@localhost H??Date: Wed, 2 Jan 2013 10:32:07 -0700 H??Subject: Test 03 H??From: systemuser@localhost H??To: hacwebstore@localhost H??User-Agent: SquirrelMail/1.4.22 H??MIME-Version: 1.0 H??Content-Type: text/plain;charset=iso-8859-1 H??Content-Transfer-Encoding: 8bit H??X-Priority: 3 (Normal) H??Importance: Normal .
On 01/02/2013 06:53 PM, DormitionSkete@hotmail.com wrote:
[...] This is the mail header from the mqueue:
[...] MDeferred: dovecot mailer (/usr/local/libexec/dovecot/dovecot-lda) exited with EX_TEMPFAIL [...]
Check dovecot's logs If it does not help the push delivery of messages ni sendmail's queue in verbose mode: "sendmail -Am -v -q"
On Jan 2, 2013, at 11:12 AM, Andrzej A. Filip wrote:
On 01/02/2013 06:53 PM, DormitionSkete@hotmail.com wrote:
[...] This is the mail header from the mqueue:
[...] MDeferred: dovecot mailer (/usr/local/libexec/dovecot/dovecot-lda) exited with EX_TEMPFAIL [...]
Check dovecot's logs If it does not help the push delivery of messages ni sendmail's queue in verbose mode: "sendmail -Am -v -q"
Well, the logs showed this:
Sep 21 21:47:08 openindiana sendmail[1208]: [ID 702911 mail.warning] gethostbyaddr(10.211.55.6) failed: 2 Sep 21 21:47:08 openindiana sendmail[1208]: [ID 702911 mail.warning] gethostbyaddr(IPv6:fec0::fea9:21c:42ff:feed:5f38) failed: 2
So I put this in my /etc/hosts file:
10.211.55.6 localhost
And I added DOVECOT to my /etc/hosts 127.0.0.1 line. This cleared the queue, but now all of the mail for the virtual users bounces with this:
The original message was received at Wed, 2 Jan 2013 11:16:27 -0700 (MST) from openindiana [IPv6:::1]
----- The following addresses had permanent fatal errors ----- hacwebstore@localhost (reason: 550 5.1.1 User unknown) hacwebstore@DOVECOT (reason: 550 5.1.1 User unknown) (expanded from: hacwebstore@localhost)
----- Transcript of session follows ----- 550 5.1.1 hacwebstore@DOVECOT... User unknown 550 5.1.1 hacwebstore@localhost... User unknown
Then I took the DOVECOT out of the 127.0.0.1 line, and it still bounces with the same error.
How would I invoke this: "sendmail -Am -v -q" ? Change my startup script?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 2 Jan 2013, DormitionSkete@hotmail.com wrote:
On Jan 2, 2013, at 11:12 AM, Andrzej A. Filip wrote:
On 01/02/2013 06:53 PM, DormitionSkete@hotmail.com wrote:
[...] This is the mail header from the mqueue:
[...] MDeferred: dovecot mailer (/usr/local/libexec/dovecot/dovecot-lda) exited with EX_TEMPFAIL [...]
Check dovecot's logs If it does not help the push delivery of messages ni sendmail's queue in verbose mode: "sendmail -Am -v -q"
Well, the logs showed this:
Note, sendmail started the /usr/local/libexec/dovecot/dovecot-lda, but the LDA failed temporarily. Where does Dovecot LDA log to?? I suppose that the LDA is executed with permissions, that does not allow to write to the mail storage or that the LDA does not have permission to access the userdb. Maybe it's the same problem as in the thread "From Sendmail to Dovecot mdbox, what is missing.".
I suggest to replace the "P=" in the Dovecot mailer with a wrapper script, you get all the necessary information with:
================ wraplda.sh #!/bin/sh
( date ; id echo "$@" /usr/local/libexec/dovecot/dovecot-lda "$@" rc=$? echo exit code: $rc exit $rc ) >> /tmp/lda.log 2>&1
Put it into your "smrsh" directory.
So I put this in my /etc/hosts file:
10.211.55.6 localhost
And I added DOVECOT to my /etc/hosts 127.0.0.1 line. This cleared the queue, but now all of the mail for the virtual users bounces with this:
No! That's against the idea of the placeholder "DOVECOT". You see that the sendmail part works, because the Dovecot LDA was started.
The original message was received at Wed, 2 Jan 2013 11:16:27 -0700 (MST) from openindiana [IPv6:::1]
----- The following addresses had permanent fatal errors ----- hacwebstore@localhost (reason: 550 5.1.1 User unknown) hacwebstore@DOVECOT (reason: 550 5.1.1 User unknown) (expanded from: hacwebstore@localhost)
----- Transcript of session follows ----- 550 5.1.1 hacwebstore@DOVECOT... User unknown 550 5.1.1 hacwebstore@localhost... User unknown
Because the LDA returns EX_TEMPFAIL, the messages stays in the queue until the temporary failure is fixed or the maximum queue stay time (usually 5 days) is reached. But in this case, the error message should be different, IMHO. I don't think that this error is from the latest test.
Regards,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUOUzYWoxLS8a3A9mAQL+WQgAtguL23X3Kqozj4rwakuRnx4kfEVwsnJK lvZXtJaj3AKEcQJVGhL41GfUJkvfvcucRmctU+srXDf2R47ZmcxTjpWnRZk8zsd2 x4R31lkHdZE0xXUnPIz/pjyjXv4A4I2Pv0Euyu3oI3m1yR7kENz5f/spgcC0A/3Z 7j0byshbTjac3212sAux5hI13B1bkec11tREaw2w6PVjYF6wsQ3PP9fFj0M7Ctmc RWazH6Sxe8dBSjW9Wd+SlYbhWl+j7A8fErxnOa34zSJQzXv1Dx5+nOrEyuDm7q7e A8ZWxc8Ss0ilXXSY0XUwvDNubQWm9wGUd/ajLt9h9Kg1Ade7zO5Dzg== =64Wz -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 3 Jan 2013, Steffen Kaiser wrote:
On Wed, 2 Jan 2013, DormitionSkete@hotmail.com wrote:
On Jan 2, 2013, at 11:12 AM, Andrzej A. Filip wrote:
On 01/02/2013 06:53 PM, DormitionSkete@hotmail.com wrote:
[...] This is the mail header from the mqueue:
[...] MDeferred: dovecot mailer (/usr/local/libexec/dovecot/dovecot-lda) exited with EX_TEMPFAIL [...]
Check dovecot's logs If it does not help the push delivery of messages ni sendmail's queue in verbose mode: "sendmail -Am -v -q"
Well, the logs showed this:
Note, sendmail started the /usr/local/libexec/dovecot/dovecot-lda, but the LDA failed temporarily. Where does Dovecot LDA log to?? I suppose that the LDA is executed with permissions, that does not allow to write to the mail storage or that the LDA does not have permission to access the userdb. Maybe it's the same problem as in the thread "From Sendmail to Dovecot mdbox, what is missing.".
I suggest to replace the "P=" in the Dovecot mailer with a wrapper script,
I mean, hack the sendmail.cf file here:
######################*****############## ### DOVECOT Mailer specification ### ##################*****################## Mdovecot, P=/usr/local/libexec/dovecot/dovecot-lda, F=DFMPhnu9, S=EnvFromL/HdrFromL, R=EnvToL/HdrFromL, T=DNS/RFC822/X-Unix, A=/usr/local/libexec/dovecot/dovecot-lda -d $u
Replace /usr/local/libexec/dovecot/dovecot-lda with /etc/mail/smrsh/wraplda.sh (or whereever your smrsh directory is located). You do have a symlink to /usr/local/libexec/dovecot/dovecot-lda in there, haven't you?
you get all the necessary information with:
================ wraplda.sh #!/bin/sh
( date ; id echo "$@" /usr/local/libexec/dovecot/dovecot-lda "$@" rc=$? echo exit code: $rc exit $rc ) >> /tmp/lda.log 2>&1
Put it into your "smrsh" directory.
Make it eXecutable.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUOU1pmoxLS8a3A9mAQJ08AgAgcMGeByiDkdn+8LxAnbN8EJMPr1Kjyyf fPiSQrl26ibX48OhWw/+jXlLtsXQQ2RkqP/+m9ojEDYlSRP/Ragj0AEcFuvD7e5K Q4V4HPOnfAUWjpIJmjNiwfYNzmJljbcNuZYc1CCUGAFxJqoKigR1shZjk25TtdGk XBe7XOUPi1+CftxVGR+q7cItFJ5IiU6chfJdFRtEARhznowqqwQsxEqB4MpJdb81 X2SDs442dReB0fgyWH4wOd/0vrAOvbganYrq5xId6fqP7eXerEgAQACj5ZK/OOiv Pw/gyVSkDiSSVJ+6sFAreLQDj6Ibsejjq/xm8bKVldbbDluQz4yAvA== =pYgA -----END PGP SIGNATURE-----
Dear Mr. Kaiser,
I got called away to deal with some unforeseen problems, and was not able to even look at this problem until late tonight. In the meantime, Andrzej posted a fix that seems to have it working now.
I really appreciate your willingness to help. If you need me to apply your script in order to help with the thread "From Sendmail to Dovecot mdbox, what is missing.", for comparison or something, I'll be happy to. Just let me know.
Thank you again. I really appreciate it.
Cordially,
Peter, hieromonk
On Jan 3, 2013, at 12:39 AM, Steffen Kaiser wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Thu, 3 Jan 2013, Steffen Kaiser wrote:
On Wed, 2 Jan 2013, DormitionSkete@hotmail.com wrote:
On Jan 2, 2013, at 11:12 AM, Andrzej A. Filip wrote:
On 01/02/2013 06:53 PM, DormitionSkete@hotmail.com wrote:
[...] This is the mail header from the mqueue: [...] MDeferred: dovecot mailer (/usr/local/libexec/dovecot/dovecot-lda) exited with EX_TEMPFAIL [...] Check dovecot's logs If it does not help the push delivery of messages ni sendmail's queue in verbose mode: "sendmail -Am -v -q" Well, the logs showed this:
Note, sendmail started the /usr/local/libexec/dovecot/dovecot-lda, but the LDA failed temporarily. Where does Dovecot LDA log to?? I suppose that the LDA is executed with permissions, that does not allow to write to the mail storage or that the LDA does not have permission to access the userdb. Maybe it's the same problem as in the thread "From Sendmail to Dovecot mdbox, what is missing.".
I suggest to replace the "P=" in the Dovecot mailer with a wrapper script,
I mean, hack the sendmail.cf file here:
######################*****############## ### DOVECOT Mailer specification ### ##################*****################## Mdovecot, P=/usr/local/libexec/dovecot/dovecot-lda, F=DFMPhnu9, S=EnvFromL/HdrFromL, R=EnvToL/HdrFromL, T=DNS/RFC822/X-Unix, A=/usr/local/libexec/dovecot/dovecot-lda -d $u
Replace /usr/local/libexec/dovecot/dovecot-lda with /etc/mail/smrsh/wraplda.sh (or whereever your smrsh directory is located). You do have a symlink to /usr/local/libexec/dovecot/dovecot-lda in there, haven't you?
you get all the necessary information with:
================ wraplda.sh #!/bin/sh
( date ; id echo "$@" /usr/local/libexec/dovecot/dovecot-lda "$@" rc=$? echo exit code: $rc exit $rc ) >> /tmp/lda.log 2>&1
Put it into your "smrsh" directory.
Make it eXecutable.
- -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUOU1pmoxLS8a3A9mAQJ08AgAgcMGeByiDkdn+8LxAnbN8EJMPr1Kjyyf fPiSQrl26ibX48OhWw/+jXlLtsXQQ2RkqP/+m9ojEDYlSRP/Ragj0AEcFuvD7e5K Q4V4HPOnfAUWjpIJmjNiwfYNzmJljbcNuZYc1CCUGAFxJqoKigR1shZjk25TtdGk XBe7XOUPi1+CftxVGR+q7cItFJ5IiU6chfJdFRtEARhznowqqwQsxEqB4MpJdb81 X2SDs442dReB0fgyWH4wOd/0vrAOvbganYrq5xId6fqP7eXerEgAQACj5ZK/OOiv Pw/gyVSkDiSSVJ+6sFAreLQDj6Ibsejjq/xm8bKVldbbDluQz4yAvA== =pYgA -----END PGP SIGNATURE-----
participants (5)
-
Andrzej A. Filip
-
DormitionSkete@hotmail.com
-
Ken A
-
Reindl Harald
-
Steffen Kaiser