LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-21-2018, 07:04 PM   #1
Dr. Cyber
LQ Newbie
 
Registered: Nov 2017
Posts: 6

Rep: Reputation: Disabled
cannot find email after procmail error


I got the "couldn't create /var/spool/mail" error from procmail and solved it by creating the proper directories with the proper permissions. However procmail got my mail using pop and flushed it when it got the error and now I do not know where it put the mail. Does anyone know where procmail might have put my mail or how I can find it? Or did procmail just destroy my mail? I would really like to read the mail that I missed!
 
Old 09-21-2018, 07:33 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Typically, procmail processing is post-receipt, so if that fails the email probably went to the bit-bucket.

A line from my .procmailrc
Code:
MAILDIR=$HOME/Maildir/      # you'd better make sure it exists
(your MAILDIR would be different...but the important part if this example is the comment...)
 
Old 09-21-2018, 07:50 PM   #3
Dr. Cyber
LQ Newbie
 
Registered: Nov 2017
Posts: 6

Original Poster
Rep: Reputation: Disabled
That is weird, I got
Code:
MAILDIR=$HOME/email
in my ~/.procmail yet procmail still tries to use /var/spool/mail. Seems like it uses /var/spool/mail if it can and otherwise prints an error and uses the directory that is specified by MAILDIR if that directory exists.
Anyway I found my mail in $HOME/email, thanks!

Last edited by Dr. Cyber; 09-21-2018 at 07:53 PM.
 
Old 09-21-2018, 07:55 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by Dr. Cyber View Post
That is weird, I got
Code:
MAILDIR=$HOME/email
in my ~/.procmail yet procmail still tries to use /var/spool/mail. Seems like it uses /var/spool/mail if it can and otherwise prints an error and uses the directory that is specified by MAILDIR if that directory exists.
Anyway I found my mail there, thanks!
Ahh. Good. Some MTA's use /var/spool/mail/<user> as the delivery location for email. procmail will deliver it to your MAILDIR...apparently even if /var/spool/mail can't be used.
In my case, the MTA and procmail are using the same maildir location.

Glad you didn't lose the emails.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Procmail fails to forward SOME email ThickGit Linux - Server 4 06-28-2017 09:37 PM
procmail catch email with attachment packets Linux - Software 1 09-23-2013 11:55 AM
how to truncate email (with procmail?) Bogus8 Linux - Software 11 07-22-2008 06:51 PM
Anyone Filter Email w/ Procmail carlosinfl Linux - Server 10 03-14-2008 03:07 PM
How to get procmail to send a copy of an email lmcilwain Linux - Software 0 03-02-2006 01:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration