Hi,
This patch allows open_smtp for pop3, and also checks if NO_RELAY is set
for both pop3 and imap. This is useful if you rely on open_smtp to
allow users to relay and if you use courier for both pop3 instead of
qmail-pop3d, and imap. I have tested this here and it is in production,
working as expected. I don't know if I've used diff properly with the
file names, but if it does Strange Things or if you know what I should
have done, please tell me :-)
Cheers!
--- preauthvchkpw.c Mon Sep 17 00:49:10 2001
+++ preauthvchkpw.c.new Sun Nov 4 22:29:45 2001
@@ -92,8 +92,23 @@
return(-1);
} else {
#ifdef HAVE_OPEN_SMTP_RELAY
- /* open the relay to imap users */
- open_smtp_relay();
+ /* open the relay to imap users only if NO_RELAY is not
set */
+ if ( ! ( pw->pw_gid & NO_RELAY ) ) {
+ open_smtp_relay();
+ }
+#endif
+ }
+ }
+
+ if ( strcmp("pop3", service) == 0 ) {
+ if ( pw->pw_gid & NO_POP ) {
+ return(-1);
+ } else {
+#ifdef HAVE_OPEN_SMTP_RELAY
+ /* open the relay to pop3 users only if NO_RELAY is not
set */
+ if ( ! ( pw->pw_gid & NO_RELAY ) ) {
+ open_smtp_relay();
+ }
#endif
}
}
--
Joel Michael
Systems Administrator
Worldhosting.org Pty. Ltd.
Ph: +61 7 3367 3555
Fax: +61 7 3367 3544
Mobile: +61 408 336 728