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
>> 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,
>> 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 /home/allmail/.forward
|/usr/bin/procmail
>> Resend/aliasing your mail from allmail using the following script,
>> 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,
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,
>> 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:
| (formail -r -I"Precedence:junk" \
sunny@tanjila.com"
; \
cat $HOME/message; \
) | $SENDMAIL -oi –t
cat $HOME/message; \
) | $SENDMAIL -oi –t
:0
>> vim forward
write this:
write this:
|/usr/bin/procmail
>> vim message
Write message---
Comments
Post a Comment