Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fetchmail -> mail goes where?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jpalan
n00b
n00b


Joined: 19 Jan 2003
Posts: 61
Location: Under your bed

PostPosted: Sat Sep 06, 2003 10:10 am    Post subject: Fetchmail -> mail goes where? Reply with quote

Ok, I think fetching the mail is the bottle neck of my mail system (fetchmail + postfix + procmail + mutt).
I don't like maildir, so I added "mbox -maildir" to USE flags and re-emerged all the mail software.
Fetchmail works ok, but where does the mail go? To the black hole?
I guess there should be /var/spool/mail/jpalan, but there isn't. How do I create one? :?
Back to top
View user's profile Send private message
CRASHTEST
n00b
n00b


Joined: 02 Sep 2003
Posts: 1

PostPosted: Sat Sep 06, 2003 10:17 am    Post subject: Reply with quote

good question
:?
_________________
hey, look at my new forum! www.extreme-forums.cjb.net
Back to top
View user's profile Send private message
rizzo
Retired Dev
Retired Dev


Joined: 30 Apr 2002
Posts: 1067
Location: Manitowoc, WI, USA

PostPosted: Sat Sep 06, 2003 10:49 pm    Post subject: Reply with quote

You may still want to check that your /etc/postfix/main.cf file is going to use mbox instead of maildir. I'm not certain if the USE flags will change the default config.

You (want to) have the same setup that I do so I'll just paste in the code that you'll want to see:

Code:
# DELIVERY TO MAILBOX
#
# The home_mailbox parameter specifies the optional pathname of a
# mailbox file relative to a user's home directory. The default
# mailbox file is /var/spool/mail/user or /var/mail/user.  Specify
# "Maildir/" for qmail-style delivery (the / is required).
#
#home_mailbox = Mailbox
#home_mailbox = Maildir/
#home_mailbox = .maildir/

# The mail_spool_directory parameter specifies the directory where
# UNIX-style mailboxes are kept. The default setting depends on the
# system type.
#
#mail_spool_directory = /var/mail
mail_spool_directory = /var/spool/mail

# The mailbox_command parameter specifies the optional external
# command to use instead of mailbox delivery. The command is run as
# the recipient with proper HOME, SHELL and LOGNAME environment settings.
# Exception:  delivery for root is done as $default_user.
#
# Other environment variables of interest: USER (recipient username),
# EXTENSION (address extension), DOMAIN (domain part of address),
# and LOCAL (the address localpart).
#
# Unlike other Postfix configuration parameters, the mailbox_command
# parameter is not subjected to $parameter substitutions. This is to
# make it easier to specify shell syntax (see example below).
#
# Avoid shell meta characters because they will force Postfix to run
# an expensive shell process. Procmail alone is expensive enough.
#
# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN
# ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER.
#
mailbox_command = /usr/bin/procmail
Back to top
View user's profile Send private message
jpalan
n00b
n00b


Joined: 19 Jan 2003
Posts: 61
Location: Under your bed

PostPosted: Sun Sep 07, 2003 8:54 am    Post subject: Reply with quote

rizzo wrote:

You (want to) have the same setup that I do so I'll just paste in the code that you'll want to see:


Thank you, uncommenting the spool-line made it work. :)
Now I just have to figure out, how to make procmail to actually filter.
Back to top
View user's profile Send private message
rizzo
Retired Dev
Retired Dev


Joined: 30 Apr 2002
Posts: 1067
Location: Manitowoc, WI, USA

PostPosted: Sun Sep 07, 2003 9:01 pm    Post subject: Reply with quote

You'll want to have that mailbox_command line like I have at the bottom of my earlier post. Then you need a ~/.procmailrc file.

Mine looks like this:

Code:
# Turn this on for debugging

VERBOSE=on

# Do a chmod g+w /var/spool/mail to get rid of locking errors

DEFAULT=/var/spool/mail/don

# Set up the directories

MAILDIR=$HOME/Mail
SPAMBOX=$MAILDIR/spam
LOGFILE=$MAILDIR/log

# Create a lock so that only one concurrent user mail is checked

BOXLOCK=$MAILDIR/$LOGNAME.lock

# To avoid "insecurity" warnings from perl

DROPPRIVS=yes

# SpamAssassin (on mail less than 512kB) including the razor

:0fw: $BOXLOCK
* < 512000
| /usr/bin/spamassassin

:0:
* ^X-Spam-Status: Yes
$SPAMBOX


After defining my various mail folders, it procmail sends all mail to spamassassin. SpamAssassin will mark any possible spam with a X-Spam-Status header. If procmail sees that header, it will put the mail into my $SPAMBOX. I have an actual spam mailbox, some people just put it in /dev/null.
Back to top
View user's profile Send private message
jpalan
n00b
n00b


Joined: 19 Jan 2003
Posts: 61
Location: Under your bed

PostPosted: Mon Sep 08, 2003 9:32 am    Post subject: Reply with quote

rizzo wrote:
You'll want to have that mailbox_command line like I have at the bottom of my earlier post. Then you need a ~/.procmailrc file.


Yep, I already had .procmailrc.
Code:

MAILDIR=$HOME/.mail/
ORGMAIL=/var/spool/mail/$LOGNAME
DEFAULT=inbox
LOGFILE=/var/log/mail/procmail.log

:0:
* ^Subject:.[ghosthouse]
gh

:0:
* ^FROM_MAILER
postfix


The main idea is, that posts from one of the private Yahoogroups mailing lists go to ~/.mail/gh and rest of the posts (except the ones sent by postfix) go to ~/.mail/inbox.
I add spam functionality later.

Thanks for your help. When I was using Mandrake everything worked straight away so I've been quite a while struggling with this mail thing in Gentoo.
Everything is slightly harder when you don't have all those fancy graphical configuration tools (I want to keep the system minimal). :wink:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum