- update msmtp to 1.4.16

from tim van der molen, via paul irofti (MAINTAINER)
This commit is contained in:
jasper 2008-10-19 20:35:01 +00:00
parent e21188af21
commit f83a9a758b
11 changed files with 168 additions and 124 deletions

View File

@ -1,9 +1,8 @@
# $OpenBSD: Makefile,v 1.14 2008/06/19 09:09:42 steven Exp $
# $OpenBSD: Makefile,v 1.15 2008/10/19 20:35:01 jasper Exp $
COMMENT= SMTP plugin for MUAs
DISTNAME= msmtp-1.4.13
PKGNAME= ${DISTNAME}p1
DISTNAME= msmtp-1.4.16
CATEGORIES= mail
HOMEPAGE= http://msmtp.sourceforge.net/
@ -39,7 +38,7 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/doc/msmtp.html ${PREFIX}/share/doc/msmtp
${INSTALL_DATA} ${WRKSRC}/scripts/msmtpqueue/{README,ChangeLog} \
${PREFIX}/share/msmtp/msmtpqueue
${INSTALL_SCRIPT} ${WRKSRC}/scripts/set_sendmail.sh \
${INSTALL_SCRIPT} ${WRKSRC}/scripts/set_sendmail/set_sendmail.sh \
${PREFIX}/share/examples/msmtp
${INSTALL_SCRIPT} ${WRKSRC}/scripts/msmtpqueue/*.sh \
${PREFIX}/share/examples/msmtp

View File

@ -1,5 +1,5 @@
MD5 (msmtp-1.4.13.tar.bz2) = AhqR1xRRAK0PAMkSyBBOAw==
RMD160 (msmtp-1.4.13.tar.bz2) = qecB/PvPONJAxHTbyIYN4lne3E4=
SHA1 (msmtp-1.4.13.tar.bz2) = wdDe4rjgNSiaBGfWh+yAZtumHpc=
SHA256 (msmtp-1.4.13.tar.bz2) = l2TQuV69XiL1LbKwt9t2KH04AgUHmM/iqF7ay2BDGPU=
SIZE (msmtp-1.4.13.tar.bz2) = 704779
MD5 (msmtp-1.4.16.tar.bz2) = d6MzYB6d4D9pVTlJjmeMwg==
RMD160 (msmtp-1.4.16.tar.bz2) = EUIEIjXkJFf4JE4C8Hjb1T81CIY=
SHA1 (msmtp-1.4.16.tar.bz2) = eE7igc7gXkoxJinvqk6okruYpR8=
SHA256 (msmtp-1.4.16.tar.bz2) = JI+yuB//k2J89RFx3oCspvmsSk+6Z9UztM7Znic6eEo=
SIZE (msmtp-1.4.16.tar.bz2) = 727517

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-configure,v 1.6 2007/08/28 18:45:34 jasper Exp $
--- configure.orig Wed Aug 1 11:00:47 2007
+++ configure Tue Aug 28 20:26:32 2007
@@ -903,14 +903,14 @@ localstatedir='${prefix}/var'
$OpenBSD: patch-configure,v 1.7 2008/10/19 20:35:01 jasper Exp $
--- configure.orig Mon Jul 28 00:46:30 2008
+++ configure Tue Oct 14 13:56:57 2008
@@ -950,14 +950,14 @@ localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@ -18,18 +18,18 @@ $OpenBSD: patch-configure,v 1.6 2007/08/28 18:45:34 jasper Exp $
ac_prev=
ac_dashdash=
@@ -20470,7 +20470,7 @@ REPLACE_FTELLO!$REPLACE_FTELLO$ac_delim
REPLACE_FTELL!$REPLACE_FTELL$ac_delim
REPLACE_FFLUSH!$REPLACE_FFLUSH$ac_delim
@@ -21779,7 +21779,7 @@ HAVE_DECL_GETDELIM!$HAVE_DECL_GETDELIM$ac_delim
HAVE_DECL_GETLINE!$HAVE_DECL_GETLINE$ac_delim
REPLACE_GETLINE!$REPLACE_GETLINE$ac_delim
GETOPT_H!$GETOPT_H$ac_delim
-LIBINTL!$LIBINTL$ac_delim
+LIBINTL!$LTLIBINTL$ac_delim
LTLIBINTL!$LTLIBINTL$ac_delim
GNULIB_CHOWN!$GNULIB_CHOWN$ac_delim
GNULIB_DUP2!$GNULIB_DUP2$ac_delim
@@ -20586,7 +20586,7 @@ XGETTEXT!$XGETTEXT$ac_delim
XGETTEXT_015!$XGETTEXT_015$ac_delim
@@ -21930,7 +21930,7 @@ XGETTEXT_015!$XGETTEXT_015$ac_delim
MSGMERGE!$MSGMERGE$ac_delim
XGETTEXT_EXTRA_OPTIONS!$XGETTEXT_EXTRA_OPTIONS$ac_delim
INTL_MACOSX_LIBS!$INTL_MACOSX_LIBS$ac_delim
-LIBICONV!$LIBICONV$ac_delim
+LIBICONV!$LTLIBICONV$ac_delim

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-scripts_msmtpq_msmtpQ,v 1.1 2008/10/19 20:35:01 jasper Exp $
--- scripts/msmtpq/msmtpQ.orig Mon Jul 28 00:20:47 2008
+++ scripts/msmtpq/msmtpQ Tue Oct 14 14:18:06 2008
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
#--------------------------------------------------------------
#

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-scripts_msmtpq_msmtpq,v 1.1 2008/10/19 20:35:01 jasper Exp $
--- scripts/msmtpq/msmtpq.orig Mon Jul 28 00:20:41 2008
+++ scripts/msmtpq/msmtpq Tue Oct 14 14:18:13 2008
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
#--------------------------------------------------------------
#

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-scripts_msmtpqueue_msmtp-enqueue_sh,v 1.1 2008/10/19 20:35:01 jasper Exp $
--- scripts/msmtpqueue/msmtp-enqueue.sh.orig Mon Jul 28 00:20:50 2008
+++ scripts/msmtpqueue/msmtp-enqueue.sh Tue Oct 14 14:18:49 2008
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
QUEUEDIR=$HOME/.msmtpqueue

View File

@ -1,6 +1,9 @@
--- scripts/msmtpqueue/msmtp-listqueue.sh.orig Thu Aug 2 15:45:06 2007
+++ scripts/msmtpqueue/msmtp-listqueue.sh Thu Aug 2 15:45:00 2007
@@ -3,6 +3,6 @@
--- scripts/msmtpqueue/msmtp-listqueue.sh.orig Mon Jul 28 00:20:57 2008
+++ scripts/msmtpqueue/msmtp-listqueue.sh Tue Oct 14 14:15:51 2008
@@ -1,8 +1,8 @@
-#!/usr/bin/env bash
+#!/bin/sh
QUEUEDIR=$HOME/.msmtpqueue
for i in $QUEUEDIR/*.mail; do

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-scripts_msmtpqueue_msmtp-runqueue_sh,v 1.1 2008/10/19 20:35:01 jasper Exp $
--- scripts/msmtpqueue/msmtp-runqueue.sh.orig Mon Jul 28 00:21:43 2008
+++ scripts/msmtpqueue/msmtp-runqueue.sh Tue Oct 14 14:18:56 2008
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
QUEUEDIR="$HOME/.msmtpqueue"
LOCKFILE="$QUEUEDIR/.lock"

View File

@ -0,0 +1,107 @@
$OpenBSD: patch-scripts_set_sendmail_set_sendmail_sh,v 1.1 2008/10/19 20:35:01 jasper Exp $
--- scripts/set_sendmail/set_sendmail.sh.orig Mon Jul 28 00:22:50 2008
+++ scripts/set_sendmail/set_sendmail.sh Wed Oct 15 03:15:06 2008
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
# Created : Tue 03 Jul 2007 11:54:53 PM EDT
# Modified : Thu 13 Sep 2007 06:35:56 AM PDT
# Author : Gautam Iyer <gi1242@users.sourceforge.net>
@@ -13,26 +13,21 @@
# Default setting used if the domain name can not be found, or if something goes
# wrong.
default='/usr/sbin/sendmail -oem -oi'
-# Script uses bash-3.2. Exit if bash version is lower.
-if (( BASH_VERSINFO[0] < 3 || BASH_VERSINFO[1] < 2 )); then
- echo $default
- exit
-fi
# {{{1 Script Functions
-function debug()
+function debug
{
[[ -n $verbose ]] && echo -e "\033[31m$*\033[m" >> /dev/stderr
}
-function print_usage()
+function print_usage
{
echo "USAGE:"
echo " set_sendmail.sh [-v] -c config_file"
echo " set_sendmail.sh -h"
}
-function print_help()
+function print_help
{
print_usage
@@ -67,7 +62,7 @@ EOF
}
# Check if a host is reachable
-function check_host()
+function check_host
{
debug "Checking for host $1"
if [[ $host_pkg == 'bind' ]]; then
@@ -81,7 +76,7 @@ function check_host()
}
# Function to get the domain name (in variable domainname).
-function get_domainname()
+function get_domainname
{
debug "Getting domain name"
@@ -113,8 +108,8 @@ function get_domainname()
# Get ip address
#ipaddr=$(/sbin/ifconfig | grep 'inet addr:' | grep -v '127.0.0.1' | \
# cut -d: -f2 | awk '{ print $1}')
- #ipaddr=$(w3m -dump whatismyip.org)
- ipaddr=$(wget -qO- http://whatismyip.org)
+ ipaddr=$(lynx -dump whatismyip.org)
+ #ipaddr=$(wget -qO- http://whatismyip.org)
debug "Got IP address '$ipaddr'"
[[ -z $ipaddr ]] && return
@@ -126,7 +121,7 @@ function get_domainname()
debug "Got domain name '$domainname'"
}
-function do_account()
+function do_account
{
local account=$1
@@ -154,14 +149,15 @@ fi
source $configFile
# If we can't (or shouldn't) msmtp, then print default and exit
-if [[ ! $HOSTNAME =~ $run_hosts ]] || ! which msmtp >& /dev/null; then
+if [[ ! $HOSTNAME == $run_hosts ]] || ! which msmtp >& /dev/null; then
echo $default
exit
fi
# See if we can decide on the account based on /etc/resolv.conf
debug "Getting account from /etc/resolv.conf"
-for ((i=0; i<${#accounts[*]}; i++ )); do
+i=-1
+while [ $((++i)) -lt ${#accounts[*]} ]; do
if [[ -n ${resolv_regexp[$i]} ]]; then
regexp=${resolv_regexp[$i]}
if [[ ${regexp:0:1} != '!' ]]; then
@@ -178,8 +174,9 @@ get_domainname
# Decide which account to use
debug "Getting account from domainname ($domainname)"
-for ((i=0; i<${#accounts[*]}; i++ )); do
- if [[ $domainname =~ ${dom_regexp[$i]} ]]; then
+i=-1
+while [ $((++i)) -lt ${#accounts[*]} ]; do
+ if [[ $domainname == ${dom_regexp[$i]} ]]; then
do_account ${accounts[$i]}
fi
done

View File

@ -1,101 +0,0 @@
$OpenBSD: patch-scripts_set_sendmail_sh,v 1.1 2007/08/28 18:45:34 jasper Exp $
--- scripts/set_sendmail.sh.orig Wed Aug 1 10:54:56 2007
+++ scripts/set_sendmail.sh Tue Aug 28 20:26:32 2007
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /bin/sh
# Created : Tue 03 Jul 2007 11:54:53 PM EDT
# Modified : Wed 04 Jul 2007 01:27:09 PM EDT
# Author : Gautam Iyer <gi1242@users.sourceforge.net>
@@ -32,30 +32,30 @@ run_hosts='^baradur$'
# The following are the settings I use on my laptop.
# Use default account if we could not get the domain name.
-accounts+=(default)
-patterns+=('^$')
+accounts=${accounts}${default}
+patterns=${patterns}'^$'
# Use account 'stanford' from within the Stanford.EDU domain.
-accounts+=(stanford)
-patterns+=('^Stanford\.EDU$')
+accounts=${accounts}${stanford}
+patterns=${patterns}'^Stanford\.EDU$'
# ri.cox.net seems to have firewalled port 25, so use ssh tunnelling in this
# domain. (The function ssh_tunnel (called automatically) sets up the tunnel)
-accounts+=(ssh)
-patterns+=('^ri\.cox\.net$')
+accounts=${accounts}${ssh}
+patterns=${patterns}'^ri\.cox\.net$'
# From outside the Stanford.EDU domain, use account 'roam' with Kerberos
# authentication. It involves typing my password once a day (when my kerberos
# tickets expire), but is faster than ssh tunneling. (This requires traffic
# through port 25 to not be firewalled)
-accounts+=(roam)
-patterns+=('.')
+accounts=${accounts}${roam}
+patterns=${patterns}'.'
# Ignore case while matching.
-shopt -s nocasematch
+#shopt -s nocasematch
# Function called when account named "ssh" is used
-function ssh_tunnel()
+function ssh_tunnel
{
# Kill an already running tunnel (connection might be inactive)
pkill -f '^ssh.*8025:math:25'
@@ -68,7 +68,7 @@ function ssh_tunnel()
# End user settings
#
# {{{1 Script Functions
-function print_help()
+function print_help
{
cat << 'EOF'
USAGE:
@@ -97,7 +97,7 @@ EOF
}
# Check if a host is reachable
-function check_host()
+function check_host
{
if [[ $host_pkg == 'bind' ]]; then
host $1 >& /dev/null
@@ -110,7 +110,7 @@ function check_host()
}
# Function to get the domain name (in variable domainname).
-function get_domainname()
+function get_domainname
{
domainname=
ipaddr=
@@ -131,8 +131,8 @@ function get_domainname()
# Get ip address
#ipaddr=$(/sbin/ifconfig | grep 'inet addr:' | grep -v '127.0.0.1' | \
# cut -d: -f2 | awk '{ print $1}')
- #ipaddr=$(w3m -dump whatismyip.org)
- ipaddr=$(wget -qO- http://whatismyip.org)
+ ipaddr=$(lynx -dump whatismyip.org)
+ #ipaddr=$(wget -qO- http://whatismyip.org)
[[ -z $ipaddr ]] && return
if [[ $host_pkg == bind ]]; then
@@ -143,10 +143,10 @@ function get_domainname()
}
# {{{1 Main script
-(( $# )) && print_help
+[ $# -ne 0 ] && print_help
# If we can't (or shouldn't) msmtp, then print default and exit
-if [[ ! $HOST =~ $run_hosts ]] || ! which msmtp >& /dev/null; then
+if [[ ! $HOST == $run_hosts ]] || ! which msmtp >& /dev/null; then
echo $default
exit
fi

View File

@ -1,5 +1,5 @@
@comment $OpenBSD: PLIST,v 1.3 2007/08/28 18:45:34 jasper Exp $
bin/msmtp
@comment $OpenBSD: PLIST,v 1.4 2008/10/19 20:35:01 jasper Exp $
@bin bin/msmtp
@info info/msmtp.info
@man man/man1/msmtp.1
share/doc/msmtp/