I'm trying to setup email on a new server running CentOS-6.2 (x86_64), but for some reason email is going to /var/spool/mail/ despite the fact that my .procmailrc starts ------------------------------- DEFAULT=/var/spool/mail MAILDIR=/home/tim/Maildir/ SHELL=/bin/sh DROPPRIVS=yes ------------------------------- and I have ------------------------------- MAILER(smtp)dnl MAILER(procmail)dnl ------------------------------- in /etc/mail/sendmail.mc . (I have run /etc/mail/make and restarted sendmail .)
It is as though procmail is not running, or at least sendmail is not using it. I have the same setup on my old CentOS-5.7 server, and this seems to work fine.
Any enlightenment or suggestions gratefully received.
On Wed, Jan 25, 2012 at 8:42 AM, Timothy Murphy gayleard@eircom.net wrote:
I'm trying to setup email on a new server running CentOS-6.2 (x86_64), but for some reason email is going to /var/spool/mail/ despite the fact that my .procmailrc starts and I have
[...]
MAILER(smtp)dnl MAILER(procmail)dnl
in /etc/mail/sendmail.mc . (I have run /etc/mail/make and restarted sendmail .)
Let's start at the beginning. Sendmail is not the default mailer for 6.x. Are you sure you are using it?
Les Mikesell wrote:
I'm trying to setup email on a new server running CentOS-6.2 (x86_64), but for some reason email is going to /var/spool/mail/ despite the fact that my .procmailrc starts and I have
[...]
MAILER(smtp)dnl MAILER(procmail)dnl
in /etc/mail/sendmail.mc . (I have run /etc/mail/make and restarted sendmail .)
Let's start at the beginning. Sendmail is not the default mailer for 6.x. Are you sure you are using it?
Thanks for your response. Sendmail is certainly running: ------------------------------- [tim@grover ~]$ ps aux | grep mail tim 1984 0.0 0.0 103300 812 pts/1 S+ 16:16 0:00 grep mail root 31117 0.0 0.0 90836 2608 ? Ss 02:46 0:01 sendmail: accepting connections smmsp 31126 0.0 0.0 76048 2012 ? Ss 02:46 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue [tim@grover ~]$ ------------------------------- Also it appears from /var/log/maillog that spamassassin is vetting mail, which seems to suggest that procmail is being used.
I should have said that selinux is running in permissive mode.
One possible mistake I made was to copy ~/Maildir on my old server to ~/Maildir on the new server. I notice that this leaves the name of the old server helen on the files in the new Maildir, eg 1326686655.13860_1.helen.gayleard.com:2,S in the new ~/Maildir/cur . I wonder if I should have copied them in some other way?
But I don't see how this would affect where the mail is going? I guess I need to trace in some way what procmail is doing.
On Wednesday, January 25, 2012, Timothy Murphy gayleard@eircom.net wrote:
I'm trying to setup email on a new server running CentOS-6.2 (x86_64), but for some reason email is going to /var/spool/mail/ despite the fact that my .procmailrc starts
DEFAULT=/var/spool/mail MAILDIR=/home/tim/Maildir/ SHELL=/bin/sh DROPPRIVS=yes
DEFAULT sets where the mail will be delivered. MAILDIR is the current working directory and only affects explicit delivery rules that use relative pathnames for maiboxes. The use of "MAILDIR" in procmail predates DJB's choice of "maildir" as the name of a mailbox format and is not related. This has caused a lot of confusion over the years ...
You probably want:
ORGMAIL=/var/spool/mail MAILDIR=/home/tim/Maildir DEFAULT=$MAILDIR/
Bart Schaefer wrote:
I'm trying to setup email on a new server running CentOS-6.2 (x86_64), but for some reason email is going to /var/spool/mail/ despite the fact that my .procmailrc starts
DEFAULT=/var/spool/mail MAILDIR=/home/tim/Maildir/ SHELL=/bin/sh DROPPRIVS=yes
DEFAULT sets where the mail will be delivered. MAILDIR is the current working directory and only affects explicit delivery rules that use relative pathnames for maiboxes. The use of "MAILDIR" in procmail predates DJB's choice of "maildir" as the name of a mailbox format and is not related. This has caused a lot of confusion over the years ...
You probably want:
ORGMAIL=/var/spool/mail MAILDIR=/home/tim/Maildir DEFAULT=$MAILDIR/
Thanks very much; you have solved my problem.
I can't think how I overlooked that. I was comparing the two .procmailrc's, on the old server and the new, and was convinced that they were the same. But now I see ------------------------------- [tim@blanche tmp]$ diff .procmailrc procmailrc 5,6c5,6 < MAILDIR=/var/spool/mail < DEFAULT=/home/tim/Maildir/ ---
DEFAULT=/var/spool/mail MAILDIR=/home/tim/Maildir/
-------------------------------