Author Topic: How to get cc'd from email-to-list signup emails?  (Read 2555 times)

asr_guy

  • Posts: 8
    • View Profile
How to get cc'd from email-to-list signup emails?
« on: June 19, 2007, 09:22:35 am »
Hi,
I got the "send an email to signup" process working on Dreamhost (worked first time!), but realize that I'm not getting cc'd on the initial emails people are sending in.

This is handy to have if I ever need to prove to someone that they did subscribe, and for tracking my marketing efforts.

Is there a way to get cc'd by the signup cgi process, i.e. a copy of the original incoming email sent to my own email account?

Thanks,
Peter

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
How to get cc'd from email-to-list signup emails?
« Reply #1 on: June 19, 2007, 07:10:05 pm »
Hi Peter,

I'm not a .procmailrc expert but you should be able to forward email to the script as well as an additional email address.

This page suggests multiple addresses are done like this:
Quote
! 43353@aol.com, tjaney@there.net, another@address.com

However, I'm not sure how it would work forwarding to both a user AND a program, maybe this:
Quote
| /path/to/script.cgi, ! user@example.com

..but I can't guarantee it.  Maybe DreamHost support can help?

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

asr_guy

  • Posts: 8
    • View Profile
Solved
« Reply #2 on: June 19, 2007, 09:46:11 pm »
Hi Dean,
I got it working after poking around some unix tutorials. Procmail exits once it finds a match, so you need to use conditional syntax or use the "c" flag in procmail which basically clones the process.

Here's my .procmail if others need to do this. Basically what it does is sends the email that was coming in to signupemail@mydomain.com on to the listmail signup script which I set up under a shell account "shelluser" (to add them to the mailing list etc.) AND sends a copy of the original email to my own email address (myownemail@myotherdomain.com). The { and } create a block. Note the ! means fwd and the | means pipe to the script.

DEFAULT=$HOME/Maildir
MAILDIR=$HOME/Maildir
PMDIR=$HOME/.procmail
SHELL=/bin/sh

:0
* ^TO_signupemail@mydomain\.com
{
:0 c
| /home/shelluser/signup-list1.cgi

:0
! myownemail@myotherdomain.com
}

Cheers,
Peter