Aaron, your setup is not signal-safe. Use the self-pipe trick. http://cr.yp.to/docs/selfpipe.html
[EMAIL PROTECTED] wrote: > The following issue has been RESOLVED. > ====================================================================== > http://www.dbmail.org/mantis/view.php?id=269 > ====================================================================== > Reported By: robertcl > Assigned To: aaron > ====================================================================== > Project: DBMail > Issue ID: 269 > Category: IMAP daemon > Reproducibility: always > Severity: feature > Priority: normal > Status: resolved > target: 2.1.8 > Resolution: fixed > Fixed in Version: 2.1.8 > ====================================================================== > Date Submitted: 14-Sep-05 11:45 CEST > Last Modified: 04-Oct-06 20:49 CEST > ====================================================================== > Summary: Bind to multiple IP addresses > Description: > The POP3, IMAP and LMTP daemons can be bound to all IP addresses ("*") or > to one. I have the need to bind them to more than one, but not all. For > example, both to localhost and to one (or two) external IP addresses. I > can't seem to be able to do so using dbmail 2.0.7. the BIND directive can > only take one IP address, and if several BIND directives are entered, only > the last one has any effect. > ====================================================================== > > ---------------------------------------------------------------------- > paul - 01-Oct-05 11:00 > ---------------------------------------------------------------------- > This should be trivial to do. I'll look into it. > > ---------------------------------------------------------------------- > aaron - 30-Apr-06 01:42 > ---------------------------------------------------------------------- > Requires a change to the 'ip' member of serverConfig_t in dbmailtypes.h, > and then the socket binding code to handle the new data type. > > A GList of ip[IPLEN]'s could do the trick, rather uglily though. Together > with some code to split a comma separated list of IP's. A function to do > this for us would be good, because it has to be called from pop3d.c, > lmtpd.c, imapd.c, timsieved.c... > > Better yet, why don't we share that repeated config code already! > > This should be fun to do. I'll look into it ;-) > > ---------------------------------------------------------------------- > paul - 30-Apr-06 08:49 > ---------------------------------------------------------------------- > Aaron, afaik this is *not* a trivial thing to fix. > > We now do a simple blocking listen on a single socket. This would have to > be replaced by binding and listening on a number of sockets using > something like select(2) in a non-blocking loop. That would be a very > interesting approach that will open the way for all kinds of new features > (and problems). Therefore, such a redesign of the server-core should be > done after we cut a 2_2_branch and re-open trunk for 2.3+ > > ---------------------------------------------------------------------- > aaron - 30-Apr-06 09:06 > ---------------------------------------------------------------------- > Indeed, not trivial at all. > > I'm about 1-2 hours away from a complete first pass, which I'll post as a > patch rather than committing directly. If it works without too much > trouble, let's run with it. If there's more than another day's work to > make it work, then we'll hold off till 2.3 development. > > ---------------------------------------------------------------------- > aaron - 30-Apr-06 20:48 > ---------------------------------------------------------------------- > The common server config portions are now in SVN. The patch implements the > config file reading of multiple IP's, binding to multiple sockets and > running select to see which one has received a connection. > > ---------------------------------------------------------------------- > aaron - 04-Oct-06 20:49 > ---------------------------------------------------------------------- > Changes can be found at svn diff -r 2295:2296 > > Issue History > Date Modified Username Field Change > ====================================================================== > 14-Sep-05 11:45 robertcl New Issue > 01-Oct-05 11:00 paul Note Added: 0000932 > 01-Oct-05 11:01 paul Assigned To => paul > 01-Oct-05 11:01 paul Status new => acknowledged > 30-Apr-06 01:42 aaron Note Added: 0001128 > 30-Apr-06 08:49 paul Note Added: 0001130 > 30-Apr-06 09:06 aaron Note Added: 0001131 > 30-Apr-06 11:17 aaron File Added: dbmail-2.1-2006-04-30.diff > > > 30-Apr-06 20:43 aaron File Added: dbmail-2.1-2006-04-30c.diff > > > 30-Apr-06 20:44 aaron File Deleted: dbmail-2.1-2006-04-30.diff > > > 30-Apr-06 20:48 aaron Note Added: 0001147 > 04-Oct-06 09:58 aaron File Added: dbmail-2.1-select-2006-10-03.diff > > > 04-Oct-06 09:59 aaron Status acknowledged => > assigned > 04-Oct-06 09:59 aaron Assigned To paul => aaron > 04-Oct-06 20:49 aaron target => 2.1.8 > 04-Oct-06 20:49 aaron Status assigned => resolved > 04-Oct-06 20:49 aaron Fixed in Version => 2.1.8 > 04-Oct-06 20:49 aaron Resolution open => fixed > 04-Oct-06 20:49 aaron Note Added: 0001456 > ====================================================================== > > _______________________________________________ > Dbmail-dev mailing list > [email protected] > http://twister.fastxs.net/mailman/listinfo/dbmail-dev > -- ________________________________________________________________ Paul Stevens paul at nfg.nl NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlands________________________________http://www.nfg.nl
