LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   PROCMAIL+POSTFIX - Vacation Mail issue (http://www.linuxquestions.org/questions/linux-newbie-8/procmail-postfix-vacation-mail-issue-703820/)

arjuns8471 02-11-2009 04:14 AM

PROCMAIL+POSTFIX - Vacation Mail issue
 
Hi,

I have enabled the .procmailrc with the following code:

VACATION_LOCK=$HOME/${VACATION_LOCK:-".vacation$LOCKEXT"}
# cache file:
VACATION_CACHE=$HOME/${VACATION_CACHE:-".vacation_cache"}
# cache size:
VACATION_CACHE_SZ=${VACATION_CACHE_SZ:-8192}
# message file
VACATION_MSG=$HOME/${VACATION_MSG:-".vacation_mesg"}
# what to use as the xloop header
HOSTNAME=${HOSTNAME:-`hostname`}
VACATION_XLOOP=${VACATION_XLOOP:-"$LOGNAME@$HOSTNAME"}
# base token for default $VACATION_ON and $VACATION_OFF
# so you could set this and not those individually
VACATION_COOKIE=${VACATION_COOKIE:-"vacation"}
VACATION_ON=${VACATION_ON:-"$VACATION_COOKIE on"}
VACATION_OFF=${VACATION_OFF:-"$VACATION_COOKIE off"}

#
#Change these variables
#
VACATION_PASSWORD=xxxx
VACATION_DOMAIN_NAME=xxx.com

VACATION_SENDER=xxx@xxx.com
VACATION_SENDMAILFROM=${VACATION_SENDMAILFROM:-"-f$VACATION_SENDER"}
VACATION_SENDMAILFLAGS="-oi -t $VACATION_SENDMAILFROM"
# -----------------------------------------------------------------------------

SENDMAIL_CMD="$SENDMAIL $VACATION_SENDMAILFLAGS"
SHELL=/bin/sh

# check if we should send vacation message, add user to cache
:0 Whc: $VACATION_LOCK
# if i haven't been instructed to skip processing
* ? test -z $VACATION_SKIP
# if i have a vacation message file
* ? test -f $VACATION_MSG
# and the message is not from a daemon or mailer
* !^FROM_DAEMON
* !^FROM_MAILER
# not declared spam by spamassassin
* !^X-Spam-Flag: YES
# not discernably in a mailing list
* !^List-
* !^(Mailing-List|Approved-By|BestServHost|Resent-(Message-ID|Sender)):
* !^X-[^:]*-List:
* !^X-(Sent-To|(Listprocessor|Mailman)-Version):
# and not x-loop
* !^X-Loop: $VACATION_XLOOP
# add it to the cache
| formail -rD $VACATION_CACHE_SZ $VACATION_CACHE

:0 ehc
# if the name was not in the cache
# if we can find who we're sending it to
# and who we are sending this "From"
* ? test -n ${VACATION_MSG_SEND_TO}
* ? test -n ${VACATION_SENDER}
*$ !^From:.*$VACATION_SENDER
| (formail -r \
-I"Precedence: junk" \
-A"From: $VACATION_SENDER" \
-A"X-Loop: $VACATION_XLOOP"; \
cat $VACATION_MSG ) | \
$SENDMAIL_CMD

# Add/remove vacation message
:0
# First make sure that the sender has
# the correct username
* ^TO_\/[-\.a-z_]+@
*$ ^From:.*$\MATCH
# the correct email domain
*$ ^From:.*$\VACATION_DOMAIN_NAME
# only do this if we have a password set
* ? test -n $VACATION_PASSWORD
# and it's in the subject line
* $^Subject:.*${VACATION_PASSWORD}
{

# VACATION ON
# if subject line matches magic cookie for ON:
:0
* $^Subject:.*${VACATION_ON}
{
# pipe the body into the vacation message file
:0c:$VACATION_LOCK
| formail -I "" > $VACATION_MSG

# add message to the body
:0f
| cat - ; \
echo; \
echo '---------- VACATION -----------------'; \
echo 'The above text was installed as your vacation message'
}

# VACATION OFF
# if subject line matches magic cookie for OFF:
:0f
* $^Subject:.*${VACATION_OFF}
| cat -; \
echo '---------- VACATION -----------------'; \
echo 'Removing message and cache: '; \
rm -vf $VACATION_MSG; \
rm -vf $VACATION_CACHE; \
echo ; \
echo "Removed vacation message."
==============================================================
I have turned on the vacation mail, which is WORKING Fine, However, the auto reply message has MIME messages added to it, as depicted below:

This is a multipart message in MIME format.

------=_NextPart_000_00B7_01C98C49.C6E35BE0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_00B8_01C98C49.C6E35BE0"


------=_NextPart_001_00B8_01C98C49.C6E35BE0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi,


I will be out of town.



Regards,


Arjun Srinivasan

------=_NextPart_001_00B8_01C98C49.C6E35BE0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>



------=_NextPart_001_00B8_01C98C49.C6E35BE0--

------=_NextPart_000_00B7_01C98C49.C6E35BE0
Content-Type: image/jpeg;
name="image001.jpg"
Content-Transfer-Encoding: base64
Content-ID: <image001.jpg@01C98C49.C67F42E0>

/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8lJCIf
IiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCIoOzs7Ozs7
Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wAARCAAdAFQDASIA
AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA
AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3
ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm
p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA
AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx
BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK
U1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3
uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD1i+1e
x05WNxOAy/8ALMcsfoKyDrv23XbNLUstsoy7ngNuHQ/T+dbl1p9pegfabdJcdCw5H41xL/D+8ufE
qyXt0s2kx/MqZ2sRnIQge/esJqq5WTsvxG5xhG6jd/h6nfA8UZritUET+LbfRbnUJdO0yOz8yJIp
vKEj5xjd7DtVybwzZPayNpWsXq3QUmFhqDMN3bIJPGa2Mud9jqc0Zqrpa3i6ZbrqJRrsRgTFOhbu
RXH6da2+qavrZ1DWLyDyL1kiRL0xgLj0zQNytY7qiuF1OJdFvdMk0fW7y5mmu0je3e684Oh68dse
tdbrE89ro15PajM0UDtGMZ5A4ouCle/kXc0ZriNB0zStU0i2u7vXrue6mQPL/wATBlwx6jaDxitb
TdIvtN1xXs7+W40l4SJI7icyMsmeCpPbHvQJSb6HRUUUUzQKSlooA5bV9V09fELaZ4gtbRbEwCS3
nuEyGfPzLk8Cs7VYvAK6dcPC2mrMI28s274fdjjG05zmu2lginXZNEki+jqCP1qJNOsY2DR2dujD
oViUH+VKxm4NlLws103hjTjfb/tBgXfv+97Z98YrktNfwyuta9/bpsfN+3t5f2kDO3HbPbNehYqF
rO2ZizW8TE9SUBJosDht5HA64/hzFmfC/wBmGqfaoxGbEfNtz82cdsetdxq1xc2mk3NxZwie4iiL
JEc4cjtxViO3hiOY4kQ+qqBUmKLBGFrnG2114G1S0iubyPSY7iRAZUcKjK3cEHnrUOk/2Wnjm3j8
Nups/sr/AGsW7Exbs/LntmuwfTrKVi8lnA7HqWiUk/pUsNvDbrthiSNfRFAH6UWFyMfRS0UzU//Z

------=_NextPart_000_00B7_01C98C49.C6E35BE0--
=======================================================

Please let me know how to get rid of the jargon that is getting added.
Your response is greatly appreciated.
Regards,
Arjun

arjuns8471 02-11-2009 05:07 AM

Can anybody please reply?
Thanks

arjuns8471 02-26-2009 04:06 AM

Is this forum dead????

billymayday 02-26-2009 04:11 AM

DO you really expect anyone to read that?

arjuns8471 02-26-2009 11:12 PM

Not IF u understand English and Linux...LOL


All times are GMT -5. The time now is 05:16 AM.