LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 05-30-2012, 12:06 AM   #1
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Can't get sieve to work in Dovecot 1.2.15 with Fetchmail on Debian 6


I am trying to do a simple setup for a local mail server.
Fetchmail should get the mails from my POP3 account, sieve (Dovecot-plugin) should sort them into different folders and Dovecot should present the whole thing via IMAP to my local client machines.
The first part (getting the mails) works without a problem (with procmail being configured to use Maildir format), all the mails are downloaded to the inbox. The last part works also, I can connect to the server with Claws-Mail and see the mails.

What is not working is actually the main reason I am setting up the mail server: sorting the mails to different folders with Dovecot's sieve plugin. I am trying this now for several hours, but it simply doesn't work.

Can anyone give me a hint what I am doing wrong?

My configuration:
/etc/fetchmailrc:
Code:
set daemon 60
set syslog
set postmaster "tobi"

poll pop.mail.yahoo.de with proto POP3 and options uidl user "tobisgd" there with password "XXXXX" is tobi here keep

mda "/usr/bin/procmail -d %T"
(Password XXXXed out)

/etc/procmailrc:
Code:
SHELL="/bin/bash"
SENDMAIL="/usr/sbin/sendmail -oi -t"
LOGFILE="/var/log/procmail.log"
DEFAULT="$HOME/Mail/"
MAILDIR="$HOME/Mail/"
/etc/dovecot/dovecot.conf:
Code:
protocols = imaps lda 
log_timestamp = "%Y-%m-%d %H:%M:%S "
   mail_location = maildir:~/Mail
mail_privileged_group = mail
protocol imap {
}
  
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}
protocol managesieve {
}
protocol lda {
mail_plugins = sieve
mail_plugin_dir = /usr/lib/dovecot/modules/lda
}
auth default {
  mechanisms = plain
  passdb pam {
  }
  userdb passwd {
  }
  user = root
}
dict {
}
plugin {
sieve=~/.dovecot.sieve
sieve_dir=~/sieve
}
(Comments stripped out)

~/.forward:
Code:
| /usr/lib/dovecot/deliver
I simply can't figure out why it is not working.
 
Old 05-30-2012, 08:03 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148

Original Poster
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
OK, during my research on the web regarding this I found this site (German) which provided the solution to me.
It seems that this was a permission problem.
I added this line to /etc/sudoers using visudo
Code:
fetchmail ALL=(ALL) NOPASSWD:/usr/lib/dovecot/deliver
To give the fetchmail daemon the rights to launch deliver as my user without needing a password. After that I changed the mda option in /etc/fetchmailrc to
Code:
mda "HOME=/home/%T /usr/bin/sudo -u %T /usr/lib/dovecot/deliver"
to actually launch deliver as my user.

After restarting the fetchmail daemon it worked like intended.
 
  


Reply



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
sieve setup on dovecot 1.1.4 steven19782007 Linux - Server 8 06-03-2010 03:16 PM
Dovecot + Sieve and Smartsieve robertjinx Linux - Server 2 11-26-2008 03:52 AM
Fetchmail / Dovecot configuration Lord Wodan Linux - Server 6 09-10-2007 09:50 PM
LXer: How To Install & Set Up Dovecot Mail Server With Sieve And Virtual Users LXer Syndicated Linux News 0 09-08-2007 04:21 AM
postfix sieve fetchmail mindcry Linux - Networking 1 10-22-2003 06:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:26 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration