On Thu, 2008-09-25 at 14:23 +0400, Vladimir Dronnikov wrote:
> > So would you rediff and send the result?
>
> I meant your EHLO patch.
Attatched.
It fixes this error that i currently get from postfix:
501 5.5.2 <natanael.copa?gmail.com>: Helo command rejected: Invalid name
techincally it would be mo correct to use safe_gethostname()....
whatever...
> I started look at it, but it looks like sendmail is designed
> to only do
> attatchments and attatchments only.
>
> Not true.
if there is no attatchement then the input is converted to an
"attatchment". Makes sense if you really want attatchment support as you
then can treat all parts equally more or less.
Converting the applet to a dumb mail sender would require some redesign.
> And we could inhibit encoding unless an attachment(s) is present.
That would be great. Support for attatchemnt is higly nonstandard and
should be an configure option.
> The problems still are: 1) plain text should be 7-bit clean; I assure
> you there are people who can not afford that.
Isn't that a job for the script/program that creates the message in
first place? sendmails job is to send mails. not compose them, nor edit
them.
> 2) Plain '.' in message: message body needs to be analyzed and
> mangled.
ssmtp solves that by inserting an '.' in front of all lines starting
with '.'
> But why doesn't the remote end correctly process well-packed MIME
> messages?!
Because recepient is a stupid program. (gnats)
> I think I will have to go back to ssmtp which does what I
> need: stupidly send plain text emails, not
> attatchments.
>
>
> Pity.
Yes. unfortunally i have releases to make.
> I don't have time for a busybox sendmail rewrite or
> fundamental redesign.
>
> I do. Please, request for features and find time to test the changes.
Thats great! I'll be happy to give it another try.
I'd like to have a sendmail that just sends mail and don't bother whats
in there.
If you want smart subject rewriting and attatchment support, the please
make those as config options. But IMO sendmail have nothing to do with
the contents of the email (encoding, attatchemts and such)
Have a look at how others does it. ssmtp is a good example.
> --
> Vladimir
>
Index: networking/sendmail.c
===================================================================
--- networking/sendmail.c (revision 23493)
+++ networking/sendmail.c (working copy)
@@ -319,7 +319,7 @@
// save initial stdin since body is piped!
xdup2(STDIN_FILENO, INITIAL_STDIN_FILENO);
opt_complementary = "w+:a::";
- options = "w:H:St" "s:c:a:iN:f:";
+ options = "w:H:St" "s:c:a:iN:f:o";
// body is pseudo attachment read from stdin
llist_add_to_end(&opt_attachments, (char *)"-");
} else {
@@ -336,9 +336,9 @@
argv += optind;
// connect to server
- // host[:port] not specified ? -> use $HOSTNAME. no $HOSTNAME ? -> use localhost
+ // host[:port] not specified ? -> use $SMTPHOST. no $SMTPHOST ? -> use localhost
if (!(opts & OPT_H)) {
- opt_connect = getenv("HOSTNAME");
+ opt_connect = getenv("SMTPHOST");
if (!opt_connect)
opt_connect = "127.0.0.1";
}
@@ -381,13 +381,11 @@
char *q;
llist_t *l;
llist_t *headers = NULL;
+ char *domain = safe_getdomainname();
// got no sender address? -> use username as a resort
if (!(opts & OPTS_f)) {
- char *domain = safe_getdomainname();
opt_from = xasprintf("[EMAIL PROTECTED]", opt_user, domain);
- if (ENABLE_FEATURE_CLEAN_UP)
- free(domain);
}
// introduce to server
@@ -399,9 +397,12 @@
}
// we should start with modern EHLO
- if (250 != smtp_checkp("EHLO %s", sane(opt_from), -1)) {
- smtp_checkp("HELO %s", opt_from, 250);
+ sane(domain);
+ if (250 != smtp_checkp("EHLO %s", domain, -1)) {
+ smtp_checkp("HELO %s", domain, 250);
}
+ if (ENABLE_FEATURE_CLEAN_UP)
+ free(domain);
// set sender
// NOTE: if password has not been specified
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox