Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 11-04-2012, 11:18 AM   #1
Registered: Oct 2004
Location: scotland
Distribution: slackware 13.1,13.37,14.0,14.1,14.2 64 and 32bit and arm
Posts: 210

Rep: Reputation: 36
Question dovecot-lda configuration problem with sendmail

created new thread from

My problem is moving from procmail to dovecot-lda for local mail delivery so that I can make use of sieve scripts (mainly to implement out-of-office).
operating system is slackware 13.37 32bit
I am starting from a working sendmail with startls for authentication, and dovecot imap working for collecting mail, again with starttls.
I have used sbopkg for dovecot and dovecot-pigeonhole (sieve)
(manually updated the version in the sbo-script to support dovecot 2.1)
procedure below
first create needed group and users

groupadd -g 202 dovecot
useradd -d /dev/null -s /bin/false -u 202 -g 202 dovecot
then download,create package and install using sbopkg
cp /usr/doc/dovecot-2.0.12/example-config/dovecot.conf /etc/dovecot/
cp -r /usr/doc/dovecot-2.0.12/example-config/conf.d /etc/dovecot/
(update slackbuilds to dovecot 2.1 )

to install sieve (server and client) (dovecot-pigeonhole) modify devecot-pigeonhole slackbuild (sbopkg) by updating to version 0.3.3 (the one that supports dovecot 2.1)
then install. then add sieve to the protocols line in /etc/dovecot/dovecot.conf and restart dovecot
/etc/rc.d/rc.dovecot restart
I created a /etc/procmailrc file as follows, to direct mail into directories instead of mbox files
* ^TO.*tim.*
* ^TO.*mary.*
* ^TO.*fred.*
this procedure allowed me to create seive scripts using a thunderbird plugin. (which are duly saved in ~/sieve/ folder), and to have mail sucessfully delivered into mail directories, accessible, and editable via imap

however, local mail is being delivered by procmail, so the filters are not being applied. Thus my attempt to get sendmail to deliver the local mail via dovecot-lda (/usr/libexec/dovecot/deliver)
unfortunately, the mail does not get delivered when I add the line
FEATURE(`local_procmail', `/usr/libexec/dovecot/deliver', `deliver -d $u', `SPhun9')dnl
to my file and recompile
cd /usr/share/sendmail/cf/cf/
cp /etc/mail/
/etc/rc.d/rc.sendmail restart
it just seems to dissappear.
manually running
/usr/libexec/dovecot/deliver -d
appears to work ok.
does anyone have any ideas?

for info,output of dovecot -n below

# 2.1.8: /etc/dovecot/dovecot.conf
# OS: Linux i686 Slackware 13.37.0 ext4
auth_debug = yes
auth_debug_passwords = yes
auth_verbose = yes
auth_verbose_passwords = plain
base_dir = /var/run/dovecot/
debug_log_path = /var/log/dovecot.log
hostname =
info_log_path = /var/log/
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
login_greeting = Dovecot at
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c
mail_debug = yes
mail_location = maildir:/var/spool/dovecot/%n
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 ihave
passdb {
  driver = shadow
plugin {
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
  mail_log_fields = uid box msgid size
  mail_log_group_events = yes
postmaster_address =
protocols = imap pop3 lmtp sieve
service imap-login {
  inet_listener imap {
    port = 143
  inet_listener imaps {
    port = 993
    ssl = yes
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
ssl_key_password = mysslpassword
userdb {
  driver = passwd
verbose_ssl = yes
protocol lmtp {
  mail_plugins = " sieve"
protocol lda {
  mail_plugins = " sieve"
(domain and password changed for security)
Old 11-06-2012, 07:02 AM   #2
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.0, 14.1, current
Posts: 418

Rep: Reputation: 52
Hi Timsoft,
From previous thread we concluded that the sendmail configuration should be OK, but I am hesitate right now whether it is true. Anyway lets examine the dovecot configuration first. Now that I see your dovecot configuration we need to check several things.
Do you have these configuration files in /etc/dovecot/conf.d/ ??
These should be installed with the dovecot-pigeonhole package and the example configuration files are placed into the /usr/doc/dovecot-<pigeonhole-install-time-version>/example.config/ directory. (note not into pigeonhole directory)

Right now I can remember that I had problem with this. I installed the dovecot package first and after installation I copied the dovecot example config files as you noted. The dovecot-pigeonhole package was installed later and I didn't expect that it would insert it into the /usr/doc/dovecot-<ver>/example-config instead of /usr/doc/dovecot-pigeonhole<ver>/ directory.
So lets check this first - did you copied the config files for sieve? 20-managesieve.conf and 90-sieve.conf.

Last edited by hua; 11-06-2012 at 07:47 AM.
Old 11-06-2012, 11:44 AM   #3
Registered: Oct 2004
Location: scotland
Distribution: slackware 13.1,13.37,14.0,14.1,14.2 64 and 32bit and arm
Posts: 210

Original Poster
Rep: Reputation: 36
I checked and I had the 20-managesieve.conf file, but had missed the 90-seive.conf file
I copied it over and restarted dovecot, but still the local emails disappear into thin air.
below is sendmail output incase it helps.

 sendmail -d0.1 -bt </dev/null
Version 8.14.4

============ SYSTEM IDENTITY (after readcf) ============
      (short domain name) $w = test2
  (canonical domain name) $j =
         (subdomain name) $m =
              (node name) $k = test2

ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
and contents of /etc/hosts is
Code:               localhost      test2    
note: for the purpose of my tests the server is just on the local lan with a local ip address, although it does have access via dns and default gateway to the internet.
I have noticed a potential dns problem (although it should be using the /etc/hosts file first (/etc/host.conf contains
order hosts, bind
multi on
) )
in the dns is a cname entry pointing to (which points to our real external ip address)
so typing host comes up with
Code: has address xxx.yyy.zzz.qqq is an alias for is an alias for
I don't see how sendmail is not delivering locally to itself though. I'll change the cname record to a A record, give it time to propagate and try again.
(sorry for the extra complication. I saw a message in /var/log/maillog which seemed to show the server ( trying to send the mail for to which made me check the dns.)

Last edited by timsoft; 11-06-2012 at 12:41 PM. Reason: added sendmail info
Old 11-07-2012, 11:16 AM   #4
Registered: Oct 2004
Location: scotland
Distribution: slackware 13.1,13.37,14.0,14.1,14.2 64 and 32bit and arm
Posts: 210

Original Poster
Rep: Reputation: 36
well, I am getting local mail delivered now, although I'm not sure why sendmail should even try to use dns for local delivery. I had some problems with sending mail from our real mail server to the test server but this has been resolved by adding an entry into /etc/mail/mailertable on that server
Quote: esmtp:[]
and then running
makemap hash /etc/mail/mailertable < /etc/mail/mailertable
and restarting sendmail ( see )
this also works the other way (putting a esmtp:[local.ipof.real.mailserver] into mailertable on the machine allows me to send mail from the test2 machine direct to the main mail server without having to send the mail out onto the wan (internet).

needless to say, despite the worrying dns lookup for local mail sent by to at least it all seems to be working now, and my simple out of office sieve script works just fine and dovecot-lda delivers mail into the right folders. thanks again for your help hua


dovecot, slackare

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/local/libexec/dovecot/dovecot-lda - IS MISSING ?!? snowweb Linux - Server 1 08-14-2012 08:05 AM
dovecot-lda/postfix permission issues deathclaw Linux - Server 3 06-22-2012 12:56 PM
postfix used dovecot lda problem xiutuo Linux - Server 1 11-12-2009 08:58 PM
Understanding sendmail, LDA , mailboxes jbailo Linux - Server 3 07-28-2008 08:07 PM
Dovecot/Sendmail problem cizzi Linux - Software 4 06-04-2007 11:48 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:14 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration