Contents

  1. whois
  2. history
https://evren-yurtesen.blogspot.com/2018/04/qmail-spp-plugin-for-getting-more.html

1. whois

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
 
int main(int argc, char **argv) {
  char *user = getenv("SMTPAUTHUSER");
  char *ip = getenv("TCPREMOTEIP");
  char *mailfrom = getenv("SMTPMAILFROM");
  char *rcptto = getenv("SMTPRCPTTO");
  char *tempcount = getenv("SMTPRCPTCOUNTALL");
  int rcptcount = atoi(tempcount);
  int ppid = getppid();
 
  if (user != NULL && strlen(user) > 0 && rcptcount < 2) {
    fprintf(stderr, "auth: pid: %d ip: %s user: %s\n", ppid, ip, user);
  }
  fprintf(stderr, "info: pid: %d ip: %s from: %s to: %s count: %d\n", ppid, ip, mailfrom, rcptto, rcptcount);
 
  return 0;

2. history


CategoryDns CategoryWatch CategoryTemplate

MoinQ: qmail/spp/moreinfo-2 (last edited 2023-05-28 07:11:39 by ToshinoriMaeno)