Sendmail applet may need to validate on RCPT

Gustavo Zacarias gustavo at zacarias.com.ar
Fri Mar 27 20:53:51 UTC 2009


Vladimir Dronnikov wrote:

> -A is reserved for compatibility to sendmail's -Am, -Ac: it is accpted
> and ignored. -a is for attachments.
> 
> I see two ways: 1) to command sendmail (here and beneath I mean BB
> one) to issue AUTH before MAIL FROM, either via option or environment
> variable; 2) to try to cope with the problem automatically. Both may
> share the code so I'd like to try both;
> 3) add support for a config file, which can contain this switch.
> 
> In case 2) we can check RCPT TO retcode, if it is 550 then we should
> issue RST, then do AUTH and then return to the beginning: try to do
> MAIL FROM. The downsides are: 1) we can have multiple RCPT TO for both
> "local" and "remote" users (in your terms). Plus 550 can stand for,
> e.g., missing mailbox and so on. 2) in most common scenario we read
> stdin for recipients, and stdin is not rewindable.
> 
> What do you think?

Yes, BB sendmail from now on.
Option 1) would be the quick one to solve this problem.
Option 2) sounds nice but could have some implications - the smtp server
i'm using handles it nicely but i dunno if this is standard behaviour.
Basically EHLO - MAIL FROM - RCPT TO (fails here) and starting EHLO -
AUTH - ... over works for me, and it's a simple toggle in the code. It
just adds up to a little communication overhead if AUTH is known to be
required for a given server, but yeah you can combine it with 1) easily.
My guess is it should work with other MTAs.
In case 3) it could serve to reduce the complexity of the command line
parameters a bit, but i don't know if it's in the general spirit of
busybox to introduce configuration files for things that can be avoided.
It could also help introduce some extra features like
multiple-servers/multiple-recipients but then that's a bit of added size
too.
Regards.


More information about the busybox mailing list