diff options
Diffstat (limited to 'mail/masqmail/files')
-rw-r--r-- | mail/masqmail/files/masqmail.sh | 63 | ||||
-rw-r--r-- | mail/masqmail/files/patch-Makefile.in | 18 | ||||
-rw-r--r-- | mail/masqmail/files/patch-masqmail.c | 11 | ||||
-rw-r--r-- | mail/masqmail/files/patch-mserver.c | 11 | ||||
-rw-r--r-- | mail/masqmail/files/patch-pop3_in.c | 11 | ||||
-rw-r--r-- | mail/masqmail/files/patch-smtp_out.c | 20 |
6 files changed, 134 insertions, 0 deletions
diff --git a/mail/masqmail/files/masqmail.sh b/mail/masqmail/files/masqmail.sh new file mode 100644 index 00000000000..1af2b245b8d --- /dev/null +++ b/mail/masqmail/files/masqmail.sh @@ -0,0 +1,63 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: mail +# REQUIRE: LOGIN +# KEYWORD: FreeBSD shutdown +# we make mail start late, so that things like .forward's are not +# processed until the system is fully operational + +# +# Add the following lines to /etc/rc.conf to enable masqmail: +# +#masqmail_enable="YES" +# +# See masqmail(8) for flags +# + +. %%RC_SUBR%% + +name=masqmail +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/masqmail +required_dirs=/var/log/masqmail +required_files=%%PREFIX%%/etc/masqmail/masqmail.conf + +start_precmd=start_precmd +stop_postcmd=stop_postcmd + +extra_commands="reload" + +start_precmd() +{ + case $sendmail_enable in + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + warn "sendmail_enable should be set to NONE" + ;; + [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) + case $sendmail_submit_enable in + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + warn "sendmail_submit_enable should be set to NO" + ;; + esac + ;; + [Nn][Oo][Nn][Ee]) + ;; + esac +} + +stop_postcmd() +{ + rm -f $pidfile +} + +# set defaults + +masqmail_enable=${masqmail_enable:-"NO"} +masqmail_flags=${masqmail_flags:-"-bd -q30m"} + +load_rc_config $name +run_rc_command "$1" diff --git a/mail/masqmail/files/patch-Makefile.in b/mail/masqmail/files/patch-Makefile.in new file mode 100644 index 00000000000..10fadd751a6 --- /dev/null +++ b/mail/masqmail/files/patch-Makefile.in @@ -0,0 +1,18 @@ +--- Makefile.in.old Sun Apr 4 19:10:04 2004 ++++ Makefile.in Sun Apr 4 19:10:29 2004 +@@ -375,13 +375,13 @@ + + $(DESTDIR)@with_logdir@: + mkdir -p $(DESTDIR)@with_logdir@ +- chown @with_user@.@with_group@ $(DESTDIR)@with_logdir@ ++ chown @with_user@:@with_group@ $(DESTDIR)@with_logdir@ + + $(DESTDIR)@with_spooldir@: + mkdir -p $(DESTDIR)@with_spooldir@ + mkdir -p $(DESTDIR)@with_spooldir@/input + mkdir -p $(DESTDIR)@with_spooldir@/popuidl +- chown -R @with_user@.@with_group@ $(DESTDIR)@with_spooldir@ ++ chown -R @with_user@:@with_group@ $(DESTDIR)@with_spooldir@ + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/mail/masqmail/files/patch-masqmail.c b/mail/masqmail/files/patch-masqmail.c new file mode 100644 index 00000000000..8e6e1945bca --- /dev/null +++ b/mail/masqmail/files/patch-masqmail.c @@ -0,0 +1,11 @@ +--- src/masqmail.c.old Mon Apr 5 01:18:16 2004 ++++ src/masqmail.c Mon Apr 5 01:23:09 2004 +@@ -167,7 +167,7 @@ + + DEBUG(5) debugf("accepting smtp message on stdin\n"); + +- if(getpeername(0, &saddr, &dummy) == 0){ ++ if(getpeername(0, (struct sockaddr *)(&saddr), &dummy) == 0){ + peername = g_strdup(inet_ntoa(saddr.sin_addr)); + #ifdef ENABLE_IDENT + { diff --git a/mail/masqmail/files/patch-mserver.c b/mail/masqmail/files/patch-mserver.c new file mode 100644 index 00000000000..f6cf0fefe11 --- /dev/null +++ b/mail/masqmail/files/patch-mserver.c @@ -0,0 +1,11 @@ +--- src/mserver.c.old Mon Mar 19 17:45:28 2001 ++++ src/mserver.c Mon Apr 5 01:27:29 2004 +@@ -56,7 +56,7 @@ + if(init_sockaddr(&saddr, conf.mserver_iface)){ + int sock = socket(PF_INET, SOCK_STREAM, 0); + int dup_sock; +- if(connect(sock, &saddr, sizeof(saddr)) == 0){ ++ if(connect(sock, (struct sockaddr *)(&saddr), sizeof(saddr)) == 0){ + FILE *in, *out; + char buf[256]; + diff --git a/mail/masqmail/files/patch-pop3_in.c b/mail/masqmail/files/patch-pop3_in.c new file mode 100644 index 00000000000..a633dc2e319 --- /dev/null +++ b/mail/masqmail/files/patch-pop3_in.c @@ -0,0 +1,11 @@ +--- src/pop3_in.c.old Mon Apr 5 01:13:51 2004 ++++ src/pop3_in.c Mon Apr 5 01:15:27 2004 +@@ -372,7 +372,7 @@ + DEBUG(5){ + struct sockaddr_in name; + int len; +- getsockname(sock, &name, &len); ++ getsockname(sock, (struct sockaddr *)(&name), &len); + debugf("socket: name.sin_addr = %s\n", inet_ntoa(name.sin_addr)); + } + return popb; diff --git a/mail/masqmail/files/patch-smtp_out.c b/mail/masqmail/files/patch-smtp_out.c new file mode 100644 index 00000000000..1320e928138 --- /dev/null +++ b/mail/masqmail/files/patch-smtp_out.c @@ -0,0 +1,20 @@ +--- src/smtp_out.c.old Mon Apr 5 01:07:18 2004 ++++ src/smtp_out.c Mon Apr 5 01:08:18 2004 +@@ -60,7 +60,7 @@ + struct hostent *host_entry; + + if(do_correct){ +- getsockname(psb->sock, &sname, &len); ++ getsockname(psb->sock, (struct sockaddr *)(&sname), &len); + DEBUG(5) debugf("socket: name.sin_addr = %s\n", inet_ntoa(sname.sin_addr)); + host_entry = + gethostbyaddr((const char *)&(sname.sin_addr), +@@ -455,7 +455,7 @@ + DEBUG(5){ + struct sockaddr_in name; + int len = sizeof(struct sockaddr); +- getsockname(sock, &name, &len); ++ getsockname(sock, (struct sockaddr *)(&name), &len); + debugf("socket: name.sin_addr = %s\n", inet_ntoa(name.sin_addr)); + } + return psb; |