1234567891011121314151617181920212223242526272829303132333435 |
- SUBSCRIBERESP="/opt/cropswap/subunsub.eml"
- if ($MAILGROUP ne "")
- {
- if (/^Subject:\s*\[(SUBSCRIBE|UNSUBSCRIBE)\]\s*$/)
- {
- SUBSCRIBE=toupper($MATCH1)
- CONTINUE=1
- }
- }
- if ($DISPATCH)
- {
- if ($SUBSCRIBE ne "")
- {
- gdbmopen($SLIST, "C")
- if (gdbmfetch(tolower($FROM)) eq $SUBSCRIBE)
- {
- NOREPLY=$TOPOSTMASTER
- }
- if (gdbmstore(tolower($FROM), $SUBSCRIBE))
- {
- gdbmclose
- EXITCODE=$FATAL
- cc "|$DEBUGMAIL subunsub-fail"
- exit
- }
- gdbmclose
- system "$SUBUNSUB '$SUBSCRIBE' '$ALIAS' '$FROM'"
- if ($NOREPLY)
- {
- exit
- }
- RESP=$SUBSCRIBERESP
- to "|$MAILBOT"
- }
- }
|