I dislike the way smtpclient calculates your HELO for you and includes
a "Sender:" header, so I made the tweak below (.mod is my version).
Now you can (and must) use "-H machine" for your HELO.
I'm not a C coder, so my changes are ugly and purely pragmatic.
Combining this w/ tor and a decent queueing system, you can send
semi-anonymous mail.
Tor advises proxies to NOT open port 25, but many do anyway. Since tor
changes proxy every 10m or so, using a queueing system that retries
every 10m should get most of your mail through.
--- smtpclient-1.0.0/smtpclient_main.c Tue Oct 21 10:56:27 1997
+++ smtpclient-1.0.0.mod/smtpclient_main.c Wed Nov 26 17:54:23 2008
@@ -65,6 +65,7 @@
static int mime_style = 0;
static int verbose = 0;
static int usesyslog = 0;
+static char *helo = NULL;
I dislike the way smtpclient calculates your HELO for you and includes
a "Sender:" header, so I made the tweak below (.mod is my version).
Now you can (and must) use "-H machine" for your HELO.
I'm not a C coder, so my changes are ugly and purely pragmatic.
Combining this w/ tor and a decent queueing system, you can send
semi-anonymous mail.
Tor advises proxies to NOT open port 25, but many do anyway. Since tor
changes proxy every 10m or so, using a queueing system that retries
every 10m should get most of your mail through.
--- smtpclient-1.0.0/smtpclient_main.c Tue Oct 21 10:56:27 1997
+++ smtpclient-1.0.0.mod/smtpclient_main.c Wed Nov 26 17:54:23 2008
@@ -65,6 +65,7 @@
static int mime_style = 0;
static int verbose = 0;
static int usesyslog = 0;
+static char *helo = NULL;
static FILE *sfp;
static FILE *rfp;
@@ -317,7 +318,7 @@
/*
* Parse options
*/
- while ((c = getopt_long(argc, argv, ":s:f:r:e:c:S:P:MLvVh", options, NULL)) != EOF) {
+ while ((c = getopt_long(argc, argv, ":s:f:r:e:c:S:P:H:MLvVh", options, NULL)) != EOF) {
switch (c) {
case 's':
subject = optarg;
@@ -349,6 +350,9 @@
case 'v':
verbose = 1;
break;
+ case 'H':
+ helo = optarg;
+ break;
case 'V':
version();
exit(0);
@@ -449,7 +453,7 @@
* Give out SMTP headers.
*/
get_response(); /* banner */
- chat("HELO %s\r\n", my_name);
+ chat("HELO %s\r\n", helo);
chat("MAIL FROM: <%s>\r\n", from_addr);
for (i = optind; i < argc; i++)
chat("RCPT TO: <%s>\r\n", argv[i]);
@@ -468,11 +472,14 @@
fprintf(sfp, "Reply-To: %s\r\n", reply_addr);
if (err_addr)
fprintf(sfp, "Errors-To: %s\r\n", err_addr);
+
+ /******** turning off sender: header entirely - KTJ
if ((pwd = getpwuid(getuid())) == 0) {
fprintf(sfp, "Sender: userid-%d@%s\r\n", getuid(), my_name);
} else {
fprintf(sfp, "Sender: %s@%s\r\n", pwd->pw_name, my_name);
}
+ ***************/
fprintf(sfp, "To: %s", argv[optind]);
for (i = optind + 1; i < argc; i++)