[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Exim only delivering to /var/mail/apache



On Fri, Jul 19, 2002 at 07:01:45AM +0800, Sam Williams wrote:
| On Fri, 2002-07-19 at 02:29, Derrick 'dman' Hudson wrote:
| > On Thu, Jul 18, 2002 at 07:57:23PM +0800, Sam Williams wrote:
| > 
| > | I've got a strange problem on a machine runing debian unstable - mail is
| > | only being delivered to one user (apache). Mail to any other user,
| > | including root disappears.. Exim is configured only to deliver mail for
| > | the local machine and root is aliased to samw.
| > | 
| > | Has anyone any idea why only one account is receiving mail?
| > 
| > Post some log snippets.  Check all three of /var/log/exim/mainlog,
| > /var/log/exim/rejectlog, /var/log/exim/paniclog.
| 
| Thanks for the pointers Derrick,
| 
| I only have mainlog, so I guess nothing is being rejected and there is
| no panic... Looking at this log (I was looking at /var/log/mail and
| /var/log/mail.err which are both empty), there is a difference between 
| the way exim is handling mail for the two users - it recognises apache
| is local, but tries to use a procmail pipe for samw:
| 
| 2002-07-18 19:39:06 17V9cg-0000fF-00 <= apache@samlap.cherish.spl
| U=apache P=local S=419
| 2002-07-18 19:39:06 17V9cg-0000fF-00 => apache
| <apache@samlap.cherish.spl> D=localuser T=local_delivery
| 2002-07-18 19:39:06 17V9cg-0000fF-00 Completed
| 
| vs.
| 
| 2002-07-18 19:25:59 17V9Pz-0000ZO-00 <= samw@samlap.cherish.spl U=samw
| P=local S=339
| 2002-07-18 19:25:59 17V9Pz-0000ZO-00 => samw <samw@samlap.cherish.spl>
| D=procmail T=procmail_pipe
| 2002-07-18 19:25:59 17V9Pz-0000ZO-00 Completed

Note that exim *successfully* delivered the message, via the
"procmail" director (which uses the "procmail_pipe" transport for the
actual data transfer).

| How can I force local delivery for the samw account and why is it
| treating them differently? They are both user accounts on the local
| machine. I suppose I have to setup procmail too :)

Your exim.conf contains a section that if ~/.procmailrc exists it will
deliver via procmail instead of defaulting to /var/mail/$USER.  You
can either remove your .procmailrc, or remove that section from
exim.conf to prevent procmail from being used as a delivery agent.
Before you remove your procmailrc, however, I would read it carefully
to determine where it deposited the "missing" mail.

| > They'll have the answer for why the mail wasn't delivered.  Also run
| > 'mailq' (as root) and you'll find the "missing" messages.  (messages
| > don't just disappear, they go somewhere.  Always.)
| 
| Hmm, mailq turns up nothing, but I bet they are in procmail somewhere. 

Yeah, since exim successfully delivered the message it isn't in the
queue.  Now you need to determine where procmail stashed them.

| I've never looked at the workings of a mail delivery agent before and
| it's more complex than I imagined.

Mail routing and delivery certainly can be complex, until you see how
the pieces fit together and then it makes perfect sense :-).  It is
very flexible, though.

| Ultimately I'm trying to set up a maildir on my server that I can
| connect to from any of the machines on the local network - I've had
| a look at qmail / courierIMAP and it looks very complex. Any
| suggestions for a simple setup?

Change the "local_delivery" transport to look like this :
    local_delivery:
        driver = appendfile
        directory = /var/spool/mail/${local_part}/
        maildir_format
        create_directory
        mode_fail_narrower = false
        group = mail
        envelope_to_add = true
        return_path_add = true
        create_directory = true
        check_string =
        escape_string =


This will use maildir format for your mail spool, which will remain
located at /var/spool/mail/$USER.  (however, do remove the mbox
version before you use this config.  there are ways to convert from
mbox to maildir as well if you have messages you don't want to delete)


Then 'apt-get install uw-imapd' and you're all set.

| > <snip>
| > 
| > Please read this
| >     http://www.goldmark.org/jeff/stupid-disclaimers/
| 
| Sorry, posting from my work account.

Ok, no problem.  How about sharing that article with the "powers that
be" at your employer?  I'm sure they'll really enjoy seeing how
ridiculous they are making their company appear in public.  (though
you may not want to show them the d-u archives if you weren't supposed
to ask this question on company time)

-D

-- 
A)bort, R)etry, B)ang it with a large hammer
 
http://dman.ddts.net/~dman/

Attachment: pgphGUhWN59yq.pgp
Description: PGP signature


Reply to: