[Dovecot] Dovecot Virtual Users with Sendmail

DormitionSkete@hotmail.com dormitionskete at hotmail.com
Tue Jan 1 01:52:48 EET 2013


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 at 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 at localhost>... User unknown
>> My configuration info is as follows:
>> 
>> systemuser at openindiana:~# /usr/local/sbin/dovecot --version
>> 2.1.12
>> 
>> systemuser at 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 at 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
>> ---- 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 
> -- 
> Ken Anderson
> Pacific Internet - http://www.pacific.net
> Latest Pacific.Net Status - http://twitter.com/pacnetstatus
> 




More information about the dovecot mailing list