LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-03-2011, 08:08 PM   #1
Slackevo
LQ Newbie
 
Registered: Jan 2011
Distribution: Slackware 13.1 i386
Posts: 5

Rep: Reputation: 0
Slackware 13.1, Sendmail-procmail MAILDIR for Dovecot Server


Built an MTA/LDA Slackware Server and seperate MDA (Dovecot 2.2) Slackware Server.

Used the slackwiki Sendmail TLS SMTP-AUTH guide for the MTA/LDA Server.
http://www.slackwiki.org/index.php?t...TH&redirect=no

The ../cf/cf/sendmail-slackware-tls-sasl.mc config file has Procmail sorting as:
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl

I don't understand the arguments ($), but know the -Y forces mbox. The /var/mail directory is hardlinked to where ever the spool directory is.

I want the Dovecot MDA server to use NFS or UNFS to grab user's mail from the MTA/LDA Server. Problem is the hardlink. Can't nfs share a hardlinked directory.

Is there a way to change the MTA sendmail mc config file above to have LDA promail send to /home/mail, so I can nfs that directory? And preferably in MAILDIR format?

BTW: I can't find any procmailrc config file on this Slackware Server. I should have all the settings in my /etc/mail/sendmail.cf config.

Last edited by Slackevo; 01-04-2011 at 12:12 AM.
 
Old 01-04-2011, 02:23 AM   #2
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware 14.1
Posts: 467

Rep: Reputation: 89
I never tried it myself, but you may try exporting /var/spool instead.


Quote:
BTW: I can't find any procmailrc config file on this Slackware Server. I should have all the settings in my /etc/mail/sendmail.cf config.
You have /etc/rc.d/rc.sendmail
and /etc/rc.d/rc.dovecot
 
Old 01-04-2011, 03:23 AM   #3
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,938

Rep: Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330
Hi,

You can use procmail to deliver in ~/Maildir format. From dovecot wiki:
Code:
# file: /etc/procmailrc
# system-wide settings for procmail
SHELL="/bin/bash"
SENDMAIL="/usr/sbin/sendmail -oi -t"
LOGFILE="/var/log/procmail.log"
DROPPRIVS="yes"
DELIVER="/usr/lib/dovecot/deliver"
# fallback:
DEFAULT="$HOME/Maildir/"
MAILDIR="$HOME/Maildir/"
:0 w
* ^X-Spam-Status: Yes
| $DELIVER -m spam
:0 w
| $DELIVER
Regards
 
Old 01-04-2011, 11:37 AM   #4
Slackevo
LQ Newbie
 
Registered: Jan 2011
Distribution: Slackware 13.1 i386
Posts: 5

Original Poster
Rep: Reputation: 0
Smile

Yeah, I read that wiki for dovecot 2.x and think it's the wise way to go.

I'm assuming if I change my sendmail mc config file by eliminating
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
and only have FEATURE(local_procmail) with the /etc/procmmailrc global config, I should be good. I'll recompile the sendmail config with m4 to create the new /etc/mail/sendmail.cf

Since the /etc/procmailrc config file is global, I assume I don't need put a procmail receipe in each users mailbox.

Again, the purpose is just to have promail deliver in MAILDIR format, not MBOX to an nfs diretory, so my dovecot server can read the nfs share.

I'll test it out today and follow up here.

Thanks for your help. It's the direction I needed..

Last edited by Slackevo; 01-04-2011 at 12:46 PM.
 
Old 01-04-2011, 12:45 PM   #5
Slackevo
LQ Newbie
 
Registered: Jan 2011
Distribution: Slackware 13.1 i386
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ChrisAbela View Post
I never tried it myself, but you may try exporting /var/spool instead.
I don't know if that would be an actual spooling directory. I've read bad things in regards to indexing using nfs with spool directories.

I'll be using unfs3 (nfs v3) with my experiment today.

http://slackbuilds.org/repository/13.1/network/unfs3/
 
Old 01-04-2011, 09:05 PM   #6
Slackevo
LQ Newbie
 
Registered: Jan 2011
Distribution: Slackware 13.1 i386
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
Hi,

You can use procmail to deliver in ~/Maildir format. From dovecot wiki:
Code:
# file: /etc/procmailrc
# system-wide settings for procmail
SHELL="/bin/bash"
SENDMAIL="/usr/sbin/sendmail -oi -t"
LOGFILE="/var/log/procmail.log"
DROPPRIVS="yes"
DELIVER="/usr/lib/dovecot/deliver"
# fallback:
DEFAULT="$HOME/Maildir/"
MAILDIR="$HOME/Maildir/"
:0 w
* ^X-Spam-Status: Yes
| $DELIVER -m spam
:0 w
| $DELIVER
Regards
Thanks! That worked perfectly along with rebuilding my sendmail.cf to include FEATURE('local_procmail') . My LDA Procmail is in MAILDIR !

It's only using the fallback part of my /etc/procmailrc:

Quote:
# file: /etc/procmailrc
# system-wide settings for procmail
SHELL="/bin/bash"
SENDMAIL="/usr/sbin/sendmail -oi -t"
LOGFILE="/procmail/log/procmail.log"
DELIVER="/procmail/dovecot/deliver"
# fallback:
DEFAULT="$HOME/Maildir/"
MAILDIR="$HOME/Maildir/"
:0 w
* ^X-Spam-Status: Yes
| $DELIVER -m spam
:0 w
| $DELIVER
When I check the /procmail/dovecot/deliver directory there is nothing there.

I created the same sub directory layout as in /home ($home) for /procmail/dovecot/deliver, but no email is being delivered. It's still being delivered to /home/$user/Maildir/new
All subdirectories in /procmail have root permissions for now.

Can you help me with procmailrc to point mail to my /procmail directories?

Last edited by Slackevo; 01-04-2011 at 09:08 PM.
 
Old 01-05-2011, 12:49 AM   #7
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,938

Rep: Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330
I guess you can use:
Code:
DEFAULT="/procmail/dovecot/deliver/$LOGNAME/Maildir/"
MAILDIR="/procmail/dovecot/deliver/$LOGNAME/Maildir/"
or
Code:
HOME="/procmail/dovecot/deliver/$LOGNAME"
DEFAULT="$HOME/Maildir/"
MAILDIR="$HOME/Maildir/"
 
  


Reply


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
Dovecot maildir question on structure wadesmart Linux - Server 1 01-30-2010 09:13 PM
Maildir in dovecot-IMAP!!! subhankar Linux - Networking 1 05-29-2006 02:43 PM
postfix dovecot Maildir Danny Regan Debian 3 11-15-2005 04:08 PM
procmail + maildir + mailbox with spaces psychobyte Linux - Software 0 07-09-2005 01:07 PM
Configuring Maildir with Postfix and Dovecot umbraeOtheisles Linux - Software 0 04-16-2004 09:33 AM


All times are GMT -5. The time now is 04:11 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