"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mflib/callout.mf4" between
mailfromd-8.11.tar.xz and mailfromd-8.12.tar.xz

About: Mailfromd is a general-purpose mail filtering daemon for Sendmail, Postfix and MeTA1 (interfaces with the MTA using Milter or PMilter protocols).

callout.mf4  (mailfromd-8.11.tar.xz):callout.mf4  (mailfromd-8.12.tar.xz)
skipping to change at line 39 skipping to change at line 39
string last_poll_host string last_poll_host
string last_poll_greeting string last_poll_greeting
string last_poll_helo string last_poll_helo
string last_poll_sent string last_poll_sent
string last_poll_recv string last_poll_recv
number cache_used number cache_used
static func setvar(number fd, string name, string value) static func setvar(number fd, string name, string value)
do do
write(fd, "SET %name=%value\r\n") set value sed(value, 's/[\\\"]/\\&/g')
write(fd, "SET %name=\"%value\"\r\n")
set reply getline(fd) set reply getline(fd)
if not reply matches 'OK.*' if not reply matches 'OK.*'
throw e_callout_proto reply throw e_callout_proto reply
fi fi
done done
func callout_setvars(number fd)
do
if callout_transcript()
setvar(fd, "TRANSCRIPT", "ON")
else
setvar(fd, "TRANSCRIPT", "OFF")
fi
if ehlo_domain
setvar(fd, "EHLO", ehlo_domain)
fi
if mailfrom_address
setvar(fd, "MAILFROM", mailfrom_address)
fi
done
func callout_open(string url) func callout_open(string url)
returns number returns number
do do
number fd open("@ %url") number fd open("@ %url")
fd_set_delimiter(fd,"\r\n") fd_set_delimiter(fd,"\r\n")
string reply getline(fd) string reply getline(fd)
if not reply matches 'OK.*' if not reply matches 'OK.*'
throw e_callout_proto reply throw e_callout_proto reply
fi fi
skipping to change at line 70 skipping to change at line 86
set sid "%milter_client_address:" set sid "%milter_client_address:"
fi fi
if macro_defined("i") if macro_defined("i")
set sid sid . getmacro("i") set sid sid . getmacro("i")
fi fi
write(fd, "SID %sid\r\n") write(fd, "SID %sid\r\n")
set reply getline(fd) set reply getline(fd)
if not reply matches 'OK.*' if not reply matches 'OK.*'
throw e_callout_proto reply throw e_callout_proto reply
fi fi
callout_setvars(fd)
m4_ifelse(`
# Set command is not yet supported by the server.
if ehlo_domain
setvar(fd, "EHLO", ehlo_domain)
fi
if mailfrom_address
setvar(fd, "MAILFROM", mailfrom_address)
fi')
return fd return fd
done done
func callout_close(number fd) func callout_close(number fd)
do do
write(fd, "QUIT\r\n") write(fd, "QUIT\r\n")
set reply getline(fd) set reply getline(fd)
close(fd) close(fd)
done done
skipping to change at line 166 skipping to change at line 174
if callout_server_url == "" if callout_server_url == ""
set callout_server_url default_callout_server_url() set callout_server_url default_callout_server_url()
fi fi
done done
func __callout_open_default() func __callout_open_default()
returns number returns number
do do
if __callout_fd == -1 if __callout_fd == -1
set __callout_fd callout_open(callout_server_url) set __callout_fd callout_open(callout_server_url)
else
callout_setvars(__callout_fd)
fi fi
return __callout_fd return __callout_fd
done done
func callout(string email) func callout(string email)
returns number returns number
do do
return callout_do(__callout_open_default(), email) return callout_do(__callout_open_default(), email)
done done
 End of changes. 4 change blocks. 
10 lines changed or deleted 20 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)