Sendmail applet may need to validate on RCPT

Denys Vlasenko vda.linux at googlemail.com
Sun Mar 29 14:29:35 UTC 2009


On Sunday 29 March 2009 09:09, Vladimir Dronnikov wrote:
> > (IOW: should we aim at mimicking it?)
> 
> I think yes. Otherwise our sendmail fails to run quite valid scenario:
> to authenticate prior to MAIL FROM.
> 
> > "-am" format is a bit strange. Does ssmtp have other -aX options?
> > What do they do?
> 
> -au<user> to specify the username
> -ap<pass> to specify the password
> -am<meth> to specify login method
> 
> http://downloads.openwrt.org/people/nico/man/man8/ssmtp.8.html

I think it's best to act compatibly with it.

> >> The problem is that -a option is already being used to specify attachments.
> >
> > It is being used for that by:
> > * busybox? (only? is it our invention?)
> 
> MUAs like mail[x] use this option. mail[x] are synonyms for sendmail
> in BB.

If I got you right, "ssmtp" and "mail" commands have different switches.
In ssmtp, -aX is as you say above,; in mail, -a ATTACHMENT is used.
Parse options differently according to applet name then.

> And BB sendmail is mainly MUA; however, to be compatible it 
> combines both MUA and MTA options.

I don't understand MUA/MTA slang. I understand "SMTP client",
"SMTP server", "POP3 client", "POP3 server", same for IMAP.
Can you rephrase the above for dummies like me?

> So I treat -a for attachment as quite common choice.

> > * "vanilla sendmail"?
> > * other sendmail clones?
> 
> They are MTAs, and have nothing to do with attachments.

I don't understand.
In sendmail world, how do they send mail from command line?
IOW, what is their "SMTP client" program, and how does it
take attachments?

> > maybe 2a) if -a was "busybox only" invention, redefine it to match ssmtp.
> > ["how to specify attachments?" is a subquestion. other -aX? ]
> 
> To me the most natural way is to skip from:
> sendmail -a attach1 -a attach2 rcpt1 rcpt2
> to
> sendmail -t rcpt1 -t rcpt2 attach1 attach2
> 
> But this is inconsistent.

I think there's need to add largish comment to sendmail.c and explain,
which clones of sendmail are popular in the wild, which options
they support, which options from those do _we_ support.
If we have aliases for sendmail applet (or will have, like "ssmtp"),
and have different options supported for each, that needs to be documented.

mime.c already does something like that.

If this sounds boring to you, consider how much of confusion
that will clear up, and sendmail developers will have clearer
vision what we have now, and what we are trying to emulate.
Currently, it requires either telepathy or extensive knowledge
of Linux's command line mail utilities from various projects.

Example from coreutils/cp.c:

        /* Options of cp from GNU coreutils 6.10:
    project and version specified ^^^^^^^^^^^^^^
         * -a, --archive
         * -f, --force
         * -i, --interactive
         * -l, --link
         * -L, --dereference
         * -P, --no-dereference
         * -R, -r, --recursive
         * -s, --symbolic-link
         * -v, --verbose
         * -H   follow command-line symbolic links in SOURCE
         * -d   same as --no-dereference --preserve=links
         * -p   same as --preserve=mode,ownership,timestamps
         * -c   same as --preserve=context
         * NOT SUPPORTED IN BBOX:
         * long options are not supported (even those above).
         * --backup[=CONTROL]
         *      make a backup of each existing destination file
         * -b   like --backup but does not accept an argument
         * --copy-contents
         *      copy contents of special files when recursive
         * --preserve[=ATTR_LIST]
         *      preserve attributes (default: mode,ownership,timestamps),
         *      if possible additional attributes: security context,links,all
         * --no-preserve=ATTR_LIST
         * --parents
         *      use full source file name under DIRECTORY
         * --remove-destination
         *      remove  each existing destination file before attempting to open
         * --sparse=WHEN
         *      control creation of sparse files
         * --strip-trailing-slashes
         *      remove any trailing slashes from each SOURCE argument
         * -S, --suffix=SUFFIX
         *      override the usual backup suffix
         * -t, --target-directory=DIRECTORY
         *      copy all SOURCE arguments into DIRECTORY
         * -T, --no-target-directory
         *      treat DEST as a normal file
         * -u, --update
         *      copy only when the SOURCE file is newer than the destination
         *      file or when the destination file is missing
         * -x, --one-file-system
         *      stay on this file system
         * -Z, --context=CONTEXT
         *      (SELinux) set SELinux security context of copy to CONTEXT
         */


--
vda


More information about the busybox mailing list