Guten Tag,
mich interessiert was dieser Code macht.
Also technisch gesehen
Was hat es mit diesem Code aufsich den ich in der Zip Datei die ich von hier runterlud http://www.theunixzone.com/201…omment-page-1/#comment-78 ? Wie muss ich modemu einrichten damit ich unter ubuntu mit modemu emails versenden kann?
Vielen Dank für die Beantwortung meiner Fragen.
#!/usr/local/bin/xc -s
# Modemu + xc sample script: "Xc talks SMTP and sends you a mail."
# Usage:
# modemu -c 'xc -l tty%s -s xc-sends-mail'
assign HOST eq `hostname`
assign TOADR eq $LOGNAME
dial "127.0.0.1:25"
#220 xxx Sendmail ready
if ! waitfor "220" 10; then exit; endif
transmit "HELO "
transmit HOST
transmit "^M"
#250 xxx Hello xxx, pleased to meet you
if ! waitfor "250" 10; then exit; endif
transmit "MAIL FROM: "
transmit $LOGNAME
transmit "^M"
#250 xxx... Sender ok
if ! waitfor "250" 10; then exit; endif
transmit "RCPT TO: "
transmit TOADR
transmit "^M"
#250 xxx... Recipient ok
if ! waitfor "250" 10; then exit; endif
transmit "DATA^M"
#354 Enter mail, end with "." on a line by itself
if ! waitfor "354" 10; then exit; endif
transmit "From: "
transmit $LOGNAME
transmit " (A satisfied modemu user ^M"
transmit "Subject: Sample mail for modemu demo^M"
transmit "^M"
transmit "This mail was sent to you by modemu + xc.^M"
transmit "^M.^M"
#250 Mail accepted
if ! waitfor "250" 10; then exit; endif
transmit "QUIT^M"
#221 xxx delivering mail
if ! waitfor "221" 10; then exit; endif
#NO CARRIER
if ! waitfor "NO CARRIER" 10; then exit; endif
quit