简体   繁体   中英

How does procmail know where the mail file exists?

I inherited some software that somebody else wrote that uses procmail with which I have no experience.
When I run procmail it seems to just sit there. I'm assuming it is looking the mail file in a particular location, but I'm not exactly sure where that is.

If I go in to my mail client (mail on linux), I can see I have two messages (unread) there, but procmail does not seem to be processing it.
My default mail file location is in /var/mail/<myUsername> .

Is procmail looking in some other location? How do I tell procmail where to look for the mail file?

Sounds like you are not invoking Procmail correctly. The usual way is by creating a file .procmailrc . If your sysadmin is not running Procmail as the default LDA, you may also need to create a .forward or similar.

It will not handle any existing mail, but it will be hooked in when new mail arrives. You can process old mail via formail -s procmail but that's not how you usually deploy it.

If you run it from the command line, it will be expecting an email message on standard input. If you don't know how to type in an RFC822-compatible message, you could be messing up your inbox, although it's probably not very hard to clean up.

procmail -v will reveal how it was configured at compile time, including the default mail location.

See also http://porkmail.org/era/mail/procmail-debug.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM