Correction (previous diff won't work at all - this one might have a chance)

--
Wolfram

*** pipe.c.orig Thu Aug  5 11:48:03 2004
--- pipe.c      Sun Aug 22 01:45:50 2004
***************
*** 53,60 ****
  #define MAX_COMM_SIZE 512
  #define RING_SIZE 6
  
! #define AUTO_NOTIFY_SENDER "[EMAIL PROTECTED]"
! #define AUTO_NOTIFY_SUBJECT "NEW MAIL NOTIFICATION"
  
  /* Must be at least 998 or 1000 by RFC's */
  #define MAX_LINE_SIZE 1024
--- 53,60 ----
  #define MAX_COMM_SIZE 512
  #define RING_SIZE 6
  
! #define DEFAULT_AUTO_NOTIFY_SENDER "[EMAIL PROTECTED]"
! #define DEFAULT_AUTO_NOTIFY_SUBJECT "NEW MAIL NOTIFICATION"
  
  /* Must be at least 998 or 1000 by RFC's */
  #define MAX_LINE_SIZE 1024
***************
*** 266,271 ****
--- 266,274 ----
        int do_auto_notify = 0, do_auto_reply = 0;
        char *reply_body = NULL;
        char *notify_address = NULL;
+       char *auto_notify_sender = DEFAULT_AUTO_NOTIFY_SENDER;
+       char *auto_notify_subject = DEFAULT_AUTO_NOTIFY_SUBJECT;
+       
  
        /* message has been succesfully inserted, perform auto-notification & 
auto-reply */
        if (GetConfigValue("AUTO_NOTIFY", "SMTP", val) < 0)
***************
*** 281,286 ****
--- 284,303 ----
  
        if (strcasecmp(val, "yes") == 0)
                do_auto_reply = 1;
+       
+       if (GetConfigValue("AUTO_NOTIFY_SENDER", "SMTP", val) < 0) {
+               trace(TRACE_ERROR, "%s,%s error getting config, using default",
+                     __FILE__, __func__);
+       } else {
+               auto_notify_sender = val;
+       }
+       
+       if (GetConfigValue("AUTO_NOTIFY_SUBJECT", "SMTP", val) < 0) {
+               trace(TRACE_ERROR, "%s,%s error getting config, using default",
+                     __FILE__, __func__);
+       } else {
+               auto_notify_subject = val;
+       }
  
        if (do_auto_notify != 0) {
                trace(TRACE_DEBUG,
***************
*** 298,305 ****
                                      "execute_auto_ran(): sending notifcation 
to [%s]",
                                      notify_address);
                                if (send_notification(notify_address,
!                                                     AUTO_NOTIFY_SENDER,
!                                                     AUTO_NOTIFY_SUBJECT) < 0) 
{
                                        trace(TRACE_ERROR, "%s,%s: error in 
call to send_notification.",
                                              __FILE__, __func__);
                                        my_free(notify_address);
--- 315,322 ----
                                      "execute_auto_ran(): sending notifcation 
to [%s]",
                                      notify_address);
                                if (send_notification(notify_address,
!                                                     auto_notify_sender,
!                                                     auto_notify_subject) < 0) 
{
                                        trace(TRACE_ERROR, "%s,%s: error in 
call to send_notification.",
                                              __FILE__, __func__);
                                        my_free(notify_address);

Reply via email to