Andrea Bencini wrote:
>>> How can I test BAD_HEADER?
>> Perhaps ... by sending a message with a bad header.
> Yes...by sending a message with a bad header, but how can I prepare a 
> message with a bad header?
> 

You can telnet to your mailhost and create a mail message with a 
duplicate header, for example:

$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.mydomain.com ESMTP Postfix
EHLO mydomain.com
250-mail.mydomain.com
250-PIPELINING
250-SIZE 30240000
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
MAIL FROM:<[EMAIL PROTECTED]>
250 2.1.0 Ok
RCPT TO:<[EMAIL PROTECTED]>
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
Subject: Hello
Subject: second subject header
.
250 2.0.0 Ok: queued as 9F59F36639D
quit
221 2.0.0 Bye
Connection closed by foreign host.

from maillog:

Feb  7 10:22:16 glacier amavis[29310]: (29310-02) check_header: 8, 
Duplicate header field: "Subject"
Feb  7 10:22:17 glacier postfix/smtpd[29084]: disconnect from 
localhost[127.0.0.1]
Feb  7 10:22:17 glacier amavis[29310]: (29310-02) local delivery: <> -> 
<bad-header-quarantine>, mbx=/var/amavis/quarantine/badh-NV3KV9bVKk

Now, see quarantined mail indicated in mbx above.



>> The sub check_header_validity implements the following checks:
> What is check_header_validity ? I don't found in amavisd.conf file!!

Mark is indicating that the following checks are performed by amavis:
> 
>> - bad mime header section or bad mime structure
>> - invalid 8-bit characters in header section
>> - invalid control characters in header section
>> - folded header field made up entirely of whitespace
>> - header line longer than rfc2822 limit of 998 characters
>> - header field syntax error
>> - missing required header field
>> - duplicate header field
>>
You can decided how you want to handle them (quarantine, ignore, etc).

MrC
>> In addition, syntax errors in MIME structure as reported
>> by MIME::Parser are included in this category.
> 
> Light me the solution!!
> Thanks
> Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to