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

SMTP protocol synchronization error (next input sent too soon: pipelining was not advertised) #302

Open
zuehls opened this issue Sep 5, 2023 · 1 comment

Comments

@zuehls
Copy link

zuehls commented Sep 5, 2023

Email functionality was not working. Discovered the following pull request was completed a while back but the value that was set '4' does not provide enough lines of delay for my SMTP relay to work correctly (subject includes error). I changed the senddelay from '4' to '5' or higher and now email log is successfully sent.

#75

@zuehls
Copy link
Author

zuehls commented Sep 7, 2023

I've improved this by counting the number of lines in the EMAIL_LOG_HEADER and using it's value as the number of lines to add to the sendDelay function.

sendDelay() {
#count number of lines in EMAIL_LOG_HEADER to apply the delay from EMAIL_DELAY_INTERVAL from NC (netcat)
EMAIL_LINES_TO_DELAY=$(cat "${EMAIL_LOG_HEADER}" | wc -l)

c=0                
while read L; do
    #[ $c -lt 4 ] && sleep ${EMAIL_DELAY_INTERVAL}
    [ $c -lt "${EMAIL_LINES_TO_DELAY}" ] && sleep ${EMAIL_DELAY_INTERVAL}
    c=$((c+1))                                                           
    echo $L                                                                                  
done      

}

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