aboutsummaryrefslogtreecommitdiff
path: root/mail/ssmtp/files
diff options
context:
space:
mode:
authorSergei Kolobov <sergei@FreeBSD.org>2003-11-08 22:14:38 +0000
committerSergei Kolobov <sergei@FreeBSD.org>2003-11-08 22:14:38 +0000
commit130a6b675e239623eaa243254d26332d171ae70b (patch)
tree9676622f5b174a36d9ace0338d37d161576f312b /mail/ssmtp/files
parent32c5a7922ebe5feb26e78a44e077b59fc3c2434f (diff)
downloadports-130a6b675e239623eaa243254d26332d171ae70b.tar.gz
ports-130a6b675e239623eaa243254d26332d171ae70b.zip
Notes
Diffstat (limited to 'mail/ssmtp/files')
-rw-r--r--mail/ssmtp/files/patch-ssmtp.c45
1 files changed, 42 insertions, 3 deletions
diff --git a/mail/ssmtp/files/patch-ssmtp.c b/mail/ssmtp/files/patch-ssmtp.c
index 1baf75ad41e6..24e0044bc5c0 100644
--- a/mail/ssmtp/files/patch-ssmtp.c
+++ b/mail/ssmtp/files/patch-ssmtp.c
@@ -1,10 +1,49 @@
---- ssmtp.c.orig Sun Dec 8 18:26:20 2002
-+++ ssmtp.c Mon Apr 7 01:24:52 2003
+--- ssmtp.c.orig Sat Nov 8 18:51:19 2003
++++ ssmtp.c Sat Nov 8 19:01:07 2003
@@ -14,6 +14,7 @@
*/
- #define VERSION "2.60.1"
+ #define VERSION "2.60.4"
+#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/param.h>
+@@ -366,9 +367,36 @@
+ {
+ char buf[(BUF_SZ + 1)], *p;
+ FILE *fp;
+-
++#ifdef USERPREFS
++ char *file=NULL;
++ if (pw->pw_dir != NULL) {
++ file = (char *)malloc (strlen (pw->pw_dir) + 1 + strlen (".ssmtprc") + 1);
++ sprintf (file, "%s/.ssmtprc", pw->pw_dir);
++ }
++
++ if ((file != NULL) && (fp = fopen(file, "r")) ) {
++ while(fgets(buf, sizeof(buf), fp)) {
++ /* Make comments invisible */
++ if((p = strchr(buf, '#'))) {
++ *p = (char)NULL;
++ }
++
++ /* Ignore malformed lines and comments */
++ if(strchr(buf, '@') == (char *)NULL) {
++ continue;
++ }
++ if((p = strtok(buf, "\n"))) {
++ if((uad = strdup(p)) == (char *)NULL) {
++ die("revaliases() -- strdup() failed");
++ }
++ }
++ }
++ fclose(fp);
+ /* Try to open the reverse aliases file */
+- if((fp = fopen(REVALIASES_FILE, "r"))) {
++ } else if ((fp = fopen(REVALIASES_FILE, "r"))) {
++#else
++ if ((fp = fopen(REVALIASES_FILE, "r"))) {
++#endif
+ /* Search if a reverse alias is defined for the sender */
+ while(fgets(buf, sizeof(buf), fp)) {
+ /* Make comments invisible */