Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Jun 2004
    Posts
    6

    Default Notify another email address but do not forward.

    I have a client whose email I support on my WestHost server. They have another email address which they check much more regularly and they would like to receive a notification from my WestHost server telling them that a message has been delivered to their domain.

    They do not want the message to be forwarded because they want to maintain separate email databases in their outlook client. They just want to be notified.

    Example:
    email sent to info@zcco.org should send a notification to notify@digisatsolutions.com

    From my searches on this forum and the web, it appears that I need to do this with procmail, but I am not familiar with procmail and unsure where to go from here.

    Any advice would be appreciated.

    Thanks!

    Zachary

  2. #2
    Senior Member FZ's Avatar
    Join Date
    May 2003
    Location
    Johannesburg, South Africa
    Posts
    1,024

    Default

    Here's one way of doing it (probably not the most efficient, but it works):

    1. Make sure the e-mail/FTP account in question has a home directory assigned to it (check via your Site Manager). If it doesn't, give it one (can be any directory you want, or just accept the default).

    2. Create a file called .procmailrc and place the following code in it:

    Code:
    :0c
    | notify.sh
    3. Create a file called notify.sh and place this code in it:

    Code:
    /bin/sendmail -t -f notifier@zcco.org << EOF
    To: notify@digisatsolutions.com
    From: "New e-mail notifier" <notifier@zcco.org>
    Subject: New mail notification
    
    You have new mail at info@zcco.org.
    .
    EOF
    Edit as necessary, the e-mail addresses that appear in the code block above (and the subject and body, if necessary). Do not edit anything else (leave the . and EOF in, on their own lines).

    NOTE: Make sure not to change the notifier@ e-mail addresses to info@ otherwise if the mail bounces, it could create an endless mail loop (not good). I recommend you either create a new e-mail account (notifier) just for this purpose, or you can change it to zcco@ or whatever other e-mail address you want (except info@).

    4. Assuming the home directory for the account is /ftp/pub/info upload both of the above files into that directory, in ASCII mode. Then, CHMOD 644 .procmailrc and CHMOD 755 notify.sh

    5. That's it - should be working now. Send yourself some test mail and watch for the notification. Keep in mind that this is a really primitive way of doing this: it will generate a notification for every single e-mail that arrives and has no built in error-checking or bounce-checking, etc.
    Fayez Zaheer

  3. #3
    Junior Member
    Join Date
    Jun 2004
    Posts
    6

    Default Thanks!

    FZ, I can not thank you enough. I could not have asked for a better answer! This will work perfectly and it is a start for my tweaking if I want more complexity later.

    Out of curiousity and because I am using SpamAssassin, will this notify script run before or after SpamAssassin has evaluated the message for SPAM content?


    Thanks again!

    Zachary

  4. #4
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,720

    Default

    I'm not Fayez but I think it well run after SpamAssasin because if I understand right you can catch things that have beem marked by SA with Procmail i.e. if it has a certain SA score you can send it to a certain folder or even delete it.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  5. #5
    Senior Member FZ's Avatar
    Join Date
    May 2003
    Location
    Johannesburg, South Africa
    Posts
    1,024

    Default

    No problem, Zachary.

    Shawn is right: it will run after the e-mail has been processed by SpamAssassin... That is the first thing that is done to all incoming mail (assuming you have SpamAssassin installed) by way of the "global" Procmail recipe (rules) which is run before any "local" (user-specific) Procmail recipe(s) (i.e. .procmailrc files in home directories, as is the case here).
    Fayez Zaheer

  6. #6
    Senior Member SJP's Avatar
    Join Date
    Aug 2003
    Location
    Orcas, Wa
    Posts
    205

    Default

    Excellent!

    SJP

  7. #7
    Junior Member
    Join Date
    Jun 2004
    Posts
    6

    Default

    Terrific! This solution is absolutely perfect for my needs.

    Thank you all.

  8. #8
    Senior Member FZ's Avatar
    Join Date
    May 2003
    Location
    Johannesburg, South Africa
    Posts
    1,024

    Default

    Glad to have helped.
    Fayez Zaheer

Similar Threads

  1. SpamAssassin -> Procmail -> Uebimaiu spammail folder
    By PeteF in forum E-mail / FTP Management
    Replies: 17
    Last Post: 05-25-2010, 01:54 PM
  2. How to unsubscribe email address from Westhost Updates?
    By springfrog in forum Comments / Suggestions
    Replies: 1
    Last Post: 06-01-2004, 02:56 PM
  3. send spam to alternate email address
    By dansroka in forum E-mail / FTP Management
    Replies: 5
    Last Post: 03-13-2004, 01:28 PM
  4. unable to send email to extrenal email address
    By <-- R O B --> in forum E-mail / FTP Management
    Replies: 1
    Last Post: 01-15-2004, 04:16 AM
  5. How do I forward (alias) to more than one email address?
    By andrewoakley in forum E-mail / FTP Management
    Replies: 1
    Last Post: 09-06-2003, 06:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •