User Tools

Site Tools


procmail

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
procmail [2022/07/19 20:13] – external edit 127.0.0.1procmail [2022/07/24 10:36] (current) admin
Line 5: Line 5:
  
 Lets write a basic Procmail script: Lets write a basic Procmail script:
 +<code>
  vi /home/$USER/.procmailrc  vi /home/$USER/.procmailrc
    
Line 28: Line 29:
  #This command will copy emails which are From and To the various users. Once these 2 criteria are met, then the email is copied into the Test_Folder.  #This command will copy emails which are From and To the various users. Once these 2 criteria are met, then the email is copied into the Test_Folder.
  
 +</code>
 There is a load more commands and checks which procmail can carry out. It can run a virus scan and spam check on some, or all of your email. There is a load more commands and checks which procmail can carry out. It can run a virus scan and spam check on some, or all of your email.
  
 The : means lockfile while processing. The : means lockfile while processing.
 +<code>
  man procmailrc  man procmailrc
- <nowiki>//</nowiki>shows all options+ #shows all options 
 +</code>
  
 ===== Forward a Copy of all Emails to another email account ===== ===== Forward a Copy of all Emails to another email account =====
 Although it is possible to do this using the /home/$user/.forward, it is as easy to do this with a procmailrc entry. Although it is possible to do this using the /home/$user/.forward, it is as easy to do this with a procmailrc entry.
 +<code>
  :0 c  :0 c
  !email@gmail.com  !email@gmail.com
 +</code>
  
 ===== Procmail Examples ===== ===== Procmail Examples =====
 Simple!: Simple!:
 +<code>
  man procmailex  man procmailex
-----+</code>
  
  
procmail.txt · Last modified: 2022/07/24 10:36 by admin