Procmail Service

Advanced tuning about Incoming and Outgoing mail aliasing service:

>> First we need procmail package for this service.
root@mail:# apt-get install procmail

>> Then we have to add a user account named 
allmail

root@mail:#           adduser       allmail

>> Send a copy of all mail to 
allmail account by adding auto bcc (bcc mail user will not be able to notice) in postfix,

root@mail:~# vim /etc/postfix/
main.cf

always_bcc = allmail@mahidul.com

>> Forward the incomming mail to procmail from .forward file,

root@mail:# vim /home/allmail/.forward

|/usr/bin/procmail

>> Resend/aliasing your mail from allmail using the following script,

root@mail:# vim /home/allmail/.procmailrc

SHELL=/bin/sh
MAILDIR=/var/spool/mail
LOGFILE=/var/log/procmail.log
LOCKFILE=$HOME/.lockmail

###  Incoming Filtering ###
:0
* ^(To|Cc):.*sunny@tanjila.com

! sarjin,tanjila,info,sunnysarjin@gmail.com


###  Outgoing Filtering ###
:0
* ^From.* sunny@tanjila.com
! sarjin,tanjila,info,sunnysarjin@gmail.com


>> After that, give ownership permission to both .procmailrc and .forward files,

root@mail:# chown allmail:allmail /home/allmail/.procmailrc

root@mail:# chown allmail:allmail /home/allmail/.forward

>> At last restart the postfix service,

root@mail:# /etc/init.d/postfix restart



Auto Reply Set:

>> First we need procmail package for this service.
root@mail:# apt-get install procmail
 
>> cd /home/mostafa/
​​
vim    .procmailrc 

>>write this:​​
​​
SHELL=/bin/sh
        :0 h c
            * !^FROM_DAEMON
            * !^X-Loop: 
sunny@tanjila.com       
| (formail -r -I"Precedence:junk" \
-A"X-Loop: 
 sunny@tanjila.com" ; \
                cat $HOME/message; \
                ) | $SENDMAIL -oi –t
:0


>> vim forward

write this:

|/usr/bin/procmail



>> vim message
Write message---

Comments

Popular posts from this blog

Squid Configuration

Squint Configure

Postfix SASL authentication with SMTP port 465:

How to Change the Logo from Zimbra Admin Console