LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 11-04-2012, 10:18 AM   #1
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 13.1,13.37,14.0,14.1 64 and 32bit and arm
Posts: 111

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


created new thread from http://www.linuxquestions.org/questi...43#post4820943

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
Quote:
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
Code:
VERBOSE=on
LOGFILE=/var/log/procmail.log
DROPPRIVS=yes
VERBOSE=on
:0
* ^TO.*tim.*
/var/spool/dovecot/tim/
:0
* ^TO.*mary.*
/var/spool/dovecot/mary/
:0
* ^TO.*fred.*
/var/spool/dovecot/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
Code:
FEATURE(`local_procmail', `/usr/libexec/dovecot/deliver', `deliver -d $u', `SPhun9')dnl
to my config.mc file and recompile
Code:
cd /usr/share/sendmail/cf/cf/
./Build config.mc
cp config.cf /etc/mail/sendmail.cf
/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

Code:
# 2.1.8: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.37.6-smp 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 = test2.mydomain.co.uk
info_log_path = /var/log/dovecot.info
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
login_greeting = Dovecot at test2.mydomain.co.uk
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 = postmaster@test2.mydomain.co.uk
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, 06:02 AM   #2
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 13.37, 14.0
Posts: 390

Rep: Reputation: 49
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/ ??
Quote:
20-managesieve.conf
90-sieve.conf
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 06:47 AM.
 
Old 11-06-2012, 10:44 AM   #3
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 13.1,13.37,14.0,14.1 64 and 32bit and arm
Posts: 111

Original Poster
Rep: Reputation: 18
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.

Code:
 sendmail -d0.1 -bt </dev/null
Version 8.14.4
 Compiled with: DNSMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8 MIME8TO7
                NAMED_BIND NETINET NETINET6 NETUNIX NEWDB NIS PIPELINING SASLv2
                SCANF SOCKETMAP STARTTLS TCPWRAPPERS USERDB XDEBUG

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

ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
and contents of /etc/hosts is
Code:
127.0.0.1               localhost
10.1.1.91               test2.mydomain.co.uk test2
10.1.1.100              mail.mydomain.co.uk
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
Code:
order hosts, bind
multi on
) )
in the dns test2.mydomain.co.uk is a cname entry pointing to mail.mydomain.co.uk (which points to our real external ip address)
so typing host test2.mydomain.co.uk comes up with
Code:
test2.mydomain.co.uk has address xxx.yyy.zzz.qqq
test2.mydomain.co.uk is an alias for mail.mydomain.co.uk.
test2.mydomain.co.uk is an alias for mail.mydomain.co.uk.
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 (test2.mydomain.co.uk) trying to send the mail for fred@test2.mydomain.co.uk to mail.mydomain.co.uk which made me check the dns.)

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

Original Poster
Rep: Reputation: 18
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:
test2.mydomain.co.uk esmtp:[local.ip.address.here]
and then running
Quote:
makemap hash /etc/mail/mailertable < /etc/mail/mailertable
and restarting sendmail ( see http://www.linuxquestions.org/questi...0/#post4713240 )
this also works the other way (putting a mail.mydomain.co.uk esmtp:[local.ipof.real.mailserver] into mailertable on the test2.mydomain.co.uk 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 fred@test2.mydomain.co.uk to mary@test2.mydomain.co.uk 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
 
  


Reply

Tags
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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 07:05 AM
dovecot-lda/postfix permission issues deathclaw Linux - Server 3 06-22-2012 11:56 AM
postfix used dovecot lda problem xiutuo Linux - Server 1 11-12-2009 07:58 PM
Understanding sendmail, LDA , mailboxes jbailo Linux - Server 3 07-28-2008 07:07 PM
Dovecot/Sendmail problem cizzi Linux - Software 4 06-04-2007 10:48 PM


All times are GMT -5. The time now is 06:00 AM.

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