Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-03-28, 19:33:25

Author Topic: /var/qmail/bin/sendmailwrapper* files does not exist  (Read 3834 times)

0 Members and 1 Guest are viewing this topic.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
I've even runned /script/cleanup and nothing. Are you sure they were uploaded ?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: /var/qmail/bin/sendmailwrapper* files does not exist
« Reply #1 on: 2015-04-18, 22:23:04 »
File is /var/qmail/bin/sendmail-wrapper and exists in all my servers.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: /var/qmail/bin/sendmailwrapper* files does not exist
« Reply #2 on: 2015-04-18, 22:40:23 »
File is /var/qmail/bin/sendmail-wrapper and exists in all my servers.

I mean /var/qmail/bin/sendmail-limiter*

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: /var/qmail/bin/sendmailwrapper* files does not exist
« Reply #3 on: 2015-04-19, 08:23:41 »
Taken from /usr/local/lxlabs/kloxo/file/qmail/bin
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: /var/qmail/bin/sendmailwrapper* files does not exist
« Reply #4 on: 2015-04-19, 16:06:11 »
Which file starts smw_limiter ?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: /var/qmail/bin/sendmailwrapper* files does not exist
« Reply #5 on: 2015-04-19, 16:09:51 »
See /usr/local/lxlabs/kloxo/file/qmail/var/qmail/bin/sendmail-wrapper for using sendmail-limiter.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: /var/qmail/bin/sendmailwrapper* files does not exist
« Reply #6 on: 2015-04-20, 14:20:14 »
It's not working at all :(

Again 2500 spam e-mails in queue. Investigating and restoring my version.

It's not proper file !

Quote
cat /var/qmail/bin/sendmail-wrapper
#!/bin/sh

## MR -- listing of the document root of website to banned
file="/var/qmail/control/badsendmailfrom"

banned="no"
pwded=$(pwd)

if [ -f $file ] ; then
        for i in $(cat $file|tr '\' ' ') ; do
                ## choose /home/admin also ban for subdirs
                if [[ "${pwded}" =~ "${i}" ]] ; then
                        banned="yes"
                fi
        done
fi

## MR -- save to log for sendmail info
/bin/logger -p mail.info "sendmail: CALLER=\"$(ps -ocommand= -p $PPID|tr '\n' ' '|tr -s ' '|sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')\" PWD=\"${pwded}\" BAN=\"${banned}\""

if [ "${banned}" == "no" ] ; then
        /var/qmail/bin/sendmail-qmail "$@"
fi

« Last Edit: 2015-04-20, 15:02:56 by Spacedust »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: /var/qmail/bin/sendmailwrapper* files does not exist
« Reply #7 on: 2015-04-20, 15:03:26 »
SO give me your version and also their sql.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: /var/qmail/bin/sendmailwrapper* files does not exist
« Reply #8 on: 2015-04-20, 15:55:27 »
Sure. I'm probably the only one who was having this up and running well. Chrisf is gone forever (his hosting company is gone too).

Sendmail is symlinked to our special send_mail version:

Quote
ls -l /usr/sbin | grep sendmail
lrwxrwxrwx  1 root root       35 Apr 20 15:34 sendmail -> /usr/sbin/sendmailwrapper/send_mail
-rwxr-xr-x  1 root root     209K Feb 20  2014 sendmail.postfix
drwxr-xr-x  2 root root     4.0K Apr 17 23:07 sendmailwrapper

sendmailwrapper is a directory with our special files:

Quote
ls -l /usr/sbin/sendmailwrapper/
total 20K
-rwxr-xr-x 1 root root    0 Apr 20 15:51 send_mail
-rwxr-xr-x 1 root root  719 Apr 17 23:07 smw_config.pl
-rwx------ 1 root root 1.5K Feb 19  2014 smw_cron_12hour
-rwx------ 1 root root 1.5K Feb 19  2014 smw_cron_24hour
-rwx------ 1 root root 1.5K Feb 19  2014 smw_cron_hourly
-rwxr-xr-x 1 root root 1.6K Feb 19  2014 smw_limiter

Qmail is having just normal sendmail binary file:

Quote
ls -l /var/qmail/bin | grep sendmail
-rwxr-xr-x 1 root   root   14K Mar 10  2014 sendmail

Then you just need to add the database attached (remove my users out there) and set it properly in this file:

Quote
cat smw_config.pl
#!/usr/bin/perl

### --CONFIGURATION

# DB information
$db_name='DBI:mysql:sendmailwrapper:localhost:3306';
$db_uid='sendmailwrapper';
$db_pwd='password';

### deliver report from cron about usage violations
# 0 = no reports sent
# 1 = reporting on, be sure to set report_email
$send_reports = 1;
$report_email = 'your@e-mail.com';

### 1 = disable all logging of sendmail
$log_disabled = 0;

### production mode
# 0  = bypass limiting
# 1+ = limiting per uid on
$limiter=1;

$logfile="/var/log/sendmail-limits.log";

### per hour group limits
# please read sendmail-chrisf.txt for description
# all users default to group one (1)

@sm_max = (100, 0,  500,  1500, 4500, 8000 );

# chrisf sendmail-wrapper v1.1b
1;

I'm using two groups:

- first 100 e-mails per hour (default)
- second 0 e-mails per hour (hacked customers)

See the database for more details (just change 1 to 2 to ban user).

Also some cron jobs to reset counters:

Quote
0 * * * * /usr/sbin/sendmailwrapper/smw_cron_hourly
0 0,12 * * * /usr/sbin/sendmailwrapper/smw_cron_12hour
0 0 * * * /usr/sbin/sendmailwrapper/smw_cron_24hour

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: /var/qmail/bin/sendmailwrapper* files does not exist
« Reply #9 on: 2015-04-20, 16:11:51 »
What's different things between your code and Kloxo-MR code related to sendmail limiter (except their file names)?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: /var/qmail/bin/sendmailwrapper* files does not exist
« Reply #10 on: 2015-04-20, 16:37:55 »
Here's my code

Quote
lrwxrwxrwx  1 root root       35 Apr 20 19:13 sendmail -> /usr/sbin/sendmailwrapper/send_mail

Quote
#!/bin/bash

CWD=$PWD

cd /usr/sbin/sendmailwrapper
if ./smw_limiter $CWD
then
../../../var/qmail/bin/sendmail $*
fi

#eof
« Last Edit: 2015-04-20, 19:14:21 by Spacedust »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: /var/qmail/bin/sendmailwrapper* files does not exist
« Reply #11 on: 2015-04-21, 15:03:26 »

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.066 seconds with 19 queries.

web stats analysis