postfix and Maildirs

This is a discussion on postfix and Maildirs within the Linux Networking forums, part of the Linux Forums category; hi all. I am trying to get postfix to put mail in $HOME/Maildir/ but it's not working. It ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-15-2004
Nick E.
 
Posts: n/a
Default postfix and Maildirs

hi all.

I am trying to get postfix to put mail in $HOME/Maildir/ but it's not
working. It keeps putting it in /var/spool/mail

here's the section from main.cf:
home_mailbox = Maildir/
mail_spool_directory = /var/spool/mail
mailbox_command = /usr/bin/procmail -Y -a $DOMAIN

fetchmail actually gets the mail from my ISP. Then passes it to postfix,
right?

what am I missing?

is there a postfix for dummies?

thanks,
john

--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.
--Linus Torvalds
Reply With Quote
  #2 (permalink)  
Old 01-15-2004
Dragan Colak
 
Posts: n/a
Default Re: postfix and Maildirs

On Thu, 15 Jan 2004 03:16:26 +0000, Nick E. wrote:

> hi all.
>
> I am trying to get postfix to put mail in $HOME/Maildir/ but it's not
> working. It keeps putting it in /var/spool/mail
>
> here's the section from main.cf:
> home_mailbox = Maildir/
> mail_spool_directory = /var/spool/mail
> mailbox_command = /usr/bin/procmail -Y -a $DOMAIN
>
> fetchmail actually gets the mail from my ISP. Then passes it to postfix,
> right?
>
> what am I missing?
>
> is there a postfix for dummies?
>
> thanks,
> john


Did you inactivate 'mail_spool_directory'? Maybe it supersedes
'home_mailbox'? Did you restart Postfix after you changed the
configuration?

Dragan

Reply With Quote
  #3 (permalink)  
Old 01-15-2004
Nick E.
 
Posts: n/a
Default Re: postfix and Maildirs

Dragan Colak wrote:

> On Thu, 15 Jan 2004 03:16:26 +0000, Nick E. wrote:
>
> Did you inactivate 'mail_spool_directory'? Maybe it supersedes
> 'home_mailbox'? Did you restart Postfix after you changed the
> configuration?
>
> Dragan


I did reload postfix. I've actually tried with and without commenting out
the /var/spool line.

So...I just commented out the "/var/spool/mail" line again, did "postifx
reload" and ran fetchmail again.

It still shows up in /var/spool/mail/john.

If it matters, Mandrake9.2

Confusedly,
john


if it helps here's the fetchmail output:
....
fetchmail: POP3< +OK maildrop ready, 2 messages (2850 octets) (51817
26214400)
....
fetchmail: POP3> RETR 2
fetchmail: POP3< +OK 1469 octets
reading message user@isp.net@pop-server-v1.mail.vip.sc5.pigs.com:2 of 2
(1469 octets)
fetchmail: SMTP< 220 forbin.gamehendge.com ESMTP Postfix (2.0.13) (Mandrake
Linux)
fetchmail: SMTP> EHLO localhost
fetchmail: SMTP< 250-forbin.gamehendge.com
fetchmail: SMTP< 250-PIPELINING
fetchmail: SMTP< 250-SIZE 10240000
fetchmail: SMTP< 250-VRFY
fetchmail: SMTP< 250-ETRN
fetchmail: SMTP< 250-XVERP
fetchmail: SMTP< 250 8BITMIME
fetchmail: SMTP> MAIL FROM:<me@emailaddress.net> BODY=7BIT SIZE=1469
fetchmail: SMTP< 250 Ok
fetchmail: SMTP> RCPT TO:<john@localhost>
fetchmail: SMTP< 250 Ok
fetchmail: SMTP> DATA
fetchmail: SMTP< 354 End data with <CR><LF>.<CR><LF>
#*****fetchmail: SMTP>. (EOM)
fetchmail: SMTP< 250 Ok: queued as EC70DBA916
not flushed
fetchmail: POP3> QUIT
fetchmail: POP3< +OK server signing off.
fetchmail: 6.2.4 querying popserver.isp.com (protocol POP3) at Wed 14 Jan
2004 10:48:22 PM CST: poll completed
fetchmail: SMTP> QUIT
fetchmail: SMTP< 221 Bye
fetchmail: normal termination, status 0



--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.
--Linus Torvalds
Reply With Quote
  #4 (permalink)  
Old 01-15-2004
Dragan Colak
 
Posts: n/a
Default Re: postfix and Maildirs

On Thu, 15 Jan 2004 04:53:40 +0000, Nick E. wrote:

> Dragan Colak wrote:
>
>> On Thu, 15 Jan 2004 03:16:26 +0000, Nick E. wrote:
>>
>> Did you inactivate 'mail_spool_directory'? Maybe it supersedes
>> 'home_mailbox'? Did you restart Postfix after you changed the
>> configuration?
>>
>> Dragan

>
> I did reload postfix. I've actually tried with and without commenting
> out the /var/spool line.
>
> So...I just commented out the "/var/spool/mail" line again, did "postifx
> reload" and ran fetchmail again.
>
> It still shows up in /var/spool/mail/john.
>
> If it matters, Mandrake9.2

[...]

It runs perfectly here. But I first had to create ~/Maildir manually and
tell Postfix to not only listen on eth0 but also on the loopback device.
Then it worked just fine.


From /etc/postfix/main.cf:
....
queue_directory = /var/spool/postfix
home_mailbox = Maildir/
....


I ran fetchmail with the following ~/.fetchmailrc: poll pop.gmx.net
protocol pop3 username $USER password $PASS ssl


$ ls -laF /var/spool/mail
total 0
drwxrwxrwt 2 root root 72 2004-01-15 04:18 ./
drwxr-xr-x 11 root root 296 2003-12-25 18:56 ../
-rw------- 1 colak users 0 2004-01-15 04:18 colak


$ ls -laF ~/Maildir/new
total 244
drwx------ 2 colak users 208 2004-01-15 14:42 ./
drwxr-xr-x 5 colak users 120 2004-01-15 14:08 ../
-rw------- 1 colak users 4791 2004-01-15 14:42 1166.V1a9.sun
-rw------- 1 colak users 86883 2004-01-15 14:42 1168.V1cd.sun
-rw------- 1 colak users 145597 2004-01-15 14:42 1169.V1d7.sun
-rw------- 1 colak users 1270 2004-01-15 14:42 1170.V1d9.sun

HTH
Dragan
Reply With Quote
  #5 (permalink)  
Old 01-15-2004
Nick E.
 
Posts: n/a
Default Re: postfix and Maildirs

Dragan Colak wrote:

>
> It runs perfectly here. But I first had to create ~/Maildir manually and
> tell Postfix to not only listen on eth0 but also on the loopback device.
> Then it worked just fine.
>
>
> From /etc/postfix/main.cf:
> ...
> queue_directory = /var/spool/postfix
> home_mailbox = Maildir/
> ...
>
> HTH
> Dragan


everything looks pretty much like I have. I, too, created Maildir/
manually.

could you please tell me where to setup the listen on loopback device part
tho?

thx,
john

--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.
--Linus Torvalds
Reply With Quote
  #6 (permalink)  
Old 01-15-2004
Dragan Colak
 
Posts: n/a
Default Re: postfix and Maildirs

On Thu, 15 Jan 2004 18:22:16 +0000, Nick E. wrote:

> Dragan Colak wrote:
>
>
>> It runs perfectly here. But I first had to create ~/Maildir manually
>> and tell Postfix to not only listen on eth0 but also on the loopback
>> device. Then it worked just fine.
>>
>>
>> From /etc/postfix/main.cf:
>> ...
>> queue_directory = /var/spool/postfix
>> home_mailbox = Maildir/
>> ...
>>
>> HTH
>> Dragan

>
> everything looks pretty much like I have. I, too, created Maildir/
> manually.
>
> could you please tell me where to setup the listen on loopback device
> part tho?
>
> thx,
> john



/etc/postfix/main.cf -> inet_interfaces

That option should be inactive. The default behavior of postfix is to
listen to all available interfaces.

You may check the current state with 'netstat -pln | grep 25'. If the IP
you see there is 0.0.0.0 then Postfix is listening to all interfaces.

Or you may just run fetchmail. If Postfix isn't listening to the loopback
device it would return an error.

Dragan

Reply With Quote
  #7 (permalink)  
Old 01-16-2004
Alan Connor
 
Posts: n/a
Default Re: postfix and Maildirs

On Thu, 15 Jan 2004 18:22:16 GMT, Nick E. <nicke@flyingpigs.com> wrote:
>
>
> Dragan Colak wrote:
>
>>
>> It runs perfectly here. But I first had to create ~/Maildir manually and
>> tell Postfix to not only listen on eth0 but also on the loopback device.
>> Then it worked just fine.
>>
>>
>> From /etc/postfix/main.cf:
>> ...
>> queue_directory = /var/spool/postfix
>> home_mailbox = Maildir/
>> ...
>>
>> HTH
>> Dragan

>
> everything looks pretty much like I have. I, too, created Maildir/
> manually.
>
> could you please tell me where to setup the listen on loopback device part
> tho?
>
> thx,
> john
>
> --
> Really, I'm not out to destroy Microsoft. That will just be a completely
> unintentional side effect.
> --Linus Torvalds


I don't use postfix, but was wondering whether it honored the MAILDIR
environment variable. Many mail apps do..

AC

Reply With Quote
  #8 (permalink)  
Old 01-24-2004
Nick E.
 
Posts: n/a
Default Re: postfix and Maildirs

Dragan Colak wrote:

> On Thu, 15 Jan 2004 04:53:40 +0000, Nick E. wrote:
>> I did reload postfix. I've actually tried with and without commenting

>
> It runs perfectly here. But I first had to create ~/Maildir manually and
> tell Postfix to not only listen on eth0 but also on the loopback device.
> Then it worked just fine.


Well, I figured it out finally. Finally had time to go back and dig a little
deeper into it.

This line apparently was messing things up:
mailbox_command = /usr/bin/procmail -Y -a $DOMAIN

I'm haven't done *anything* with procmail yet, and I'll bet that procmail is
setup to put the mail in /var/spool/mail instead of a Maildir. I really
should've noticed that right away.

Commented out the procmail line and *BAM*, right in $HOME/Maildir/new.

Kickass.

I did also comment out the inet_interfaces line per your suggestion.

Thanks for the advice and patience with a newbie. :)

Now to work on spam filtering and courierIMAP.

I love this Linux thing,
--john

--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.
--Linus Torvalds
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 12:01 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0