Age | Commit message (Collapse) | Author | |
---|---|---|---|
2011-10-21 | proxsmtpd: [PATCH] Close extra file descriptors for filter command | Keith Owens | |
Short form: Passing extra file descriptors to the filter command can prevent it from detecting EOF or EPIPE. Result, dead filter commands that never terminate. Close everything except fd 0, 1, 2 before running the filter command. Long form: At the point that the filter command is forked and executed, proxsmtd may have multiple children with multiple pipes open. fork() bumps the reference count on all the file descriptors that are open at that moment. When the parent closes its part of the pipe, the pipe fd may or may not be removed from the system, depending on how many children have accidentally inherited that pipe. The child code closes fd 0, 1 and 2, calls dup2() to map the pipes to 0, 1 and 2 then runs. If another child has accidentally bumped the reference count on the pipes to this child then fd 0 can have multiple writers. This prevents the filter from detecting EOF or EPIPE when proxsmtpd closes the pipe to this particular child. This bug is particularly evident if the filter program does another fork and uses more pipes to communicate with its own child. awk does this as a matter of course. The result is a dangling filter command just sitting there waiting for input and not detecting that stdin has been closed. The dangling commands are owned by pid 1 rather than proxsmtpd. The only way to get rid of them is to manually kill them. | |||
2011-09-16 | workaround for race between waitpid(-1) and waitpid(pid) | Keith Owens | |
Sometimes waitpid(-1) in cb_check_data reaps a child that has just terminated, before waitpid(pid) in wait_process can reap it. Linux waitpid(pid,,WNOHANG) may not return an error if the child has already terminated, which results in wait_process looping waiting for the child which has already terminated. The symptom is a spurious "timeout waiting for filter command to exit". | |||
2011-01-23 | Reject early before recipient server gets the envelope. | Stef Walter | |
2011-01-23 | Add a default reject message | Stef Walter | |
2011-01-23 | Add status to logs for rejection and skipping | Stef Walter | |
2011-01-23 | Allow skipping processing data for unauthenticated connections. | Stef Walter | |
2011-01-23 | Implement reject filter for messages. | Stef Walter | |
2007-10-26 | Fix uninitialized pid variable. | Stef Walter | |
2007-05-28 | Use 'Stef' instead of 'Nate' | Stef Walter | |
2007-03-20 | Fix version string. | Stef Walter | |
2006-11-14 | Add header option back into proxsmtp | Stef Walter | |
2006-09-27 | - On FreeBSD fix problem where stderr wasn't processed when filter | Stef Walter | |
didn't read stdin. | |||
2006-08-30 | Bring in some changes from ClamSMTP | Stef Walter | |
2006-07-13 | Another fix for waiting on processes. | Stef Walter | |
2005-12-08 | Fix problem when waiting for processes. | Stef Walter | |
2005-10-19 | Fixes from Loic Le Loarer | Stef Walter | |
2005-09-28 | Fixes from Loic Le Loarer <loic.le-loarer@polytechnique.org> | Stef Walter | |
2005-09-08 | Bring some Solaris changes over from ClamSMTP. | Stef Walter | |
2005-03-20 | Sync with clamsmtp changes. | Stef Walter | |
2004-10-30 | Supress errors when waiting for a process that's already gone. | Stef Walter | |
2004-09-24 | Debugged, which resulted in tons of fixes. | Stef Walter | |
2004-09-20 | Better processing of result messages | Stef Walter | |
2004-09-20 | Debug fixes | Stef Walter | |
2004-09-14 | Initial build | Stef Walter | |
2004-09-13 | Initial fork from clamsmtp | Stef Walter | |