Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th December 2006, 21:13
shark_tico shark_tico is offline
Junior Member
 
Join Date: Oct 2006
Location: San Ramon, Costa Rica
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post
Default problems with body and subject with Autoresponders to accompany Virtual Users guide

Hello

I followed the guide:

http://www.howtoforge.com/autorespon..._postfix_users

I have some questions:

Do the file email_subject.patch must be created in this directory? (I did it here... is this ok?): /usr/local/postfix-tools/yaa-0.3/lib/ ?


When I enter this command:
patch -p0 <email-subject.patch (Check the name, in the step before the file name is: email_subject.patch and not: email-subject.patch)

Then i got the following message:
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- Autoresponse.pm 2004-08-19 20:35:28.000000000 +0200
|+++ Autoresponse.pm 2005-07-14 13:16:03.000000000 +0200
--------------------------
File to patch:


I don't know what file I have to patch.

With this problem, the autoresponder worked, but with gmail a got this subject:
=?us-ascii?Q?subject=

Where subject is the text I putted at DB.

With Hotmail the subjects looks fine

With Hotmail and Gmail at the body I can see:
?=
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: Quoted-Printable

body

Where body is the text I putted at DB.

This mail system is configurate with: http://www.howtoforge.com/virtual_po..._quota_courier

Any ideas?

Thanks in advance.
__________________
Fabio Benavides
www.unavidaconproposito.com
Reply With Quote
Sponsored Links
  #2  
Old 20th December 2006, 11:10
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,197
Thanks: 829
Thanked 5,419 Times in 4,261 Posts
Default

Please create a new file with:

vi /usr/local/postfix-tools/yaa-0.3/lib/email_subject.patch

containing the following lines:

Code:
--- Autoresponse.pm     2004-08-19 20:35:28.000000000 +0200
+++ Autoresponse.pm     2005-07-14 13:16:03.000000000 +0200
@@ -182,7 +182,11 @@
        push(@headers, "Precedence: bulk");

        # Subject
-       push(@headers, "Subject: =?" . (($self->{charset}) ? $self->{charset} : $self->{default_charset}) . "?Q?" . encode_qp($subject) . "?=");
+       #
+       # Fixes the strange subjects that email clients don't understand
+       # (second argument on encode_qp should be "")
+       push(@headers, "Subject: =?" . (($self->{charset}) ? $self->{charset} : $self->{default_charset}) . "?Q?" . encode_qp($subject,"") . "?=");


        push(@headers, "MIME-Version: 1.0");
then proceed with the commands:

cd /usr/local/postfix-tools/yaa-0.3/lib/
patch -p0 <email-subject.patch
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 20th December 2006, 17:55
shark_tico shark_tico is offline
Junior Member
 
Join Date: Oct 2006
Location: San Ramon, Costa Rica
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post
Default thanks but didn't work

Hello Till

I did exactly what you post, but when i did:
sudo patch -p0 <email-subject.patch

I got:
-bash: email-subject.patch: No such file or directory

I did with the name: email_subject.patch but I got:
sudo patch -p0 <email_subject.patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- Autoresponse.pm 2004-08-19 20:35:28.000000000 +0200
|+++ Autoresponse.pm 2005-07-14 13:16:03.000000000 +0200
--------------------------
File to patch:

I created the file with copy and paste using vim.

Thanks for your help
__________________
Fabio Benavides
www.unavidaconproposito.com
Reply With Quote
  #4  
Old 21st December 2006, 18:44
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by shark_tico
I got:
-bash: email-subject.patch: No such file or directory
Are you sure you created the file /usr/local/postfix-tools/yaa-0.3/lib/email_subject.patch?

What's the output of
Code:
updatedb
locate email_subject.patch
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 22nd December 2006, 21:50
shark_tico shark_tico is offline
Junior Member
 
Join Date: Oct 2006
Location: San Ramon, Costa Rica
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post
Default in answer to

Hello Falko

At: /usr/local/postfix-tools/yaa-0.3/lib
I made "ls" and I got:
email_subject.patch email_subject.patch~ Yaa Yaa.pm

(Please look files names: The how-to said:
"patch -p0 <email-subject.patch" but before we made the file with this name:
email_subject.patch *with underscore between email and subject*)

The output of locate email_subject.patch is:
/usr/local/postfix-tools/yaa-0.3/lib/email_subject.patch


Thanks for your help!
__________________
Fabio Benavides
www.unavidaconproposito.com
Reply With Quote
  #6  
Old 23rd December 2006, 16:27
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Then the correct command is
Code:
patch -p0 <email_subject.patch
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 23rd December 2006, 17:38
Slicer Slicer is offline
Member
 
Join Date: Jul 2006
Posts: 42
Thanks: 2
Thanked 1 Time in 1 Post
Default What file are we patching?

I am having issues understanding this as well. While the new command works, I still do not understand what information needs to be provided when I try to run the script.

Here is the output.
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- Autoresponse.pm 2004-08-19 20:35:28.000000000 +0200
|+++ Autoresponse.pm 2005-07-14 13:16:03.000000000 +0200
--------------------------
File to patch:
Thanks!!

Slicer

Last edited by Slicer; 24th December 2006 at 04:21.
Reply With Quote
  #8  
Old 24th December 2006, 13:54
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Did you run this from the correct directory?

What's the output of
Code:
updatedb
locate Autoresponse.pm
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 25th December 2006, 13:42
todgerme todgerme is offline
Member
 
Join Date: Dec 2005
Location: Belfast, Northern Ireland
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
Default

Sorry guys about the "-" and the "_" mixup in the guide! Hopefully you're all now sorted with working autoresponders!

Merry Christmas, now for some tv and a large satisfying but ultimately glutonous dinner
Reply With Quote
  #10  
Old 26th December 2006, 17:41
shark_tico shark_tico is offline
Junior Member
 
Join Date: Oct 2006
Location: San Ramon, Costa Rica
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post
 
Default same problem that Slicer

Hello falko

Thanks for your help

When I made:
sudo patch -p0 <email_subject.patch
I got:


can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- Autoresponse.pm 2004-08-19 20:35:28.000000000 +0200
|+++ Autoresponse.pm 2005-07-14 13:16:03.000000000 +0200
--------------------------
File to patch:

I made:
updatedb
locate Autoresponse.pm

And I got:
/usr/local/postfix-tools/yaa-0.3/lib/Yaa/Autoresponse.pm

And I was excecuting the patch at:
/usr/local/postfix-tools/yaa-0.3/lib/

I executed the patch at:
/usr/local/postfix-tools/yaa-0.3/lib/Yaa/

But now I got:
patching file Autoresponse.pm
patch unexpectedly ends in middle of line
patch: **** malformed patch at line 13:

My File is:

--- Autoresponse.pm 2004-08-19 20:35:28.000000000 +0200
+++ Autoresponse.pm 2005-07-14 13:16:03.000000000 +0200
@@ -182,7 +182,11 @@
push(@headers, "Precedence: bulk");

# Subject
- push(@headers, "Subject: =?" . (($self->{charset}) ? $self->{charset} : $self->{default_charset}) . "?Q?" . encode_qp($subject) . "?=");
+ #
+ # Fixes the strange subjects that email clients don't understand
+ # (second argument on encode_qp should be "")
+ push(@headers, "Subject: =?" . (($self->{charset}) ? $self->{charset} : $self->{default_charset}) . "?Q?" . encode_qp($subject,"") . "?=");


push(@headers, "MIME-Version: 1.0");

Thanks.
__________________
Fabio Benavides
www.unavidaconproposito.com
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:08.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.