Author Topic: Passing List ID to signup-listX.cgi from procmail  (Read 5080 times)

danhw

  • Posts: 1
    • View Profile
Passing List ID to signup-listX.cgi from procmail
« on: May 26, 2004, 09:29:45 pm »
I am trying to setup a fairly easy way to process article requests. I can easily create a list with an auto responder of the article, but I don't relish the prospect of having lots of signup-list.cgi programs. Plus I have to do those; the article author can create the lists and set up the autoresponder.

What I want to do is be able to process something like email to "articles", with subject of "article1", and add them to one or more lists.

I am using procmailrc to process the email; I can identify the subject and use that to determine which list(s) the person should be added to. However, can I somehow pass that on to the same signup-list.cgi? I want to somehow set the $list OUTSIDE the signup-list.cgi program; or else modify the cgi script to look at an variable I set outside; something like this:

procmail.rc

* ^TO_articles@giftsprings.com
(identify the subject here as subject "1" exact syntax TDB)
| perl /var/www/cgi-bin/signup-list1.cgi 1,6   (put in list #1 and #6)

* ^TO_articles@giftsprings.com
(identify the subject here as subject "2" exact syntax TDB)
| perl /var/www/cgi-bin/signup-list1.cgi 1,7  (put in list #1 and #7)

I expect some change in signup-list.cgi...

$list = $1 or something, but it doesn't seem to work


Thanks for your help
Dan

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Passing List ID to signup-listX.cgi from procmail
« Reply #1 on: June 07, 2004, 01:17:51 pm »
Dan,

I don't see this being too difficult.

Try making the following change in the signup-listX.cgi script to set the list from the commandline:

$list = $ARGV[0];
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting