Procmail for Postfix

Issues related to applications and software problems
Post Reply
jjrowan
Posts: 132
Joined: 2005/09/10 13:07:15
Contact:

Procmail for Postfix

Post by jjrowan » 2018/10/31 21:44:56

I ran procmail with sendmail for many years. Now I am running Postfix instead of sendmail having migrated from an old Red Hat (5 I think) server to CentOS 7. Procmail recipes helped me discard garbage e-mails but I haven't been able to get it working with Postfix. I'm need to analyze each e-mail coming in to see if it's garbage (i.e. we hacked your password, send $$$ to my bitcoin account) or similar. I've googled this but can't find a way to filter for garbage. Please advise.

tunk
Posts: 1206
Joined: 2017/02/22 15:08:17

Re: Procmail for Postfix

Post by tunk » 2018/10/31 23:34:42


jjrowan
Posts: 132
Joined: 2005/09/10 13:07:15
Contact:

Re: Procmail for Postfix

Post by jjrowan » 2018/11/01 11:13:56

I was hoping to use existing recipes I had from procmail. I will look at bogofilter, thanks. The link you provided has info on Raspberry Pi apps, I have 6 Pis and will spend time with those pages.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Procmail for Postfix

Post by TrevorH » 2018/11/01 15:25:54

The arch linux documentation is generally thought to be very good (not specifically postfix/procmail) and they have https://wiki.archlinux.org/index.php/Procmail which might help?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

jjrowan
Posts: 132
Joined: 2005/09/10 13:07:15
Contact:

Re: Procmail for Postfix

Post by jjrowan » 2018/11/01 16:28:52

The arch linux doc was successful in getting procmail to work, my problem now is postfix is still reading $HOME/Maildir for incoming mail and procmail is sending to /var/spool/mail/<username>. I had a great deal of difficulty getting postfix working months ago. I tried adding a line to /etc/procmail to specify writing to $HOME/Maildir but it continued to write to /var/spool/mail/<username>.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Procmail for Postfix

Post by TrevorH » 2018/11/01 17:06:13

I have never used procmail so I'm navigating blind but that same link has lines in it that set MAILDIR=$HOME/Mail but I gather that Maildir should be a directory so perhaps MAILDIR=$HOME/Maildir/ would work?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

jjrowan
Posts: 132
Joined: 2005/09/10 13:07:15
Contact:

Re: Procmail for Postfix

Post by jjrowan » 2018/11/02 22:14:20

Postfix is writing individual messages into /home/<username>/Maildir/cur/ If I turn on procmail via /etc/postfix/main.cf then procmail writes every e-mail to a single file in /var/spool/mail/<username> I can't remember where / how I configured postfix to serve messages from ~Maildir. With mail going to /var/spool/mail/<username>, Thunderbird requesting e-mail from the server gets nothing even though there's messages in /var/spool/mail/<username>

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Procmail for Postfix

Post by TrevorH » 2018/11/03 05:38:56

In the link that I posted earlier, there is a section near the top titled "Assignments" which appears to say that you can tell procmail where to store the mails.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply