Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Jun 2004
    Posts
    80

    Default sendmail problem

    Hi!
    i was setup PHP Nobody Spammers.
    root@yourserver [~]# mv /usr/sbin/sendmail /usr/sbin/sendmail.real
    root@yourserver [~]# pico /usr/sbin/sendmail
    and enter:
    =========
    #!/usr/local/bin/perl

    # use strict;
    use Env;
    my $date = `date`;
    chomp $date;
    open (INFO, ">>/var/log/formmail.log") || die "Failed to open file ::$!";
    my $uid = $>;
    my @info = getpwuid($uid);
    if($REMOTE_ADDR) {
    print INFO "$date - $REMOTE_ADDR ran $SCRIPT_NAME at $SERVER_NAME n";
    }
    else {

    print INFO "$date - $PWD - @infon";

    }
    my $mailprog = '/usr/sbin/sendmail.real';
    foreach (@ARGV) {
    $arg="$arg" . " $_";
    }

    open (MAIL,"|$mailprog $arg") || die "cannot open $mailprog: $!n";
    while (<STDIN> ) {
    print MAIL;
    }
    close (INFO);
    close (MAIL);
    ===

    and now my root can't send mail because it is nobody?
    pico /var/log/formmail.log
    Thu Aug 4 08:10:14 ICT 2005 - /root - Thu Aug 4 08:11:01 ICT 2005 - / - Thu Aug 4 08:19:25 ICT 2005 - / - Thu Aug 4 08:27:48 ICT 2005 - /
    And Neomail can't send any mail.
    Last edited by ncconquer; 08-03-2005 at 10:09 PM.

  2. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Well, adding a wrapper like that can cause problems. That said, are you sure that the wrapper that you put in place has the exact same permissions and ownership of the original sendmail? They should be:

    chmod +x /usr/sbin/sendmail
    chmod g+s /usr/sbin/sendmail
    chown root:mailtrap /usr/sbin/sendmail

    touch /var/log/spam_log
    chmod 0777 /var/log/formail.log
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member
    Join Date
    Jun 2004
    Posts
    80

    Default

    Ready ok.
    Thanks for help.

Similar Threads & Tags
Similar threads

  1. sendmail formmail problem
    By tkporce; in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-01-2008, 11:51 PM
  2. Replies: 4
    Last Post: 02-01-2007, 03:21 PM
  3. Sendmail problem.
    By Lizard in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 08-30-2006, 09:55 AM
  4. PHP Sendmail Problem
    By celliott in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 01-07-2006, 06:16 PM
  5. Sendmail problem
    By snaaps in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-06-2004, 05:43 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube