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

Autoreply question - procmailrc, formail, & sendmail

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


    Hey guys,

    I'm trying to set up an autoreply to not only reply to the recipient, but BCC someone else as well.

    Currently, it simply sends back a reply (as obviously autoreplies are meant to do)

    the .procmailrc file for user 'n' is as follows:
    :0 h
    * !^From: .*autoresp
    * !^From: .*userN@blah.blah
    {
     :0 c
     | (formail -r ; echo "`/dirName/auto.reply.userN`") | sendmail -oi -t
    }
    

    I'm pretty sure that I need to amend something to the 'formail' segment of the above script or add another line after it with formail inctercepting the "Reply-To" and altering it to the other recipient's mail address, or something. I'm not really sure.

    Anyone got any (better?) ideas/suggestions on this?

    For reference, the auto.reply.userN file is just a plain text file of the format:
    cat << EOF
    
    Blah Blah message here
    
    Insert Signature Here
    
    *************
    This email, its contents and any files attached are intended only for the
    named addressee/addressees etc etc
    
    EOF
    


    [edit]
    Never mind. If you use the -A flag in formail you can add customised header fields to the mail.

    Eg. formail -r -A"Bcc: userX@blah"

    So the script now looks like:
    :0 h
    * !^From: .*autoresp
    * !^From: .*userN@blah.blah
    {
     :0 c
     | (formail -r -A"Bcc: userX@blah"; echo "`/dirName/auto.reply.userN`") | sendmail -oi -t
    }
    
    [/edit]


Advertisement