summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pith/send.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/pith/send.c b/pith/send.c
index ba2f709b..dfcaf988 100644
--- a/pith/send.c
+++ b/pith/send.c
@@ -1716,8 +1716,24 @@ fprintf(log_file,"a\n"); fflush(log_file);
int addresses_count=0;
for(pf = header->local; pf; pf = pf->next) {
header_count++;
- if(pf->type == Address && pf->rcptto && pf->addr && *pf->addr)
- addresses_count++;
+ if(pf->type == Address && pf->rcptto && pf->addr) {
+ for (a = *pf->addr; a; a = a -> next) {
+ FILE *fp;
+ char cmd[128];
+ char output[1024];
+ snprintf(cmd, 128, "/usr/bin/hashcash -mq -r %s@%s",a->mailbox, a->host);
+ fp = popen(cmd, "r");
+ if (fp != NULL) {
+ while (!feof(fp)) {
+ if (fgets(output, 1024, fp) != NULL) {
+// fprintf(log_file,"'%s'\n", output); fflush(log_file);
+ addresses_count++;
+ }
+ }
+ pclose(fp);
+ }
+ }
+ }
}
fprintf(log_file,"%u %u b\n",header_count,addresses_count); fflush(log_file);