btw, I closed the bugzilla case by referring to your reply. Anyway, since Squid is an open-source project, the users who don't want the 10-day limit can always comment the if-condition to always get email notifications. Thanks! ~t On Sat, Jan 31, 2015 at 1:25 PM, Tianyin Xu <tixu@xxxxxxxxxxx> wrote: > Dear Amos, > > Thanks for the explanation. It's interesting that the 10-day feature is for > encouraging users to apply the daily released snapshots. I'm never aware of > this. > > Actually, I totally understand the users who are running old stable versions > (e.g., 3.1.6). They are reluctant to change or have no time to test out the > new versions as long as the current one works ok. I'm not talking about the > production uses such as in Baidu and in Flickr where a big team of admins > watching these servers on a 24*7 basis. The email feature is attractive for > users like me who uses Squid for non-production scenarios but still requires > certain level of availability. I think that's why the feature is still there > for years and I do appreciate it :-) > > Thanks again, Amos! Have a great weekend! > > Best, > Tianyin > > > On Sat, Jan 31, 2015 at 2:04 AM, Amos Jeffries <squid3@xxxxxxxxxxxxx> wrote: >> >> On 31/01/2015 6:41 p.m., Tianyin Xu wrote: >> > Hi, >> > >> > I'm trying to use the email notification feature specified in the >> > document. >> > http://www.squid-cache.org/Doc/config/mail_program/ >> > http://www.squid-cache.org/Doc/config/cache_mgr/ >> > http://www.squid-cache.org/Doc/config/mail_from/ >> > >> > Basically, if the Squid proxy server dies, I can receive an email >> > notification by configuring "mail_program", "cache_mgr", and >> > "mail_from". This is a very nice feature. >> > >> > However, when I start Squid and then intentionally kill Squid by >> > issuing SEGV, Squid dies without sending any email to me. Diving into >> > the code, I see that the email notification feature is disabled by the >> > following if condition, >> > >> > /* src/tools.cc */ >> > .... >> > if (squid_curtime - SQUID_RELEASE_TIME < 864000) { >> > /* skip if more than 10 days old */ >> > if (Config.adminEmail) >> > mail_warranty(); >> > >> > puts(dead_msg()); >> > } >> > >> > From the comment, it seems that intentionally the feature is disabled >> > if the current time is latter than 10 days after the release time >> > (which is my case). This totally makes no sense to me because most >> > users like me will use this feature after 10 days latter than the >> > release date... >> > >> > Could anyone explain this? I moved the if-condition and the feature does >> > work. >> > >> > I also opened a bugzilla report here, >> > http://bugs.squid-cache.org/show_bug.cgi?id=4184 >> >> >> It is a difficult situation. >> >> The 10 day limit is itself a feature designed to reduce spam emails >> being delivered from production systems which are stuck long-term on >> "stable" version packages. Often long after the crash being notified >> about is found and fixed. There are people still running Squid 3.1.6 for >> example, despite years having passed and numerous crashes having been >> fixed. >> >> Squid auto-restarts after crashes to ensure minimal downtime and user >> impact. There are also numerous other things that could happen that are >> only ever logged - that includes the reason for the crash being >> notified. So you should have log monitoring in place for production >> systems anyway which mails you on criteria you are interested in. Making >> this feature much less interesting for production systems using the >> formal release for long periods of time. >> >> >> It is much more interesting / useful to hear about crashes in newer code >> with less production use and testing behind it. >> >> The development code and daily snapshots define SQUID_RELEASE_TIME to be >> squid_curtime so the if-condition always matches and enables the feature >> for experimental installations. >> >> This combined with the fact that the only way to resolve crash >> conditions is to patch the code and/or build latest release snapshot, >> means that people who are actually interested in avoiding those type of >> problem are usually running the snapshot code where the 10-day limit >> does not apply. >> >> >> Amos >> _______________________________________________ >> squid-users mailing list >> squid-users@xxxxxxxxxxxxxxxxxxxxx >> http://lists.squid-cache.org/listinfo/squid-users > > -- Tianyin XU, http://cseweb.ucsd.edu/~tixu/ _______________________________________________ squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx http://lists.squid-cache.org/listinfo/squid-users