Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] Question on mail and procmail and sendmail etc............


On Sun, May 06, 2001 at 05:41:14PM +1000, Michael Lake wrote:
> Hi guys, 
> 
> Still a few more probs with my mail. Gee changing from Netscape aint 
> so easy. I have the following procmail recipe:
> 
> # SLUG Newsgroup
> # --------------
> :0:
> * ^TOslug
> In.SLUG
> 
> :0:
> * ^Subject:.*SLUG
> In.SLUG
> 
> # a few more recipes here etc...
> 
> # Everything else goes straight to INBOX as normal.
> 
> :0 # pass along all other mail
> ! -oi -f "$@"
> 
> Mail to SLUG is gettting through to my Mutt slug and other mail that 
> I have a proc recipe for such as debial-alpha list but other mail 
> such as normal mail to my Inbox ie mail I dont have a proc recipe for is 
> just disappearing. It should be being caught by the last recipe in 
> the procmail recipe.

So what does the last recipe do?

You have:

:0
! -oi -f "$@"

which is send the email the address listed.

Which is an odd rule; it looks like you are passing options to sendmail
(-oi -f) which are not necessary.

If you want to send it somewhere just put

:0
! the.adress@xxxxxxxxxxxx

Or remove the last recipe and leave it in the default mailspool.

> 
> Also I gather that fetchmail would normally deposit all mail into 
> /var/spool/mail/mikel if there was no procmail?

Not quite. fetchmail talks to your local mail daemon (whatever that may be)
which in turns deposits it in your mailspool.

However it will notice that you have a .forward, so it runs procmail and
hands over to procmail. If procmail is unable to file it anywhere it will
return the mail into your mailspool.

> 
> and that when I run /usr/sbin/sendmail -q I gather that that not only sends
> all outbound messages in /var/spool/mqueue but that it also is responsible for
> the 'execution' of the .forward that starts the filter into procmail ie if I
> dont run sendmail -q then all mail should stay in /var/spool/mail/mikel ?

I normally use `runq' as a number of MTAs provide that. But flushing the
outgoing queue only does that - flushes the outgoing queue. Nothing to do
with the incoming queue.

> Wondering because in all this I have not yet been able to catch my mail going
> into mikel spool/mail/mailbox. procmail gets hold of it very quick.

Procmail gets hold of it first.

POP -> Fetchmail -> Sendmail -> procmail -> many folders
					 \-> default mail spool


Anand