Die wenigsten Hosts sind auf vollständige Installationen von qmail, sendmail, etc. angewiesen. Wer ohnehin einen zentralen Mailserver fährt und Workstations lediglich zum Mailen, News lesen, Programmieren, Grafiken bearbeiten usw. nutzt, kann die Mailsysteme auf den einzelnen Hosts durch smtppipe ersetzten, welches eine Mail von stdin liest und an den durch $SMTPRELAY genannten Mailserver weiterleitet.
smtppipe V0.21 - reads mail from stdin and forwards it to a smtp relay conformal with sendmail and qmail-inject command line switches smtppipe [-a] [-h] [-t] [-A] [-H] [-f sender] [-m relay] [-p port] [-l] [-x] [-ct connect_timeout] [-rt read_timeout] [-wt write_timeout] [-v] [-oem] [-oi] [--] [recipient ... ] smtppipe --help smtppipe -help smtppipe -V -a send message to all addresses given as recipients arguments; do not use any header recipient addresses -h, -t send message to all header recipient addresses (To, Cc, Bcc); do not use any command line recipients -A send message to all addresses given as recipient arguments; if no recipient arguments are given, use header recipient addresses; this is the default behaviour -H send message to all addresses given as recipient arguments and to all addresses given as header recipients -f sender forces envelope sender address; if not specified then the From:-line found in the header, the environment parameters USER, QMAILUSER, LOGNAME and the name of the account under which smtppipe runs (in that order) are checked for an user name -m relay host name or address of a smtp relay; if not specified then the environment variables SMTPRELAY, QMAILHOST and MAILHOST (in that order) are checked for a host name or an address -p port use specified port number when connecting to the smtp relay instead of the default SMTP port; if the host name of the smtp relay is given in a host:port notation, then that port is used -l be lazy; don't print out warnings -x don't insert missing From, Subject, Message-ID and Date lines into the header of your mail -ct # timeout on connecting to smtp relay; defaults to 60 seconds -rt # timeout on reading from smtp relay; defaults to 120 seconds -wt # timeout on writing to smtp relay; defaults to 120 seconds -v be verbose (print out what is being done); use -vv for debugging; -oem not handled due to compatibility -oi not handled due to compatibility -- not handled due to compatibility recipient list of space separated recipient addresses --help displays this help -help displays this help -V displays version smtppipe supports authentication against the smtp relay only through the following environment parameters: $SMTPUSER cleartext user name used for authentication $SMTPPASS cleartext password used for authentication; both $SMTPUSER and $SMTPPASS must be set for authentication to happen. $SMTPMECH force authentication method; if not set then smtppipe will try to use LOGIN or PLAIN (in that order) if supported by the smtp relay smtppipe handles bcc recipients and deletes them before final delivery. see http://www.ogris.de/smtppipe/
Also z.B.:
$ (echo -e "Subject: haha\n"; cat /etc/passwd) | SMTPRELAY=mail.mydomain.de ./smtppipe www@ogris.de
.muttrc:
set envelope_from set sendmail="/usr/bin/smtppipe -m mail.my-domain.de"
Latest version: 0.21 (released 2010-11-11)