Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.035 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'log:': 0.05; 'reject': 0.07; '%s"': 0.09; 'exist,': 0.09; 'skip:/ 10': 0.09; 'subject:script': 0.09; 'subject:using': 0.09; 'to)': 0.09; 'try:': 0.09; 'python': 0.11; '"."': 0.16; '2.0.0': 0.16; 'args:': 0.16; 'ehlo': 0.16; 'subject:send': 0.16; 'sys.exit(0)': 0.16; 'tls': 0.16; 'subject:python': 0.16; 'exception': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'error': 0.23; 'connected': 0.24; 'looks': 0.24; '15,': 0.26; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'host': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'sep': 0.31; 'skip:= 40': 0.31; 'service,': 0.32; 'skip:c 30': 0.32; 'url:python': 0.33; 'subject:the': 0.34; 'could': 0.34; 'message.': 0.35; 'connection': 0.35; 'except': 0.35; 'prepare': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'smtp': 0.36; 'url:listinfo': 0.36; 'url:org': 0.36; 'server': 0.38; 'ahead': 0.38; 'skip:[ 10': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'skip:x 10': 0.40; 'url:mail': 0.40; "google's": 0.60; 'skip:2 20': 0.60; 'most': 0.60; 'completed': 0.61; 'deliver': 0.61; 'address': 0.63; 'email addr:gmail.com': 0.63; 'connecting': 0.64; 'spam.': 0.64; '8bit%:95': 0.64; 'date,': 0.68; 'reverse': 0.68; 'subject': 0.69; '500': 0.70; '8bit%:100': 0.72; '250': 0.78; 'email addr:gmail.com"': 0.84; 'random,': 0.84; 'subject:via': 0.84; 'text/html;': 0.84; '8bit%:90': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=8cD508P0YOpHcmxqokvktpIvBipwtNPfByKd9RRnvYk=; b=jfevp1g0T/4ppZoZItwkcGVrNvdxDm+KoK/wWDqGuf24wgr66WPxs9QmFojXpSmDxX htH6er5quJOiiL0/ROtf9z135z9qBlIYByivUQvFYJSBkxhrfRfd9aGyuxpM/c9vDe7D a3xJu/L0es6Fl4DNYjujgz4YNlWplupo44ZSFQrMGmJL6DDGwWhjrxcDsPbs0YwTfEE9 SOBGJbeaWHfWrbvhLYa9jwvU9jPDMuMehYcVcOqW7ooRHaUejTU5dWW91m4s74HB6g/F IYjvmVuUqnmZ/9xWCCIv0HJmB2VaGGk/PW6JdPtwVrkXrB1iwCRwuY5Rrxm2siRG92ZD iYvw== MIME-Version: 1.0 X-Received: by 10.194.9.70 with SMTP id x6mr14088126wja.22.1379271592519; Sun, 15 Sep 2013 11:59:52 -0700 (PDT) In-Reply-To: <305a2044-a13e-47f8-9cc1-9e3482424616@googlegroups.com> References: <305a2044-a13e-47f8-9cc1-9e3482424616@googlegroups.com> Date: Sun, 15 Sep 2013 20:59:52 +0200 Subject: Re: Tryign to send mail via a python script by using the local MTA From: Joost Molenaar To: python-list@python.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 96 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1379271594 news.xs4all.nl 15983 [2001:888:2000:d::a6]:35621 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:54189 Since the From address is random, it most likely doesn't exist, which could be reason for Google's smtp server to reject the message or to deliver it to spam. Also, the reverse DNS for 84.200.17.58 does not resolve to secure.superhost.gr, which could also be reason to reject the message. On Sun, Sep 15, 2013 at 5:54 PM, Ferrous Cranus wro= te: > try: > # prepare mail data > FROM =3D random_char(10) + '@' + random_char(10) + '.com' > TO =3D "nikos.gr33k@gmail.com" > > SUBJECT =3D random_char( 50 ) > MESSAGE =3D random_char( 500 ) > > os.system( "echo %s | mailx -v -r %s -s %s %s" % (MESSAGE, FROM, SUBJEC= T, TO) ) > > print( "

%s=CE=B7 =CE=B1=CF=80=CE=BF=CF=83=CF=84=CE= =BF=CE=BB=CE=AE =CF=80=CF=81=CE=BF=CF=82 %s =CE=B5=CF=80=CE=B5=CF=84=CE=B5= =CF=8D=CF=87=CE=B8=CE=B7!

" % (times, TO) ) > except Exception as e: > print( "sendmail =3D> ", date, repr( sys.exc_info() ) ) > > sys.exit(0) > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > I'am still trying to send successfulyl a mail through my local host by us= ing the local MTA, trying to avoid using GMail's SMTP server but the mail n= ever gets send > > this is the error message: > > [code] > nikos@superhost.gr [~/www/cgi-bin]# python mail.py > LOG: MAIN > cwd=3D/home/nikos/public_html/cgi-bin 6 args: send-mail -i -v -r ZYN1KG= SCT9@JRV0CEI7TX.com nikos.gr33k@gmail.com > LOG: MAIN > <=3D ZYN1KGSCT9@JRV0CEI7TX.com U=3Dnikos P=3Dlocal S=3D1052 id=3D5235d7= f5.bzP0TUy4ZQEOp7Dh%ZYN1KGSCT9@JRV0CEI7TX.com T=3D"QOU0ULMZBF7RGG7B260YERPP= XXLTVQ9WKJ93ZXYABQNNA0XB9I" > Content-type: text/html; charset=3Dutf-8 > >

0=CE=B7 =CE=B1=CF=80=CE=BF=CF=83=CF=84=CE=BF=CE=BB= =CE=AE =CF=80=CF=81=CE=BF=CF=82 nikos.gr33k@gmail.com =CE=B5=CF=80=CE=B5=CF= =84=CE=B5=CF=8D=CF=87=CE=B8=CE=B7!

> LOG: MAIN > cwd=3D/var/spool/exim 4 args: /usr/sbin/exim -v -Mc 1VLEdZ-0001Xg-6b > delivering 1VLEdZ-0001Xg-6b > nikos@superhost.gr [~/www/cgi-bin]# LOG: MAIN > SMTP connection outbound 1379260405 1VLEdZ-0001Xg-6b superhost.gr nikos= .gr33k@gmail.com > Connecting to gmail-smtp-in.l.google.com [173.194.70.26]:25 ... connected > SMTP<< 220 mx.google.com ESMTP e49si15825947eep.141 - gsmtp > SMTP>> EHLO secure.superhost.gr > SMTP<< 250-mx.google.com at your service, [84.200.17.58] > 250-SIZE 35882577 > 250-8BITMIME > 250-STARTTLS > 250-ENHANCEDSTATUSCODES > 250 CHUNKING > SMTP>> STARTTLS > SMTP<< 220 2.0.0 Ready to start TLS > SMTP>> EHLO secure.superhost.gr > SMTP<< 250-mx.google.com at your service, [84.200.17.58] > 250-SIZE 35882577 > 250-8BITMIME > 250-ENHANCEDSTATUSCODES > 250 CHUNKING > SMTP>> MAIL FROM: SIZE=3D2090 > SMTP<< 250 2.1.0 OK e49si15825947eep.141 - gsmtp > SMTP>> RCPT TO: > SMTP<< 250 2.1.5 OK e49si15825947eep.141 - gsmtp > SMTP>> DATA > SMTP<< 354 Go ahead e49si15825947eep.141 - gsmtp > SMTP>> writing message and terminating "." > SMTP<< 250 2.0.0 OK 1379260407 e49si15825947eep.141 - gsmtp > SMTP>> QUIT > LOG: MAIN > =3D> nikos.gr33k@gmail.com R=3Dlookuphost T=3Dremote_smtp H=3Dgmail-smt= p-in.l.google.com [173.194.70.26] X=3DTLSv1:RC4-SHA:128 > LOG: MAIN > Completed > [/code] > > > Since all looks okey why the mail never gets delivered? > -- > https://mail.python.org/mailman/listinfo/python-list