Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th January 2009, 00:59
gjcomputer gjcomputer is offline
Member
 
Join Date: Jan 2006
Location: missouri, USA
Posts: 91
Thanks: 15
Thanked 2 Times in 2 Posts
Default blocked bad-header

how can i allow this through my system? it is coming from a php script that i want to allow through everytime, can i turn something off? and shouldnt my relay host be what i configured, instead of localhsot?
i am using ispconfig 3.0.0.8 on debian etch
mail.log
Code:
Jan 23 17:51:52 sys1 amavis[2917]: (02917-02) Blocked BAD-HEADER, <www-data@sys1.****.com> -> <**********@gmail.com>, quarantine: badh-Q-XBCNzRss0e, Message-ID: <20090123235151.62A6F10881C6@sys1.****.com>, mail_id: Q-XBCNzRss0e, Hits: 3.95, 720 ms
Jan 23 17:51:52 sys1 postfix/smtp[3538]: 62A6F10881C6: to=<*********@gmail.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.81, delays=0.06/0.02/0/0.72, dsn=2.7.1, status=sent (254 2.7.1 Ok, discarded, id=02917-02 - BAD_HEADER: Improper use of control character (char 0D hex): MIME-Version: 1.0\\r\\n)
Jan 23 17:51:52 sys1 postfix/qmgr[2739]: 62A6F10881C6: removed
Jan 23 17:52:45 sys1 postfix/pickup[2738]: 0B4D010881C6: uid=33 from=<www-data>
Jan 23 17:52:45 sys1 postfix/cleanup[3535]: 0B4D010881C6: message-id=<20090123235245.0B4D010881C6@sys1.****.com>
Jan 23 17:52:45 sys1 postfix/qmgr[2739]: 0B4D010881C6: from=<www-data@sys1.****.com>, size=1152, nrcpt=1 (queue active)
Jan 23 17:52:45 sys1 amavis[2916]: (02916-03) Blocked BAD-HEADER, <www-data@sys1.****.com> -> <*********@gmail.com>, quarantine: badh-HXHB-GAK6g5h, Message-ID: <20090123235245.0B4D010881C6@sys1.****.com>, mail_id: HXHB-GAK6g5h, Hits: 3.929, 287 ms
Jan 23 17:52:45 sys1 postfix/smtp[3538]: 0B4D010881C6: to=<gjcomputer@gmail.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.3, delays=0.01/0/0/0.29, dsn=2.7.1, status=sent (254 2.7.1 Ok, discarded, id=02916-03 - BAD_HEADER: Improper use of control character (char 0D hex): MIME-Version: 1.0\\r\\n)
Jan 23 17:52:45 sys1 postfix/qmgr[2739]: 0B4D010881C6: removed
Jan 23 17:53:30 sys1 postfix/pickup[2738]: 6942A10881C6: uid=33 from=<www-data>
Jan 23 17:53:30 sys1 postfix/cleanup[3535]: 6942A10881C6: message-id=<20090123235330.6942A10881C6@sys1.****.com>
Jan 23 17:53:30 sys1 postfix/qmgr[2739]: 6942A10881C6: from=<www-data@sys1.****.com>, size=1402, nrcpt=1 (queue active)
Jan 23 17:53:30 sys1 amavis[2917]: (02917-03) Blocked BAD-HEADER, <www-data@sys1.****.com> -> <*******@gmail.com>, quarantine: badh-rLG2pIulu7N1, Message-ID: <20090123235330.6942A10881C6@sys1.****.com>, mail_id: rLG2pIulu7N1, Hits: 4.166, 240 ms
Jan 23 17:53:30 sys1 postfix/smtp[3538]: 6942A10881C6: to=<********@gmail.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.26, delays=0.01/0/0/0.24, dsn=2.7.1, status=sent (254 2.7.1 Ok, discarded, id=02917-03 - BAD_HEADER: Improper use of control character (char 0D hex): MIME-Version: 1.0\\r\\n)
Jan 23 17:53:30 sys1 postfix/qmgr[2739]: 6942A10881C6: removed
__________________
6r36.com
Reply With Quote
Sponsored Links
  #2  
Old 24th January 2009, 13:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Did you configure any header checks for Postfix in ISPConfig 3?
__________________
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
  #3  
Old 16th May 2014, 23:39
reason8 reason8 is offline
Senior Member
 
Join Date: Aug 2008
Posts: 141
Thanks: 2
Thanked 0 Times in 0 Posts
Default Amavis Blocked Header

Hello and good day.

I am having the same problem.

I am trying to use an application that uses the php mail function but my logs show amavis is blocking the email from being sent.

May 16 14:21:53 [hostname] amavis[2506]: (02506-01) Blocked BAD-HEADER, <webmaster@domain.tld> -> <myname@domain.tld>, quarantine: badh-0EgzxmrgzuPp, Message-ID: <20140516212153.3D924200D8@fqdn>, mail_id: 0EgzxmrgzuPp

I have not made any changes to my postfix config other than relaying from my ispconfig server to an internal mail server for email delivery.

I am running the recent version of ispconfig on openSUSE 11.3

UPDATE:

I just checked and it seems Amavis is lableing the message as BAD HEADER and quarantining the message. Not sure why other than some users said it had something to do with \n coding with php.

This is what my message looks like:

Return-Path: <>
Delivered-To: bad-header-quarantine
X-Envelope-From: <webmaster@domain.tld>
X-Envelope-To: <me@domain.tld>
X-Envelope-To-Blocked: <me@domain.tld>
X-Quarantine-ID: <zB4Dg+JFS2Jk>
X-Amavis-Alert: BAD HEADER SECTION Improper use of control character (char 0D
hex): MIME-Version: 1.0\r
__________________
Running:

ISPConfig 3
openSUSE Linux 11.3

Last edited by reason8; 17th May 2014 at 01:18. Reason: updated post
Reply With Quote
  #4  
Old 18th May 2014, 10:26
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 922
Thanks: 16
Thanked 259 Times in 206 Posts
Default

It seems you are using \r or \r\n instead of \n in the mails (see last part of error message). Try changing the script to use \n.
__________________
Marius Cramer

pixcept KG
Reply With Quote
  #5  
Old 18th May 2014, 10:33
reason8 reason8 is offline
Senior Member
 
Join Date: Aug 2008
Posts: 141
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Croydon View Post
It seems you are using \r or \r\n instead of \n in the mails (see last part of error message). Try changing the script to use \n.

Thanks for the quick and timely response.

It's not my script or program. So I do not think this will be possible.

I have seen other posts about this \r or \r\n as well but I don't think that is something I can implement.

Is there not a way to force amavis to simply allow this email based on the FROM friend? Application is running locally on my server.

Any other recommendations?
__________________
Running:

ISPConfig 3
openSUSE Linux 11.3
Reply With Quote
  #6  
Old 18th May 2014, 12:56
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 922
Thanks: 16
Thanked 259 Times in 206 Posts
Default

Try changing $final_bad_header_destiny in amavis config to if you want to disable those checks (although it would be better do use mail scripts that pass correct headers)
$final_bad_header_destiny = D_PASS;
__________________
Marius Cramer

pixcept KG
Reply With Quote
  #7  
Old 18th May 2014, 13:11
reason8 reason8 is offline
Senior Member
 
Join Date: Aug 2008
Posts: 141
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Croydon View Post
Try changing $final_bad_header_destiny in amavis config to if you want to disable those checks (although it would be better do use mail scripts that pass correct headers)
$final_bad_header_destiny = D_PASS;
That didnt work. I am still receiving a blocked error in the mail logs as seen below:

May 18 04:01:42 [hostname] amavis[15978]: (15978-01) Blocked BAD-HEADER, <webmaster@domain.tld> -> <me@domain.tld>, quarantine: badh-Edkkx15g6cGR, Message-ID: <20140518110142.76742200E6@fqdn>, mail_id: Edkkx15g6cGR, Hits: -, size: 585, 225 ms

And yes, I agree with your statement.

The ISPConfig webserver is simply relaying mail to my internal mail server. It's not really handling mail other than for localhost.
__________________
Running:

ISPConfig 3
openSUSE Linux 11.3
Reply With Quote
  #8  
Old 18th May 2014, 13:39
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 922
Thanks: 16
Thanked 259 Times in 206 Posts
Default

Try adding/setting in amavis config:
@bypass_header_checks_maps = (1);
__________________
Marius Cramer

pixcept KG
Reply With Quote
  #9  
Old 18th May 2014, 13:44
reason8 reason8 is offline
Senior Member
 
Join Date: Aug 2008
Posts: 141
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Croydon View Post
Try adding/setting in amavis config:
@bypass_header_checks_maps = (1);
Same thing. No difference. Still indicating a bad header.
__________________
Running:

ISPConfig 3
openSUSE Linux 11.3
Reply With Quote
  #10  
Old 18th May 2014, 14:41
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 922
Thanks: 16
Thanked 259 Times in 206 Posts
 
Default

If you want to disable all checks on mails (no amavis involved) you could try commenting out
content_filter = amavis:[127.0.0.1]:10024
in the postfix main.cf - but maybe someone else has a better idea as this disables all scanning, including virus check etc.
__________________
Marius Cramer

pixcept KG
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Intel 82815 Video Card & Ubuntu 8.10 harvey527 Kernel Questions 8 5th November 2010 14:51
Ubuntu 8.04 Spamsnake - all SA scores 0.00 Thomas_Powers HOWTO-Related Questions 23 24th June 2008 17:37
Webalizer/Angolizer Geo IP Error Mesasge jamesuk HOWTO-Related Questions 3 19th November 2007 13:57
ERROR: The PHP binary coming with ISPConfig does not work properly on your system! qvindesland Installation/Configuration 22 21st May 2007 16:05
Mail Sent and Received but failure notice delivered badbandit83 General 7 2nd February 2006 21:50


All times are GMT +2. The time now is 00:37.


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