postgrey.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435
  1. Index: postgrey
  2. --- postgrey.orig 2004-05-21 18:14:04.000000000 +0200
  3. +++ postgrey 2004-05-21 21:16:29.000000000 +0200
  4. @@ -105,7 +105,7 @@
  5. # parse options
  6. my %opt = ();
  7. GetOptions(\%opt, 'help|h', 'man', 'version', 'noaction|no-action|n',
  8. - 'verbose|v', 'daemonize|d', 'unix|u=s', 'inet|i=s', 'user=s', 'dbdir=s',
  9. + 'verbose|v', 'daemonize|d', 'unix|u=s', 'inet|i=s', 'user=s', 'dbdir=s', 'pidfile=s',
  10. 'delay=i', 'max-age=i') or exit(1);
  11. if($opt{help}) { pod2usage(1) }
  12. if($opt{man}) { pod2usage(-exitstatus => 0, -verbose => 2) }
  13. @@ -125,11 +125,12 @@
  14. server => {
  15. commandline => [ $0, @ARGV_saved ],
  16. delay => $opt{delay} || 600,
  17. - port => [ $opt{inet} ? $opt{inet} : $opt{unix} ],
  18. + port => [ $opt{inet} ? $opt{inet} : $opt{unix}."|unix" ],
  19. proto => $opt{inet} ? 'tcp' : 'unix',
  20. user => $opt{user} || 'postgrey',
  21. dbdir => $opt{dbdir} || '/var/spool/postfix/postgrey',
  22. setsid => $opt{daemonize} ? 1 : undef,
  23. + pid_file => $opt{daemonize} ? $opt{pidfile} : undef,
  24. log_level => $opt{verbose} ? 4 : 2,
  25. log_file => $opt{daemonize} ? 'Sys::Syslog' : undef,
  26. syslog_facility => 'mail',
  27. @@ -245,6 +246,7 @@
  28. -u, --unix=PATH listen on unix socket PATH
  29. -i, --inet=[HOST:]PORT listen on PORT, localhost if HOST is not specified
  30. -d, --daemonize run in the background
  31. + --pidfile=PATH put daemon pid into this file
  32. --user=USER run as USER (default: postgrey)
  33. --dbdir=PATH put db files in PATH (default: /var/spool/postfix/postgrey)
  34. --delay=N greylist for N seconds (default: 600)