RE: send email automatically to new user

From: Ryan Golhar (golharam_at_umdnj.edu)
Date: 06/18/04

  • Next message: Noah: "restarting named - rndc: connect failed: operation canceled"
    Date: Fri, 18 Jun 2004 12:51:17 -0400
    To: "'General Red Hat Linux discussion list'" <redhat-list@redhat.com>
    
    

    Sure. Here's what I did:

    1. Store the user's account name in $username
    2. Store the email in $email
    3:

    # send email using rmail
    # By calling open on the magic character sequence |-, you fork a copy
    # of Perl and open a pipe to the copy. The child copy then immediately
    # exec's another program using the argument list variant of exec().
    open(RMAIL,"|-") || exec "/usr/bin/rmail", "$username\@umdnj.edu";
    print RMAIL $email,"\n";
    close RMAIL;

    -----
    Ryan Golhar
    Computational Biologist
    The Informatics Institute at
    The University of Medicine & Dentistry of NJ

    Phone: 973-972-5034
    Fax: 973-972-7412
    Email: golharam@umdnj.edu

    -----Original Message-----
    From: redhat-list-bounces@redhat.com
    [mailto:redhat-list-bounces@redhat.com] On Behalf Of Robert Canary
    Sent: Friday, June 18, 2004 12:42 PM
    To: General Red Hat Linux discussion list
    Subject: Re: send email automatically to new user

    Our "useradd" is actually a perl script that dose
    everything we want it to do *and* runs the
    originally useradd....well it use to. Actually it
    is all been replaced with the perl script.

    Nabin Limbu wrote:
    > Hi,
    >
    > Is there any way to send a standard email to a new user automatically
    > while creating a
    > user via useradd command.
    >
    > Regards
    > Nabin Limbu
    >
    >

    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Noah: "restarting named - rndc: connect failed: operation canceled"

    Relevant Pages

    • Re: emacs rmail: how to save sent messages
      ... Karl Vogel suggested to send all the mails to the "sent" account, but it is crutch, may be we find mo correct way;) ... > trying to adjust emacs rmail. ... I don't know its equivalent in rmail, but in gnus I just use a hook to ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Rmail
      ... me ways to overcome these problems. ... Evolution. ... Rmail and SendMail dont seem to have precisely my address. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)