Download | Plain Text | No Line Numbers


  1. /*
  2.  *
  3.  * Tomislav Randjic 20060929
  4.  *
  5.  */
  6. #include <stdio.h>
  7. #include <stdlib.h>
  8. #include <unistd.h>
  9. #include <string.h>
  10.  
  11. int main()
  12. {
  13. char *user = getenv("SMTPAUTHUSER");
  14. pid_t ppid = getppid();
  15.  
  16. if (user == NULL || strlen(user) == 0)
  17. {
  18. puts("E550 SMTP AUTH required");
  19. fprintf(stderr, "authrequired: pid %d - message rejected, SMTP AUTH required.\n", ppid);
  20. }
  21. return 0;
  22. }
  23.