Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1

    Default No .redirect File -- How to Bounce?

    So now that I've been moved to version -2.0 (it is more of a downgrade at this time), the .redirect file that I had set up no longer works. Now I can deal with the offsite aliases that I had to set up manually when Westhost didn't tell me they were moving me this weekend, but I used to have a couple of addresses that I specifically bounced (everything else is catch-all). The syntax in the .redirect file was:
    Code:
    spambaitaddress user_unknown
    I would love to keep it like that so that any possibly legit mailers could get a valid bounce message. How do I do this with the lack-of-control panel? Is it a command? A specific e-mail address I send it to?

    Sending it to /dev/null would do in a pinch, but it is NOT a longterm fix. Bounce is preferred.

    Talk amongst yourselves. Let me know what you think.

    Crabbily yours,
    lobstershell

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

    Default

    I was wondering how to do this as well. I have finally figured it out - took me a while! Sure, what I am doing may be redundant/long-winded but it works... And until WestHost tells us what the short way to do it is, this should do.

    Create a new file. Name it .procmailrc - yes, just an extension, no file name. If Windows doesn't let you, it does not matter... Just give it that extension and any name for now. In this file, paste the following code:

    Code:
    SHELL=/bin/sh
    
    :0
    * ^TO_spambaitaddress@yourdomain.com
    {
       EXITCODE=67
       :0
       /dev/null
    }
    
    :0:
    ${DEFAULT}
    Save the file, and then FTP it to your / directory - upload it in ASCII format. Make sure the name is correct (just an extension...) then CHMOD it 644. Alternatively, you could do all this with SSH if you know how. If you want to do this for more than one address, just add lines in this format after the *^TO_... bit (on the same line and no leading or trailing spaces, note the | which means this is an OR condition):

    Code:
    |^TO_anotherbouncingaddress@youdomain.com
    Send yourself a test e-mail to the address(es) you defined and watch it magically bounce

    Let me know if that helps or not.
    Fayez Zaheer

  3. #3

    Default

    It seems to bounce everything (including good addresses) with that. Is it supposed to be
    Code:
    |^TO_
    or
    Code:
    | ^TO_
    I have the former. I know spaces sometimes don't matter where pipes are involved, but procmail might be different.

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

    Default

    You've misunderstood my post. Don't worry about the second bit of code. Just look at (and use) that first chunk. The second part was just explaining how you would do an OR condition to bounce more than one address:

    Code:
    * ^TO_spambaitaddress@yourdomain.com|^TO_anotheraddress@yourdomain.com|^TO_thirdaddress@yourdomain.com
    For now, see if you can get the first chunk up and "running". Only then worry about adding more addresses.

    Let me know how it goes.
    Fayez Zaheer

  5. #5

    Default

    I don't think that's the issue. Do I have to define the
    Code:
    ${DEFAULT}
    variable? I think that might be it, but I dunno how.

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

    Default

    Assuming your domain is lobstershell.com, this is all that would go in /.procmailrc

    Code:
    SHELL=/bin/sh
    
    :0
    * ^TO_spambaitaddress@lobstershell.com
    {
       EXITCODE=67
       :0
       /dev/null
    }
    
    :0:
    ${DEFAULT}
    i.e. you do not need to define anything explicitly. Make sure to copy and paste exactly as above - don't add any extra whitespace or linebreaks. Also, don't forget to CHMOD this file 644 (and put it in /). If it still does not work, then we can enable logging and see if we can't grab some debugging info from that.
    Fayez Zaheer

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

    Default

    Any luck?
    Fayez Zaheer

  8. #8
    Junior Member
    Join Date
    Sep 2003
    Posts
    18

    Default

    Fayez, I'm hoping Lobstershell had as much luck with your script as I've had. Thanks a million - you've really helped me out.

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

    Default

    Avila,

    I'm very pleased to hear that this has helped at least one person It was my pleasure.
    Fayez Zaheer

  10. #10

    Default It Works!!!

    I finally figured out my issue. Once I properly "whitespaced" and backslashed" the piped OR statements, it worked like a charm. You rock Fayez!

Similar Threads

  1. HowTo Tutorial: Using and Installing SSH
    By sunzon in forum E-mail / FTP Management
    Replies: 6
    Last Post: 05-10-2008, 07:07 AM
  2. Miva 4 to Miva 5 upgrade problems Did this happen to you?
    By brady9111 in forum Miva Merchant
    Replies: 3
    Last Post: 05-25-2007, 10:11 AM
  3. Replies: 3
    Last Post: 03-15-2007, 08:32 PM
  4. Replies: 10
    Last Post: 07-06-2005, 10:53 AM
  5. Tip - Opening a VDSBACKUP file
    By j103c in forum Account Maintenance
    Replies: 3
    Last Post: 01-07-2005, 08:29 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
  •