On Fri, Sep 27, 2013 at 11:02:57AM +0200, Etienne Millon wrote:
> Additionally, starting from version 3.2, there is a "sendmail"
> configuration directive that you can set to "/usr/bin/esmtp" to do
> this without having to alias esmtp as the system-wide sendmail.

The configured 'sendmail' is invoked (in
rss2email.email.sendmail_send') as:

  {configured-sendmail} -f {sender} {recipient} < {message}

If you don't use sendmail, but do use a drop in replacement, you just
configure the 'sendmail' setting to point to your replacement.  If
your replacement doesn't support sendmail's usage syntax, you just
need to add a shim script to bridge the gap:

  #!/bin/sh

  SENDER=''
  RECIPIENT=''

  while [ "$#" -gt 0 ]; do
    case "$1" in
      '-f')
        shift;
        SENDER="$1"
        ;;
      *)
        RECIPIENT="$1"
        break
        ;;
    esac
    shift
  done

  {your-mda} {your args, using $SENDER and $RECIPIENT as you see fit}

Due to the prevalance of the sendmail interface (sendmail, postfix,
esmtp, …), I imagine a shim like this would be useful for a number of
programs besides rss2email for anyone without any of the
sendmail-compatible mail handers installed.

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to