Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Procmailrc fun and games

  • 28-02-2003 3:59pm
    #1
    Registered Users, Registered Users 2 Posts: 14,149 ✭✭✭✭


    Hey guys,

    I'm trying to send an autoresponse to any use sending a mail to userX, and also sending a copy of the original mail to userY

    Here's the .procmailrc (for userX)
    :0 h
    * !^From: .*autoresp
    * !^From: .*userx@blah
    * !^From: .*User.X@blah
    {
     :0
     ! userY
     :0 c
     | (formail -r ; echo "`/home/auto.reply.userX`") | sendmail -oi -t
    }
    

    Ok, I'm not getting an autoreply and userX isn't getting the original mail either.

    From what I've gathered, I'm making sure that userX isn't looping mail to themselves, then sending a copy to userY, then returning an autoreply message to the user.

    Any suggestions/ideas?


Comments

  • Registered Users, Registered Users 2 Posts: 521 ✭✭✭Ronin


    setup a log file within your procmailrc and see what it tells you for the mails


  • Registered Users, Registered Users 2 Posts: 14,149 ✭✭✭✭Lemming


    Got it sorted :)

    Swap the two actions and everything is fine. The problem with the original version was that the email was being re-directed to the second user before a carbon copy could be sent to the original sender (or at least, that's my understanding of it)

    So I ended up with:
    :0 h
    * !^From: .*autoresp
    * !^From: .*userx@blah
    * !^From: .*User.X@blah
    {
     :0 c
     | (formail -r ; echo "`/home/auto.reply.userX`") | sendmail -oi -t
     :0
     ! userY
    }
    


Advertisement