0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-20 10:02:14 +02:00
PHPMailer/test/runfakepopserver.sh
François B 4532cec50d Improve some comments and minor improvements
- Define an $error_message and reuse it, instead of recreating the
error message 3 times
- Use in_array() check instead of a regex
2015-10-13 22:38:15 +02:00

11 lines
359 B
Bash
Executable File

#!/usr/bin/env bash
# Run the fake pop server from bash
# Idea from http://blog.ale-re.net/2007/09/ipersimple-remote-shell-with-netcat.html
# Defaults to port 1100 so it can be run by unpriv users and not clash with a real server
# Optionally, pass in a port number as the first arg
mkfifo fifo
nc -l ${1:-1100} <fifo |bash ./fakepopserver.sh >fifo
rm fifo