LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Can't get Postfix mail boxes from /var/mail to ~/Maildir (https://www.linuxquestions.org/questions/linux-server-73/cant-get-postfix-mail-boxes-from-var-mail-to-%7E-maildir-811386/)

phillinux 05-31-2010 10:12 PM

Can't get Postfix mail boxes from /var/mail to ~/Maildir
 
I'm running a Debian LAMP server and I am adding postfix. The initial config is working and I can send and receive mail both locally and over the WAN. The problem is that I cannot get mail delivered to the user's home directory using Maildir/.

I have set the:

home_mailbox = Maildir/

parameter in main.cf but mail still goes to /var/mail after Postfix reload. The system is now using Maildir/ instead of mbox but in /var/mail. I really want to get mail into the user's home directory.

Any suggestions?

spampig 06-01-2010 01:24 AM

Without seeing your main.cf or the output of postconf it's difficult to say.

The documentation (http://www.postfix.org/postconf.5.html#home_mailbox) suggests that the mailbox_command takes precedence over home_mailbox, so it would be worth looking to see if it's set to something:
Quote:

postconf | grep mailbox_command
I'd also look at these directives just in case they are influencing matters:
home_mailbox
require_home_directory
virtual_mailbox_base

HTH

phillinux 06-01-2010 08:47 AM

It seems that my mailbox_command is set to

“procmail -a “$EXTENSION”

but I don't think procmail is running on the machine. I have looked in the users home directory and not found a “.procmailrc” file and

“ps -A | grep procmail”

yields nothing. Is there another way to check if procmail is running?
Should I install it?

spampig 06-01-2010 08:57 AM

My advice, comment it out in main.cf:
Quote:

# procmail -a “$EXTENSION
bounce postfix
Quote:

/etc/init.d/postfix restart
and retest

phillinux 06-01-2010 09:26 AM

Bingo, it works!
Postfix setup cur, new, and tmp, just like it should and even deposited an email in new.
I tried to install procmail to find it is installed on the machine.
Should I get procmail running?
I was under the impression that postfix was supposed to invoke procmail, but it didn't.
I've heard procmail a handy tool.

BTW:
Is there a difference between
postfix reload
and
/etc/init.d/postfix restart

spampig 06-01-2010 09:42 AM

Phil, personally I don't 'do' procmail because I don't need it, so my understanding of it is limited. Therefore I'm not the best guy to ask.

As for reload -v- restart. Reload is *usually* ok, but a major change in the configs I like to restart. Not for any other reason than I once had an issue with reload not picking up changes, many many moons ago ;-)

phillinux 06-01-2010 09:48 AM

I've been fighting with this problem since Sunday night. Thanks for putting it to rest. Now onto Dovecot, Squirrelmail and SASL,
Thanks again
phil

p3505 08-23-2015 08:41 AM

i have Ubuntu 14.04.3 LTS, postfix (2.11.0), dovecot(1:2.2.9-1ubuntu2.1)
maybe add [DEFAULT=/home/$USER/Maildir/], i run successful.
like below
mailbox_command = procmail -a "$EXTENSION" DEFAULT=/home/$USER/Maildir/


All times are GMT -5. The time now is 08:47 PM.