I have a working mail server running Debian stable, the following elements are working.SPFDKIMrDNSMy IP is not listed in any backlist, I used: mxtoolbox.com for all this.My problem: Sending emails to hotmail with a python script sometimes doesn't work. The mail gets sent but the recipient doesn't get it (or goes to spam). This doesn't ever happen when sending to my account so I don't even know what happens.This is the script (Maybe I'm missing a header?)Consider that, at the moment, security is not a concern (I'm not checking the parameters at all)#!/usr/bin/pythonimport sysimport smtplibfrom email.mime.multipart import MIMEMultipartfrom email.mime.text import MIMETextif len(sys.argv)!=3:        print 2 parameter, mail subject (quoted)        sys.exit(1)sender = 'sender@domain.com.ar'receiver = sys.argv[1] msg = MIMEMultipart('alternative')msg['Subject'] = sys.argv[2]msg['From'] = sendermsg['To'] = receiverwith open('mailtext', 'r') as content_file:    message= content_file.read()msg.attach(MIMEText(message,'html'))s = smtplib.SMTP('localhost')    s.sendmail(sender, receiver, msg.as_string())    s.quit()This is my mail.log for the mail I sentNov 10 14:20:59 domain postfix/smtpd[11743]: connect from domain.com.ar[127.0.0.1]Nov 10 14:20:59 domain postfix/smtpd[11743]: 2668943282: client=domain.com.ar[127.0.0.1]Nov 10 14:21:00 domain postfix/cleanup[11749]: 2668943282: message-id=Nov 10 14:21:00 domain postfix/qmgr[4185]: 2668943282: from=, size=836, nrcpt=1 (queue active)Nov 10 14:21:00 domain postfix/smtpd[11743]: disconnect from domain.com.ar[127.0.0.1]Nov 10 14:21:04 domain postfix/smtpd[11761]: connect from domain.com.ar[127.0.0.1]Nov 10 14:21:04 domain postfix/smtpd[11761]: 9F19843285: client=domain.com.ar[127.0.0.1]Nov 10 14:21:04 domain postfix/cleanup[11749]: 9F19843285: message-id=Nov 10 14:21:04 domain postfix/qmgr[4185]: 9F19843285: from=, size=1262, nrcpt=1 (queue active)Nov 10 14:21:04 domain postfix/smtpd[11761]: disconnect from domain.com.ar[127.0.0.1]Nov 10 14:21:04 domain amavis[10275]: (10275-15) Passed CLEAN {RelayedInternal}, MYNETS/MYUSERS LOCAL [127.0.0.1]:45027 [127.0.0.1]  -> , Queue-ID: 2668943282, Message-ID: , mail_id: 16V7UTH-mVAO, Hits: -7.345, size: 835, queued_as: 9F19843285, 4471 msNov 10 14:21:04 domain postfix/smtp[11756]: 2668943282: to=, relay=127.0.0.1[127.0.0.1]:10024, delay=5.6, delays=1.1/0.01/0.01/4.5, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 9F19843285)Nov 10 14:21:04 domain postfix/qmgr[4185]: 2668943282: removedNov 10 14:21:06 domain postfix/smtp[11762]: 9F19843285: to=, relay=mx1.hotmail.com[65.54.188.94]:25, delay=1.4, delays=0.01/0.02/0.86/0.51, dsn=2.0.0, status=sent (250   Queued mail for delivery)Nov 10 14:21:06 domain postfix/qmgr[4185]: 9F19843285: removedAnything obvious I'm missing?
Hotmail not receiving emails from a script, but works from the server
scripting;python;smtp