Added leaf ports
This commit is contained in:
6
mail/exim-ldap2/Makefile
Normal file
6
mail/exim-ldap2/Makefile
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
PKGNAMESUFFIX= -ldap2
|
||||||
|
MASTERDIR= ${.CURDIR}/../exim
|
||||||
|
|
||||||
|
OPTIONS_SLAVE= OPENLDAP
|
||||||
|
|
||||||
|
.include "${MASTERDIR}/Makefile"
|
||||||
15
mail/exim-monitor/Makefile
Normal file
15
mail/exim-monitor/Makefile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
PKGNAMESUFFIX= -monitor
|
||||||
|
|
||||||
|
COMMENT= The Exim monitor for the Exim MTA
|
||||||
|
|
||||||
|
MASTERDIR= ${.CURDIR}/../exim
|
||||||
|
|
||||||
|
EXIMON_ONLY= yes
|
||||||
|
OPTIONS_SLAVE= EXIMON
|
||||||
|
|
||||||
|
# This dependency is disabled, because it prevents package users from
|
||||||
|
# using the exim-monitor package with any of the exim slave packages.
|
||||||
|
#
|
||||||
|
#RUN_DEPENDS= ${LOCALBASE}/sbin/exim:mail/exim
|
||||||
|
|
||||||
|
.include "${MASTERDIR}/Makefile"
|
||||||
12
mail/exim-monitor/files/patch-OS__Makefile-Base
Normal file
12
mail/exim-monitor/files/patch-OS__Makefile-Base
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
--- OS/Makefile-Base.orig Wed Aug 15 13:09:05 2001
|
||||||
|
+++ OS/Makefile-Base Mon Aug 27 14:59:04 2001
|
||||||
|
@@ -19,7 +19,8 @@
|
||||||
|
# up-to-date. Then the os-specific source files and the C configuration file
|
||||||
|
# are set up, and finally it goes to the main Exim target.
|
||||||
|
|
||||||
|
-all: $(EDITME) checklocalmake Makefile os.h os.c config.h allexim
|
||||||
|
+all: $(EDITME) checklocalmake Makefile os.h os.c config.h buildpcre \
|
||||||
|
+ eximon.bin
|
||||||
|
|
||||||
|
checklocalmake:
|
||||||
|
@if $(SHELL) $(SCRIPTS)/newer $(EDITME)-$(OSTYPE) $(EDITME) || \
|
||||||
10
mail/exim-monitor/files/patch-OS__Makefile-FreeBSD
Normal file
10
mail/exim-monitor/files/patch-OS__Makefile-FreeBSD
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- OS/Makefile-FreeBSD.orig Mon Jun 11 12:04:05 2001
|
||||||
|
+++ OS/Makefile-FreeBSD Mon Jun 11 12:04:33 2001
|
||||||
|
@@ -5,6 +5,7 @@
|
||||||
|
PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout
|
||||||
|
|
||||||
|
CHOWN_COMMAND=/usr/sbin/chown
|
||||||
|
+STRIP_COMMAND=/usr/bin/strip
|
||||||
|
|
||||||
|
HAVE_SA_LEN=YES
|
||||||
|
|
||||||
55
mail/exim-monitor/files/patch-src__EDITME
Normal file
55
mail/exim-monitor/files/patch-src__EDITME
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
--- src/EDITME.orig Mon Aug 27 14:35:47 2001
|
||||||
|
+++ src/EDITME Mon Aug 27 14:37:31 2001
|
||||||
|
@@ -98,7 +98,7 @@
|
||||||
|
# /usr/local/sbin. The installation script will try to create this directory,
|
||||||
|
# and any superior directories, if they do not exist.
|
||||||
|
|
||||||
|
-BIN_DIRECTORY=/usr/exim/bin
|
||||||
|
+BIN_DIRECTORY=XX_PREFIX_XX/sbin
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
@@ -113,7 +113,7 @@
|
||||||
|
# directories if they don't exist. It will also install a default run time
|
||||||
|
# configuration if this file does not exist.
|
||||||
|
|
||||||
|
-CONFIGURE_FILE=/usr/exim/configure
|
||||||
|
+CONFIGURE_FILE=XX_PREFIX_XX/etc/exim/configure
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
@@ -126,14 +126,14 @@
|
||||||
|
# owner of a local mailbox.) Specifying these values as root is very strongly
|
||||||
|
# discouraged. These values are compiled into the binary.
|
||||||
|
|
||||||
|
-EXIM_USER=
|
||||||
|
+EXIM_USER=mailnull
|
||||||
|
|
||||||
|
# If the setting of EXIM_USER is numeric (e.g. EXIM_USER=42), there must
|
||||||
|
# also be a setting of EXIM_GROUP. If, on the other hand, you use a name
|
||||||
|
# for EXIM_USER (e.g. EXIM_USER=exim), you don't need to set EXIM_GROUP unless
|
||||||
|
# you want to use a group other than the default group for the given user.
|
||||||
|
|
||||||
|
-# EXIM_GROUP=
|
||||||
|
+EXIM_GROUP=mail
|
||||||
|
|
||||||
|
# Many sites define a user called "exim", with an appropriate default group,
|
||||||
|
# and use
|
||||||
|
@@ -371,7 +373,7 @@
|
||||||
|
# %s. This will be replaced by one of the strings "main", "panic", or "reject"
|
||||||
|
# to form the final file names. Some installations may want something like this:
|
||||||
|
|
||||||
|
-# LOG_FILE_PATH=/var/log/exim_%slog
|
||||||
|
+LOG_FILE_PATH=/var/log/exim/%slog
|
||||||
|
|
||||||
|
# which results in files with names /var/log/exim_mainlog, etc. The directory
|
||||||
|
# in which the log files are placed must exist; Exim does not try to create
|
||||||
|
@@ -695,7 +705,7 @@
|
||||||
|
# (process id) to a file so that it can easily be identified. The path of the
|
||||||
|
# file can be specified here. Some installations may want something like this:
|
||||||
|
|
||||||
|
-# PID_FILE_PATH=/var/lock/exim.pid
|
||||||
|
+PID_FILE_PATH=/var/run/exim.pid
|
||||||
|
|
||||||
|
# If PID_FILE_PATH is not defined, Exim writes a file in its spool directory
|
||||||
|
# using the name "exim-daemon.pid".
|
||||||
7
mail/exim-monitor/pkg-descr
Normal file
7
mail/exim-monitor/pkg-descr
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
The Exim monitor (eximon) is a graphical user interface for the Exim
|
||||||
|
mail transfer agent for Unix systems. Eximon is distributed as part
|
||||||
|
of the standard Exim distribution, but its dependency on XFree86
|
||||||
|
annoys many administrators.
|
||||||
|
|
||||||
|
For this reason, it is available as its own package to allow
|
||||||
|
administrators to easily install Exim without installing XFree86.
|
||||||
14
mail/exim-monitor/pkg-message
Normal file
14
mail/exim-monitor/pkg-message
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[
|
||||||
|
{ type: install
|
||||||
|
message: <<EOM
|
||||||
|
Although the Exim monitor has been correctly installed, please note
|
||||||
|
that it is useless without the Exim MTA. Install one of the Exim
|
||||||
|
packages available, which include documentation for the Exim monitor:
|
||||||
|
|
||||||
|
exim
|
||||||
|
exim-ldap2
|
||||||
|
exim-mysql
|
||||||
|
exim-postgresql
|
||||||
|
EOM
|
||||||
|
}
|
||||||
|
]
|
||||||
6
mail/exim-mysql/Makefile
Normal file
6
mail/exim-mysql/Makefile
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
PKGNAMESUFFIX= -mysql
|
||||||
|
MASTERDIR= ${.CURDIR}/../exim
|
||||||
|
|
||||||
|
OPTIONS_SLAVE= MYSQL
|
||||||
|
|
||||||
|
.include "${MASTERDIR}/Makefile"
|
||||||
7
mail/exim-postgresql/Makefile
Normal file
7
mail/exim-postgresql/Makefile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
PORTREVISION= 1
|
||||||
|
PKGNAMESUFFIX= -postgresql
|
||||||
|
MASTERDIR= ${.CURDIR}/../exim
|
||||||
|
|
||||||
|
OPTIONS_SLAVE= PGSQL
|
||||||
|
|
||||||
|
.include "${MASTERDIR}/Makefile"
|
||||||
7
mail/exim-sqlite/Makefile
Normal file
7
mail/exim-sqlite/Makefile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
PORTREVISION= 1
|
||||||
|
PKGNAMESUFFIX= -sqlite
|
||||||
|
MASTERDIR= ${.CURDIR}/../exim
|
||||||
|
|
||||||
|
OPTIONS_SLAVE= SQLITE
|
||||||
|
|
||||||
|
.include "${MASTERDIR}/Makefile"
|
||||||
200
mail/exim/files.nok/extra-patch-Local-sa-exim.c
Normal file
200
mail/exim/files.nok/extra-patch-Local-sa-exim.c
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
--- Local/sa-exim.c.orig 2020-02-19 03:04:43 UTC
|
||||||
|
+++ Local/sa-exim.c
|
||||||
|
@@ -29,10 +29,7 @@ http://lists.merlins.org/lists/listinfo/sa-exim
|
||||||
|
#include "sa-exim.h"
|
||||||
|
|
||||||
|
/* Exim includes */
|
||||||
|
-#include "local_scan.h"
|
||||||
|
-extern FILE *smtp_out; /* Exim's incoming SMTP output file */
|
||||||
|
-extern int body_linecount; /* Line count in body */
|
||||||
|
-extern uschar *primary_hostname;
|
||||||
|
+#include <local_scan.h>
|
||||||
|
|
||||||
|
#ifdef DLOPEN_LOCAL_SCAN
|
||||||
|
|
||||||
|
@@ -409,6 +406,11 @@ int parsemlheader(char *buffer, FILE *readfh, char *he
|
||||||
|
if (buffer[strlen(buffer)-1] == '\n')
|
||||||
|
{
|
||||||
|
buffer[strlen(buffer)-1]=0;
|
||||||
|
+ /* and any carriage return */
|
||||||
|
+ if (buffer[strlen(buffer)-1] == '\r')
|
||||||
|
+ {
|
||||||
|
+ buffer[strlen(buffer)-1]=0;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
if (SAEximDebug > 5)
|
||||||
|
{
|
||||||
|
@@ -515,6 +517,7 @@ int local_scan(volatile int fd, uschar **return_text)
|
||||||
|
int pid;
|
||||||
|
int writefd[2];
|
||||||
|
int readfd[2];
|
||||||
|
+ char *spamc_argv[10];
|
||||||
|
int i;
|
||||||
|
/* These are the only values that we want working after the longjmp
|
||||||
|
* The automatic ones can be clobbered, but we don't really care */
|
||||||
|
@@ -550,8 +553,9 @@ int local_scan(volatile int fd, uschar **return_text)
|
||||||
|
static char *SAspamcpath=SPAMC_LOCATION;
|
||||||
|
static char *SAsafemesgidchars=SAFEMESGIDCHARS
|
||||||
|
static char *SAspamcSockPath=NULL;
|
||||||
|
- static char *SAspamcPort="783";
|
||||||
|
- static char *SAspamcHost="127.0.0.1";
|
||||||
|
+ static char *SAspamcPort=NULL;
|
||||||
|
+ static char *SAspamcHost=NULL;
|
||||||
|
+ static char *SAspamcUser=NULL;
|
||||||
|
static char *SAEximRunCond="0";
|
||||||
|
static char *SAEximRejCond="1";
|
||||||
|
static int SAmaxbody=250*1024;
|
||||||
|
@@ -602,6 +606,10 @@ int local_scan(volatile int fd, uschar **return_text)
|
||||||
|
/* Do not put a %s in there, or you'll segfault */
|
||||||
|
static char *SAmsgerror="Temporary local error while processing message, please contact postmaster";
|
||||||
|
|
||||||
|
+ /* This needs to be retrieved through expand_string in order
|
||||||
|
+ not to violate the API. */
|
||||||
|
+ uschar *primary_hostname=expand_string("$primary_hostname");
|
||||||
|
+
|
||||||
|
/* New values we read from spamassassin */
|
||||||
|
char *xspamstatus=NULL;
|
||||||
|
char *xspamflag=NULL;
|
||||||
|
@@ -712,6 +720,7 @@ int local_scan(volatile int fd, uschar **return_text)
|
||||||
|
M_CHECKFORSTR(SAspamcSockPath);
|
||||||
|
M_CHECKFORSTR(SAspamcPort);
|
||||||
|
M_CHECKFORSTR(SAspamcHost);
|
||||||
|
+ M_CHECKFORSTR(SAspamcUser);
|
||||||
|
M_CHECKFORSTR(SAEximRunCond);
|
||||||
|
M_CHECKFORSTR(SAEximRejCond);
|
||||||
|
M_CHECKFORVAR(SAmaxbody, "%d");
|
||||||
|
@@ -914,6 +923,22 @@ int local_scan(volatile int fd, uschar **return_text)
|
||||||
|
ret=dup2(readfd[1],2);
|
||||||
|
CHECKERR(ret,"dup2 stderr",__LINE__);
|
||||||
|
|
||||||
|
+ i = 0;
|
||||||
|
+ spamc_argv[i++] = "spamc";
|
||||||
|
+ if (SAspamcUser && SAspamcUser[0])
|
||||||
|
+ {
|
||||||
|
+ expand=expand_string(SAspamcUser);
|
||||||
|
+ if (expand == NULL)
|
||||||
|
+ {
|
||||||
|
+ log_write(0, LOG_MAIN | LOG_PANIC, "SA: SAspamcUser expansion failure on %s, will run as Exim user instead.", SAspamcUser);
|
||||||
|
+ }
|
||||||
|
+ else if (expand[0] != '\0')
|
||||||
|
+ {
|
||||||
|
+ spamc_argv[i++] = "-u";
|
||||||
|
+ spamc_argv[i++] = expand;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* I could implement the spamc protocol and talk to spamd directly
|
||||||
|
* instead of forking spamc, but considering the overhead spent
|
||||||
|
@@ -924,17 +949,30 @@ int local_scan(volatile int fd, uschar **return_text)
|
||||||
|
/* Ok, we cheat, spamc cares about how big the whole message is and
|
||||||
|
* we only know about the body size, so I'll give an extra 16K
|
||||||
|
* to account for any headers that can accompany the message */
|
||||||
|
+
|
||||||
|
+ spamc_argv[i++] = "-s";
|
||||||
|
+ spamc_argv[i++] = string_sprintf("%d", SAmaxbody+16384);
|
||||||
|
+
|
||||||
|
if(SAspamcSockPath)
|
||||||
|
{
|
||||||
|
- ret=execl(SAspamcpath, "spamc", "-s", string_sprintf("%d", SAmaxbody+16384), "-U", SAspamcSockPath, NULL);
|
||||||
|
- CHECKERR(ret,string_sprintf("exec %s", SAspamcpath),__LINE__);
|
||||||
|
+ spamc_argv[i++] = "-U";
|
||||||
|
+ spamc_argv[i++] = SAspamcSockPath;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
- ret=execl(SAspamcpath, "spamc", "-s", string_sprintf("%d", SAmaxbody+16384), "-d", SAspamcHost, "-p", SAspamcPort, NULL);
|
||||||
|
- CHECKERR(ret,string_sprintf("exec %s", SAspamcpath),__LINE__);
|
||||||
|
+ if (SAspamcHost) {
|
||||||
|
+ spamc_argv[i++] = "-d";
|
||||||
|
+ spamc_argv[i++] = SAspamcHost;
|
||||||
|
+ }
|
||||||
|
+ if (SAspamcPort) {
|
||||||
|
+ spamc_argv[i++] = "-p";
|
||||||
|
+ spamc_argv[i++] = SAspamcPort;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+ spamc_argv[i++] = NULL;
|
||||||
|
+
|
||||||
|
+ ret=execv(SAspamcpath, spamc_argv);
|
||||||
|
+ CHECKERR(ret,string_sprintf("exec %s", SAspamcpath),__LINE__);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SAEximDebug > 8)
|
||||||
|
@@ -1045,6 +1083,11 @@ int local_scan(volatile int fd, uschar **return_text)
|
||||||
|
if (buffer[strlen(buffer)-1] == '\n')
|
||||||
|
{
|
||||||
|
buffer[strlen(buffer)-1]=0;
|
||||||
|
+ /* and any carriage return */
|
||||||
|
+ if (buffer[strlen(buffer)-1] == '\r')
|
||||||
|
+ {
|
||||||
|
+ buffer[strlen(buffer)-1]=0;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
restart:
|
||||||
|
if (SAEximDebug > 5)
|
||||||
|
@@ -1218,7 +1261,7 @@ restart:
|
||||||
|
}
|
||||||
|
|
||||||
|
stret=write(fd, buffer, strlen(buffer));
|
||||||
|
- CHECKERR(stret,string_sprintf("SA body write to msg"),__LINE__);
|
||||||
|
+ CHECKERR(stret,string_sprintf("%s", "SA body write to msg"),__LINE__);
|
||||||
|
if (SAEximDebug > 8)
|
||||||
|
{
|
||||||
|
log_write(0, LOG_MAIN, "SA: Debug9: Wrote to msg; line %d (wrote %d)", line, ret);
|
||||||
|
@@ -1229,18 +1272,20 @@ restart:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
if (SAEximDebug > 1)
|
||||||
|
{
|
||||||
|
log_write(0, LOG_MAIN, "SA: Debug2: body_linecount before SA: %d", body_linecount);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* update global variable $body_linecount to reflect the new body size*/
|
||||||
|
- body_linecount = (line - 1);
|
||||||
|
+ if (body_linecount > 0) body_linecount = (line - 1); // Not updating if zero, indicating spool_wireformat
|
||||||
|
|
||||||
|
if (SAEximDebug > 1)
|
||||||
|
{
|
||||||
|
log_write(0, LOG_MAIN, "SA: Debug2: body_linecount after SA: %d", body_linecount);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose((FILE *)readfh);
|
||||||
|
@@ -1331,6 +1376,9 @@ restart:
|
||||||
|
|
||||||
|
if (dorej && doteergrube)
|
||||||
|
{
|
||||||
|
+ char *teergrubewaitstr;
|
||||||
|
+ teergrubewaitstr=string_sprintf(SAmsgteergrubewait, spamstatus);
|
||||||
|
+
|
||||||
|
/* By default, we'll only save temp bounces by message ID so
|
||||||
|
* that when the same message is submitted several times, we
|
||||||
|
* overwrite the same file on disk and not create a brand new
|
||||||
|
@@ -1353,20 +1401,8 @@ restart:
|
||||||
|
|
||||||
|
for (i=0;i<SAteergrubetime/10;i++)
|
||||||
|
{
|
||||||
|
- char *str;
|
||||||
|
-
|
||||||
|
- /* Unfortunately, we can't use exim's smtp_printf because it
|
||||||
|
- * doesn't return an error code if the write gets an EPIPE.
|
||||||
|
- * So, we write ourselves, but this won't work if you have a
|
||||||
|
- * TLS connection opened (that said, if you are teergrubing
|
||||||
|
- * a TLS connection, it's probably a relay host, not a
|
||||||
|
- * spammer, and in this case you should not teergrube a
|
||||||
|
- * friendly relay, so basically we should be ok).
|
||||||
|
- * If you do teergrube an SSL connection with the current
|
||||||
|
- * code, you will break it, but that's acceptable */
|
||||||
|
- str=string_sprintf(string_sprintf("451- %s\r\n",SAmsgteergrubewait), spamstatus);
|
||||||
|
- fprintf(smtp_out, str);
|
||||||
|
- ret=fflush(smtp_out);
|
||||||
|
+ smtp_printf("451-%s\r\n", FALSE, teergrubewaitstr);
|
||||||
|
+ ret=smtp_fflush();
|
||||||
|
if (ret != 0)
|
||||||
|
{
|
||||||
|
log_write(0, LOG_MAIN | LOG_REJECT, "SA: Action: teergrubed sender for %d secs until it closed the connection: %s (scanned in %d/%d secs | Message-Id: %s). %s", i*10, spamstatus, scantime, fulltime, safemesgid, mailinfo);
|
||||||
Reference in New Issue
Block a user