eddic / fastcgipp

fastcgi++: A C++ FastCGI and Web development platform:
https://fastcgipp.isatec.ca
GNU Lesser General Public License v3.0
310 stars 94 forks source link

mail example will fail and retry inifinitly if sender address is bad #71

Closed z7z8th closed 5 years ago

z7z8th commented 5 years ago

The example app mail.fcgi will inifinitly retry with bad sender address. I found thousands of fail logs after input a bad send address, I think this might be a trouble to your server.

May 05 19:17:45 aa email.fcgi[15698] [error]: Bad reply from SMTP server after MAIL: 501 <oh>: sender address must contain a domain
May 05 19:17:46 aa email.fcgi[15698] [error]: Bad reply from SMTP server after MAIL: 501 <oh>: sender address must contain a domain
...
...
May 05 19:17:46 aa email.fcgi[15698] [error]: Bad reply from SMTP server after MAIL: 501 <oh>: sender address must contain a domain
May 05 19:17:46 aa email.fcgi[15698] [error]: Bad reply from SMTP server after MAIL: 501 <oh>: sender address must contain a domain
eddic commented 5 years ago

Ah yes. It would appear that the email part is somewhat incomplete in that regard. Thanks.

eddic commented 5 years ago

Alright the most recent commit should fix this. Let me know.

z7z8th commented 5 years ago

Yes, it's retrying much slower. BTW, will it retry forever or give up after retried several times?

eddic commented 5 years ago

Yeah it'll keep trying forever. My logic is that for a web application like this you'd want to keep trying until the mail server is back up to dump the queue.