aboutsummaryrefslogtreecommitdiff
path: root/test/smtp-dummy.c
AgeCommit message (Collapse)Author
2019-06-29test: run uncrustifyDaniel Kahn Gillmor
This is the result of running: $ uncrustify --replace --config ../devel/uncrustify.cfg *.cc *.c *.h in the test directory. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-10test: let the OS choose a port for smtp-dummyDavid Bremner
This should avoid potential collisions if we start running multiple smtp-dummy processes in parallel.
2017-08-30test/smtp-dummy: convert to 'goto DONE' styleDavid Bremner
Clean up several cppcheck warnings of the form - test/smtp-dummy.c:170: error: Resource leak: output Conform to overall notmuch code style.
2017-08-30test/smtp-dummy: uncrustifyDavid Bremner
For some reason lost in the mists of time this code was indented 8 spaces.
2016-06-05Use https instead of http where possibleDaniel Kahn Gillmor
Many of the external links found in the notmuch source can be resolved using https instead of http. This changeset addresses as many as i could find, without touching the e-mail corpus or expected outputs found in tests.
2012-10-20test/smtp-dummy: add --background option and functionalityTomi Ollila
When shell executes background process using '&' the scheduling of that new process is arbitrary. It could be that smtp-dummy doesn't get execution time to listen() it's server socket until some other process attempts to connect() to it. The --background option in smtp-dummy makes it to go background *after* it started to listen its server socket. When --background option is used, the line "smtp_dummy_pid='<pid>'" is printed to stdout from where shell can eval it.
2012-09-01test/smtp-dummy.c: fix compilation on FreeBSDMike Kelly
Use the more portable netint/in.h, instead of netint/ip.h, to include htons(3), etc.
2011-11-13test: make smtp-dummy work with Emacs 24Thomas Jost
In Emacs 24, a space is expected after a SMTP response code. If we don't respect that, smtpmail-send-it will wait forever.
2011-11-12smtp-dummy: clear sockaddr_in structure before use in bind()Tomi Ollila
Any junk bytes in sockaddr_in structure before passing that to bind() system call may cause problems.
2011-06-22smtp-dummy: Prefer return rather than exit() in main.Carl Worth
The main() function should be written as just another function with a return value. This allows for more reliable code reuse. Imagine that main() grows too large and needs to be factored into multiple functions. At that point, exit() is probably the wrong thing, yet can also be hard to notice as it's in less-frequently-tested exceptional cases.
2011-06-22Fix compilation warnings in test/smtp-dummy.c.Dmitry Kurochkin
* Remove unused variables in main(): buf, bytes and greeting. * Replace return with no value in main() with exit(3).
2010-10-27test: Add test that emacs interface actually sends mail.Carl Worth
Rather than *reall* sending mail here, we instead have a new test program, smtp-dummy which implements (a small piece of) the server-side SMTP protocol and saves a mail message to the filename provided. This gives us reasonable test coverage of a large chunk of the notmuch+emacs code base (down to talking to an SMTP server with the final mail contents).