This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

[ASG 8.201] BUG: POP3 Proxy can not handle header values longer than 255 characters

If you receive an email which contains a header line with a value longer than 255 characters this value can not be stored in the table modfied_headers because the field "value" is of type varchar(255). In the log you get an error like this:


2011:09:12-06:51:46 router pop3proxy[30715]: Database error: ERROR:  value too long for type character varying(255)
2011:09:12-06:51:47 router pop3proxy[30715]: Can't insert mail uid 1315803048.M861026P30270.mail2 into database
2011:09:12-06:51:47 router pop3proxy[30715]: Prefetcher exception occurred


I fixed this by altering the tabe modified_header to store longer values:


ALTER TABLE modified_headers ALTER COLUMN value TYPE varchar(1000);


RFC 2822 section 3.5 says, that a message line (including header lines) may have up to 998 plus CRLF. So a length of 1000 characters seems to be more than enough. But header lines can be splitted to more than one line so even 1000 characters are not enough. Perhaps this field should be changed to somewhat like TEXT instead of varchar().


This thread was automatically locked due to age.
  • If you receive an email which contains a header line with a value longer than 255 characters this value can not be stored in the table modfied_headers because the field "value" is of type varchar(255). In the log you get an error like this:


    2011:09:12-06:51:46 router pop3proxy[30715]: Database error: ERROR:  value too long for type character varying(255)
    2011:09:12-06:51:47 router pop3proxy[30715]: Can't insert mail uid 1315803048.M861026P30270.mail2 into database
    2011:09:12-06:51:47 router pop3proxy[30715]: Prefetcher exception occurred


    I fixed this by altering the tabe modified_header to store longer values:


    ALTER TABLE modified_headers ALTER COLUMN value TYPE varchar(1000);


    RFC 2822 section 3.5 says, that a message line (including header lines) may have up to 998 plus CRLF. So a length of 1000 characters seems to be more than enough. But header lines can be splitted to more than one line so even 1000 characters are not enough. Perhaps this field should be changed to somewhat like TEXT instead of varchar().


    Hello, did you submit this bug to support team?