Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[S] 554 Rejected - Message containing bare LF's. #52

Open
tmassimi opened this issue Apr 9, 2014 · 0 comments
Open

[S] 554 Rejected - Message containing bare LF's. #52

tmassimi opened this issue Apr 9, 2014 · 0 comments

Comments

@tmassimi
Copy link

tmassimi commented Apr 9, 2014

Hi,
I'm using mailsend1.17b2 and had the error in the subject
when seng emails via some mailserver (Hmailserver).

I have made a fix but unlikely the code on the trunk is changed too much,
so I can't send a patch.

the main problem was in this code

            /* vinicio qmail fix */
            len=strlen(mbuf);
            if (mbuf[len-1] != '\n')
                strcat(mbuf,"\r\n");
            else
            {
               mbuf[--len]='\0';
               strcat(mbuf,"\r\n");
            }
            /* vinicio qmail fix */

if mbuf already ends with \r\n, the resulting buffer will end with "\r\r\n",
from here the error message "contains bare LF's".
I changed only the "else" with this one:
"else if (mbuf[len-2] != '\r')"

the second problem was that when splittng an attachment in lines,
the "vinicio qmail fix" was missing at all, so some illegal line was sent
to the mail server (unlikely I can't find this part in the current code)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant