Re: Tryign to send mail via a python script by using the local MTA

2013-09-22 Thread alex23

On 21/09/2013 11:29 PM, William Ray Wing wrote:

Νίκος ,
   You CLEARLY don't understand.


Just a public service reminder that Nikos' behaviour is _consistently_ 
that of his prefered nom de plume:


Ferrous Cranus is utterly impervious to reason, persuasion and new 
ideas, and when engaged in battle he will not yield an inch in his 
position regardless of its hopelessness


http://www.politicsforum.org/images/flame_warriors/flame_62.php

--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-21 Thread Νίκος

On 18/9/2013 2:29 πμ, Dennis Lee Bieber wrote:

On Tue, 17 Sep 2013 18:17:43 +0300, Ferrous Cranus nikos.gr...@gmail.com
declaimed the following:


So cant this be done in python or not?
or is a mtetr of configuring the MTA? conf file?


You can't... Those headers get added by the ISP and any other host the
mail passes through.

The more you fake the originator IP/user the more the subsequent
servers will add flags that they can't confirm who sent the mail... And
eventually some filter may drop it as spam.

Υes Denis every foreign MTA adds headers as mail passes over it ( as 
proved to be done at least from the gmail's smtp)


But if we set up our local MTA to modify the headers, hostname, ip 
address, user) to our own likign then the local MTA will connect to the 
foreign MTA and passes it out modifed data , not the real one.


Ιsn't this possible? that is to fake our hostname and ip address?
--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-21 Thread William Ray Wing
On Sep 21, 2013, at 5:21 AM, Νίκος nikos.gr...@gmail.com wrote:

 On 18/9/2013 2:29 πμ, Dennis Lee Bieber wrote:
 On Tue, 17 Sep 2013 18:17:43 +0300, Ferrous Cranus nikos.gr...@gmail.com
 declaimed the following:
 
 So cant this be done in python or not?
 or is a mtetr of configuring the MTA? conf file?
 
  You can't... Those headers get added by the ISP and any other host the
 mail passes through.
 
  The more you fake the originator IP/user the more the subsequent
 servers will add flags that they can't confirm who sent the mail... And
 eventually some filter may drop it as spam.
 
 Υes Denis every foreign MTA adds headers as mail passes over it ( as proved 
 to be done at least from the gmail's smtp)
 
 But if we set up our local MTA to modify the headers, hostname, ip address, 
 user) to our own likign then the local MTA will connect to the foreign MTA 
 and passes it out modifed data , not the real one.
 
 Ιsn't this possible? that is to fake our hostname and ip address?
 -- 
 https://mail.python.org/mailman/listinfo/python-list

Νίκος ,
  You CLEARLY don't understand.  Please.  There are Mail headers and there are 
IP packet network headers.  They have to agree with each other or spam/malware 
alarms go off.  Even if you fake the mail headers, there is no way you can use 
fake IP packet headers, they are necessary for the underlying network hardware 
to work.

-Bill
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-20 Thread Antoon Pardon
Op 20-09-13 05:56, Jake Angulo schreef:
 Up Robert Kern's reply!
 
 I was waiting for smtplib http://docs.python.org/2/library/smtplib to
 be mentioned... finally!  Instead people simply answer philosophically.
  I dont want to judge whether OP is a troll or not - but i found a lot
 of arrogant replies here.

That is nice. You don't like to judge the OP but you seem to have no
trouble judging others

 I have also worked on an antispam project
 before, and see through the intents of the OP, but I do not pretend to
 be a moralist.

That doesn't sound right after you judged other replies to be arrogant.

 I was hoping we would strictly discuss code or software
 architecture here, not morality. Simple question, simple answer pls, in
 the interest of the Python list.

Well I was hoping, we wouldn't be plagued by trolls or help-vampires
or at least that other wouldn't (spoon) feed them. I guess we can
always hope.

 To the OP:  
 
 You might want to google smtplib, and use that instead of os calling a
 system command. Smtplib takes care of all the operating system's quirks
 for you, and still uses the os native sendmail program.

But that won't help in eliminating all the headers Nikos would like
to avoid. Like the receive line that will identify his host.

-- 
Antoon Pardon
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-20 Thread Robert Kern

On 2013-09-20 04:56, Jake Angulo wrote:

Up Robert Kern's reply!

I was waiting for smtplib http://docs.python.org/2/library/smtplib to be
mentioned... finally!  Instead people simply answer philosophically.  I dont
want to judge whether OP is a troll or not - but i found a lot of arrogant
replies here.  I have also worked on an antispam project before, and see through
the intents of the OP, but I do not pretend to be a moralist. I was hoping we
would strictly discuss code or software architecture here, not morality. Simple
question, simple answer pls, in the interest of the Python list.


Please don't valorize my message. I did neither Nikos nor the group any favors. 
I can only plead dizziness from the whooshing of Tim's sarcasm flying over 
Nikos' head.


--
Robert Kern

I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth.
  -- Umberto Eco

--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-20 Thread feedthetroll
Hi Jake!

Am Freitag, 20. September 2013 05:56:57 UTC+2 schrieb Jake Angulo:
 ...
 I was waiting for smtplib to be mentioned... finally!  Instead people simply
 answer philosophically.  I dont want to judge whether OP is a troll or not -
As you do not seem to know the histrory of this topic I will try to summarize 
(you can find the plethora of posts in the archive):
* Nikos tried to send mails using smtplib via gmail
* gmail did not allow him to use arbitrary FROM adresses (whatever FROM-header 
he used, gmail changed it to the e-mail of his account). evil, evil gmail ;-)
* He got many, many hints not to send via gmail but use his own MTA
* Nikos configured sendmail to relay mail VIA GMAIL (unfortunately that did not 
change anything)
* while using arbitrary things to find the reason (when you browse the archive 
you will learn, that nikos does not read postings or docs but uses some sort of 
artistic or random or just chaotic trial and error to solve his problems)
* ... he found some other headers he wants to falsify
* the only reference to python is, that he wants to use his python-cgi-scripts 
to change the mailheaders AFTER the mail left his relaying MTA and even after 
the mail arrives in the inbox of the recipient (received-by-headers, 
IP-Adresses, ...). The hints to read some docs about TCP/IP, SMTP, ... he 
ignores as he has to do see 
http://www.politicsforum.org/images/flame_warriors/flame_62.php (the original 
by mreed is not reachable today)

hth 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-19 Thread Jake Angulo
Up Robert Kern's reply!

I was waiting for smtplib http://docs.python.org/2/library/smtplib to be
mentioned... finally!  Instead people simply answer philosophically.  I
dont want to judge whether OP is a troll or not - but i found a lot of
arrogant replies here.  I have also worked on an antispam project before,
and see through the intents of the OP, but I do not pretend to be a
moralist. I was hoping we would strictly discuss code or software
architecture here, not morality. Simple question, simple answer pls, in the
interest of the Python list.

To the OP:

You might want to google smtplib, and use that instead of os calling a
system command. Smtplib takes care of all the operating system's quirks for
you, and still uses the os native sendmail program.

On the other hand, the way you are sending email is highly suspect, trying
to spoof a domain, random email address, etc.  It is not easy to fool most
modern email servers nowadays - especially gmail's.  They verify first that
the sending domain matches the IP of the sender.  And if you are trying to
do this - it is neither Python's nor the OS fault.

Happy coding!


On Tue, Sep 17, 2013 at 10:51 PM, Robert Kern robert.k...@gmail.com wrote:

 On 2013-09-17 13:11, Ferrous Cranus wrote:

  There are members here like Tim Chase who said that they find it
 interesting to
 be able to do what i proposed.


 No, he didn't. He was using sarcasm in a vain attempt to inspire you to
 search the Python documentation where you could easily find the standard
 SMTP library.

   
 http://docs.python.org/2/**library/smtplibhttp://docs.python.org/2/library/smtplib

 --
 Robert Kern

 I have come to believe that the whole world is an enigma, a harmless
 enigma
  that is made terrible by our own mad attempt to interpret it as though it
 had
  an underlying truth.
   -- Umberto Eco

 --
 https://mail.python.org/**mailman/listinfo/python-listhttps://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-18 Thread Dave Angel
On 18/9/2013 18:31, Dennis Lee Bieber wrote:

 On Tue, 17 Sep 2013 18:34:50 -0400, William Ray Wing w...@mac.com
 declaimed the following:



I think you need to read up on some of the most basic fundamentals of tcp/ip 
networking, i.e., the basis of the global internet.  EVERY network packet 
(and I do mean every) packet in an IP network carries both a source and a 
destination address in its header.  These are fundamentally necessary in 
order to allow the gateway router at the originating site to direct an 
outgoing packet to its destination, and allow the receiving host at the 
destination site to craft reply packets.


   Even worse -- IP packets are wrapped by Ethernet packets which use MAC
 addresses for direct routing between nodes... Granted, those MAC addresses
 may not propagate beyond the next defined gateway IP host, but they do
 (theoretically) identify the exact NIC that sent the packet.

Noting reliable about the MAC adress. Many systems permit or even
encourage spoofing.  And it gets overwritten at each hop, so the other
end cannot easily determine the number a client may have made up.

The first time I added a router to my cable modem, I had to tell it to
use (spoof) the old MAC address so that the cable modem didn't have to
be reprogrammed.

-- 
DaveA


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread feedthetroll
Am Dienstag, 17. September 2013 03:40:06 UTC+2 schrieb Tim Chase:
 On 2013-09-17 00:15, Ferrous Cranus wrote:
...
 But i wish to try it, is there a way to try to remove them?
 
 You could manage your own SMTP connection.  If only Python had some
 built in library that handled SMTP, that would be great!  Then you
 would be able to instantiate some SMTP object, connect to another
 server, optionally authenticating, then send mail, and close the
 connection.  That would be so awesome! :-D
Cool idea! But bad, bad GMail won't let me fake the FROM-Header. Bad, bad 
GMail. WHINE! ;-)
(Hey, we reached the start of the thread. Infinite loops are sooo cool ;-) )

 ... 

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 17.09.2013 01:41, schrieb Steven D'Aprano:
 I cannot fathom for the life of me a legitimate reason for your
 website to use a fake IP address and hostname when sending email.

In addition to that: it's amazing that Nikos thinks TCP will still
work in the presence of spoofed IP addresses. Email without TCP is a
challenge, at the least.

- -- 
- --- Heiko.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.20 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSODMPAAoJEDMqpHf921/SC0YH/3rCWDcX+rzJKonfeJXUYNxz
nbrBPDsoZf6xPh0socOn88TrzgbZewhWf2l3dHAPOKxTAwUWjRjygatTccBmZur9
6B+t410Nq7axz5+0jg4OwBSOQVt3jr0YInK3vWzq4nd0V0cHchvZzfrdSmnEloDU
V3wIPhBM7MEavyuvrxhutIM8DxA/0z6L/cLhwnpHfE6AxVMeGh/dHhGK9eaxJ03C
pfPWgb2fuCRHrOd3+cLUx3ZFF6YkK00PZzICFhkx236K8iaTvBgqIsod2tpyP6+t
H9qlXCfxit1d6nEzTJavx4suBGStcbhDr1C6VlDaPjfVH+w8842h/0QLhTsMXjY=
=K/XL
-END PGP SIGNATURE-
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Joel Goldstick
In honour of the value of mailing lists in general lets stop this thread
since once again the troll pattern repeats ad infinitum.

At least if you want to add to this nonsense, read each of the (several?)
dozen entries.

1. a seemingly earnest question is asked with something to do with python.
The question looks like it is from an very anxious novice
2. errors are pointed out in the sloppiness of the code and as an aside,
the value of code in general is questioned since it is based on assumptions
that are completely muddled, misunderstood
3. people start to laugh and grouse here we go again
4. The troll whines back that he asked a good and question and people are
being mean to him
5. He draws more people into the thread who feel bad he was maligned.
6. the thread seems to go on with some (faux) value as people probe the the
basis of the discussion further
7. The troll, ignores every single bit of useful information provided that
doesn't serve his interest in keeping this going by slightly altering the
questions, or posing new variants, or raising hair-brain notions.  In other
words he is not discussion his own question, he is TROLLING to keep the
thread alive.
8. Someone notices the cycle is complete.

Go back for a year to every question asked by the troll who goes by Nikos
or Ferrous, or 2 or three other email address (in the same thread!) and see
if any of them don't follow this pattern.  If you are new here and think
this guy is worth your time, you are wasting everyone's time and memory
space or disk space to add to these threads

Ok, I won't do it again.


On Tue, Sep 17, 2013 at 6:46 AM, Heiko Wundram modeln...@modelnine.orgwrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Am 17.09.2013 01:41, schrieb Steven D'Aprano:
  I cannot fathom for the life of me a legitimate reason for your
  website to use a fake IP address and hostname when sending email.

 In addition to that: it's amazing that Nikos thinks TCP will still
 work in the presence of spoofed IP addresses. Email without TCP is a
 challenge, at the least.

 - --
 - --- Heiko.
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v2.0.20 (MingW32)
 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

 iQEcBAEBAgAGBQJSODMPAAoJEDMqpHf921/SC0YH/3rCWDcX+rzJKonfeJXUYNxz
 nbrBPDsoZf6xPh0socOn88TrzgbZewhWf2l3dHAPOKxTAwUWjRjygatTccBmZur9
 6B+t410Nq7axz5+0jg4OwBSOQVt3jr0YInK3vWzq4nd0V0cHchvZzfrdSmnEloDU
 V3wIPhBM7MEavyuvrxhutIM8DxA/0z6L/cLhwnpHfE6AxVMeGh/dHhGK9eaxJ03C
 pfPWgb2fuCRHrOd3+cLUx3ZFF6YkK00PZzICFhkx236K8iaTvBgqIsod2tpyP6+t
 H9qlXCfxit1d6nEzTJavx4suBGStcbhDr1C6VlDaPjfVH+w8842h/0QLhTsMXjY=
 =K/XL
 -END PGP SIGNATURE-
 --
 https://mail.python.org/mailman/listinfo/python-list




-- 
Joel Goldstick
http://joelgoldstick.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Ferrous Cranus

Στις 17/9/2013 2:55 μμ, ο/η Joel Goldstick έγραψε:

In honour of the value of mailing lists in general lets stop this thread
since once again the troll pattern repeats ad infinitum.

At least if you want to add to this nonsense, read each of the
(several?) dozen entries.

1. a seemingly earnest question is asked with something to do with
python.  The question looks like it is from an very anxious novice
2. errors are pointed out in the sloppiness of the code and as an aside,
the value of code in general is questioned since it is based on
assumptions that are completely muddled, misunderstood
3. people start to laugh and grouse here we go again
4. The troll whines back that he asked a good and question and people
are being mean to him
5. He draws more people into the thread who feel bad he was maligned.
6. the thread seems to go on with some (faux) value as people probe the
the basis of the discussion further
7. The troll, ignores every single bit of useful information provided
that doesn't serve his interest in keeping this going by slightly
altering the questions, or posing new variants, or raising hair-brain
notions.  In other words he is not discussion his own question, he is
TROLLING to keep the thread alive.
8. Someone notices the cycle is complete.

Go back for a year to every question asked by the troll who goes by
Nikos or Ferrous, or 2 or three other email address (in the same
thread!) and see if any of them don't follow this pattern.  If you are
new here and think this guy is worth your time, you are wasting
everyone's time and memory space or disk space to add to these threads

Ok, I won't do it again.


Yes you are doing it.
I'm not trolling but trying to solve a specific question and i have 
provided code i wrote to do that and explained the reason of why i want 
it to work like this.

I wouldn't waste my time trying code so many days until i make it work.

If you want to think i'm trolling go ahead and do it but please do it in 
your own thread not messing up mines.


There are members here like Tim Chase who said that they find it 
interesting to be able to do what i proposed.


It's ok if you dont want to help, but spamming my thread with your 
trolling assumptions towards me is tiresome and if you gonna do it open 
do it at least in your own thread.


--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 17.09.2013 13:55, schrieb Joel Goldstick:
 At least if you want to add to this nonsense, read each of the
 (several?) dozen entries.

Actually, I have read each of the troll cycles (just as I read much of
clp, although I haven't participated much for the last five years),
and found most of them to be rather interesting reads (in their
digression from the original topic).

And: I actually find it rather valuable answering indirectly to things
noticed along the ride (or reading what other people answer
indirectly in the same manner) - see my post in this thread where I
pointed out that the original code actually does not sanitize inputs
to a shell command to send mail.

But, again, your impression may differ, and I can respect that.

- -- 
- --- Heiko.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.20 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSOEl/AAoJEDMqpHf921/SAJQIAI48Kzz0js1QqMDkotmMZfdE
XJYwsWlRXtaPhRy1VEGKHiSgCEd71/IVDUOPEv5TuJMy9zfsW1McexrYMW0NW63J
RiAlDmLSITfdPRYqPgmOTA4MqgJ3V2/oAzOpYXwPqs8Qdt92AX5Tr5itDFgua18T
TSdsD4gNudtIMUBkACzMjJKGyxrHvFFhGpUHlFh5swrZhflaGm1TuCWwz3ojTSbG
yoQRPe1ylSjcxkJesaKXR8mIaUMq4mrUaChBe+FwoCJXXs8kkX/EO3KULvKCxQGU
lzsom+b/eTaxB/ttyHwbt7QSsYq1ko2fIeqqDD/jmhTpg5gshOC+JHLs3bUkmMw=
=sTJq
-END PGP SIGNATURE-
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Robert Kern

On 2013-09-17 13:11, Ferrous Cranus wrote:


There are members here like Tim Chase who said that they find it interesting to
be able to do what i proposed.


No, he didn't. He was using sarcasm in a vain attempt to inspire you to search 
the Python documentation where you could easily find the standard SMTP library.


  http://docs.python.org/2/library/smtplib

--
Robert Kern

I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth.
  -- Umberto Eco

--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Antoon Pardon
Op 17-09-13 14:11, Ferrous Cranus schreef:

 Yes you are doing it.
 I'm not trolling but trying to solve a specific question and i have
 provided code i wrote to do that and explained the reason of why i want
 it to work like this.

No you haven't. You have given no explanation at all for why you want
to eliminate those headers.

Since those headers are added to ease finding the source of email abuse
I really am curious to know your motivation for wanting them removed.

 I wouldn't waste my time trying code so many days until i make it work.
 
 If you want to think i'm trolling go ahead and do it but please do it in
 your own thread not messing up mines.

You are incosiderate by messing up the python list with non python
questions. Yet you demand others to be considerate by not messing up
your thread. Well you can hope I guess.

 There are members here like Tim Chase who said that they find it
 interesting to be able to do what i proposed.

Tim Chase said no such thing.

 It's ok if you dont want to help, but spamming my thread with your
 trolling assumptions towards me is tiresome and if you gonna do it open
 do it at least in your own thread.

We find it tiresome that you keep coming here with non-python
questions. That doesn't seem to stop you. So why do you think it should
stop others?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Grant Edwards
On 2013-09-17, Heiko Wundram modeln...@modelnine.org wrote:

 Am 17.09.2013 01:41, schrieb Steven D'Aprano:
 I cannot fathom for the life of me a legitimate reason for your
 website to use a fake IP address and hostname when sending email.

 In addition to that: it's amazing that Nikos thinks TCP will still
 work in the presence of spoofed IP addresses. Email without TCP is a
 challenge, at the least.

Somehow I doubt Nikos is up to the task of settup up UUCP and a bank
of dial-up modems.  Even if he could manage it, there probably isn't
anybody to dial-up...

-- 
Grant Edwards   grant.b.edwardsYow! Where's SANDY DUNCAN?
  at   
  gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Ferrous Cranus

On 17/9/2013 1:46 μμ, Heiko Wundram wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 17.09.2013 01:41, schrieb Steven D'Aprano:

I cannot fathom for the life of me a legitimate reason for your
website to use a fake IP address and hostname when sending email.


In addition to that: it's amazing that Nikos thinks TCP will still
work in the presence of spoofed IP addresses. Email without TCP is a
challenge, at the least.

- --
- --- Heiko.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.20 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSODMPAAoJEDMqpHf921/SC0YH/3rCWDcX+rzJKonfeJXUYNxz
nbrBPDsoZf6xPh0socOn88TrzgbZewhWf2l3dHAPOKxTAwUWjRjygatTccBmZur9
6B+t410Nq7axz5+0jg4OwBSOQVt3jr0YInK3vWzq4nd0V0cHchvZzfrdSmnEloDU
V3wIPhBM7MEavyuvrxhutIM8DxA/0z6L/cLhwnpHfE6AxVMeGh/dHhGK9eaxJ03C
pfPWgb2fuCRHrOd3+cLUx3ZFF6YkK00PZzICFhkx236K8iaTvBgqIsod2tpyP6+t
H9qlXCfxit1d6nEzTJavx4suBGStcbhDr1C6VlDaPjfVH+w8842h/0QLhTsMXjY=
=K/XL
-END PGP SIGNATURE-


So cant this be done in python or not?
or is a mtetr of configuring the MTA? conf file?
--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Denis McMahon
On Tue, 17 Sep 2013 18:17:43 +0300, Ferrous Cranus wrote:

 So cant this be done in python or not?
 or is a mtetr of configuring the MTA? conf file?

Python can not control data that is added to the message after it has 
left the python program. If you want to retain maximum possible control 
of the mail process from within python, you need to use a python module 
that handles the smtp exchange with the destination mta, however even 
then you can not control the content of header lines added by that 
destination mta, which will invariably include the real[1] ip address of 
your system.

[1] The ip address that it is sending ack packets to as part of the smtp 
session, so unless you're using a proxy somewhere, this will be your 
system's ip address. Can't fake it. If the other system doesn't know your 
ip address, it can't send acks, and the tcp session fails.

-- 
Denis McMahon, denismfmcma...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Chris Angelico
On Wed, Sep 18, 2013 at 7:42 AM, Ferrous Cranus nikos.gr...@gmail.com wrote:
 So the foreign MTA tests for real time connectivity with the local MTA and
 it tries to detect a working host and ip address.

No, the local MTA connects to the foreign MTA.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Ferrous Cranus

On 17/9/2013 7:30 μμ, Denis McMahon wrote:

On Tue, 17 Sep 2013 18:17:43 +0300, Ferrous Cranus wrote:


So cant this be done in python or not?
or is a mtetr of configuring the MTA? conf file?


Python can not control data that is added to the message after it has
left the python program. If you want to retain maximum possible control
of the mail process from within python, you need to use a python module
that handles the smtp exchange with the destination mta, however even
then you can not control the content of header lines added by that
destination mta, which will invariably include the real[1] ip address of
your system.

[1] The ip address that it is sending ack packets to as part of the smtp
session, so unless you're using a proxy somewhere, this will be your
system's ip address. Can't fake it. If the other system doesn't know your
ip address, it can't send acks, and the tcp session fails.


Ah, now we are getting somewhere.

So the foreign MTA tests for real time connectivity with the local MTA 
and it tries to detect a working host and ip address.


So even if we alter the hostname and the ip address of our localhost 
then the smtp procedure will fail correct?

--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread William Ray Wing
On Sep 17, 2013, at 5:42 PM, Ferrous Cranus nikos.gr...@gmail.com wrote:

 On 17/9/2013 7:30 μμ, Denis McMahon wrote:
 On Tue, 17 Sep 2013 18:17:43 +0300, Ferrous Cranus wrote:
 
 So cant this be done in python or not?
 or is a mtetr of configuring the MTA? conf file?
 
 Python can not control data that is added to the message after it has
 left the python program. If you want to retain maximum possible control
 of the mail process from within python, you need to use a python module
 that handles the smtp exchange with the destination mta, however even
 then you can not control the content of header lines added by that
 destination mta, which will invariably include the real[1] ip address of
 your system.
 
 [1] The ip address that it is sending ack packets to as part of the smtp
 session, so unless you're using a proxy somewhere, this will be your
 system's ip address. Can't fake it. If the other system doesn't know your
 ip address, it can't send acks, and the tcp session fails.
 
 Ah, now we are getting somewhere.
 
 So the foreign MTA tests for real time connectivity with the local MTA and it 
 tries to detect a working host and ip address.
 
 So even if we alter the hostname and the ip address of our localhost then the 
 smtp procedure will fail correct?
 -- 
 https://mail.python.org/mailman/listinfo/python-list

I think you need to read up on some of the most basic fundamentals of tcp/ip 
networking, i.e., the basis of the global internet.  EVERY network packet (and 
I do mean every) packet in an IP network carries both a source and a 
destination address in its header.  These are fundamentally necessary in order 
to allow the gateway router at the originating site to direct an outgoing 
packet to its destination, and allow the receiving host at the destination site 
to craft reply packets.

-Bill
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Piet van Oostrum
Ferrous Cranus nikos.gr...@gmail.com writes:

 So cant this be done in python or not?
 or is a mtetr of configuring the MTA? conf file?

You could write a python program that uses Gmail's web interface. But it is 
tricky, and if Gmail would change its inyterface you get stuck, and have to do 
it again, risking that temporarily your email cannot be delivered.

I think you should give up this unholy idea, and just stick with the standard.
-- 
Piet van Oostrum p...@vanoostrum.org
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Denis McMahon
On Wed, 18 Sep 2013 00:42:22 +0300, Ferrous Cranus wrote:

 So the foreign MTA tests for real time connectivity with the local MTA
 and it tries to detect a working host and ip address.

No.

I strongly suggest that you stop trying to write software that transmits 
data across tcp/ip networks until you understand how tcp/ip networks 
function. This NG is not a networking for dummies course.

-- 
Denis McMahon, denismfmcma...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Ferrous Cranus

Στις 16/9/2013 4:52 πμ, ο/η Steven D'Aprano έγραψε:

Hi Nikos,

I'm now going to put as much care and attention into my answer as you put
into your question.

Have uy tryed imprting os first? u nmeed to do

improt os

first or it wont work.,


When you give evidence of caring about the questions you ask, I'll start
caring about the answers I give you.



On Sun, 15 Sep 2013 08:54:48 -0700, Ferrous Cranus wrote:


try:
# prepare mail data
FROM = random_char(10) + '@' + random_char(10) + '.com' TO =
nikos.gr...@gmail.com

SUBJECT = random_char( 50 )
MESSAGE = random_char( 500 )

   os.system( echo %s | mailx -v -r %s -s %s %s % (MESSAGE, FROM,
   SUBJECT, TO) )

print( h2font color=blue%sη αποστολή προς %s
επετεύχθη!/font/h2 % (times, TO) )
except Exception as e:
print( sendmail = , date, repr( sys.exc_info() ) )

sys.exit(0)






Steven of course i have imported the 'os' module.
I try to send mail from different FROM filed just like as a visitor 
guest will use the webform to compete his own email.


but since you ask here is the whole code with the function displayed too.

#=
# if html form is submitted then send user mail
#=
def random_char( y, chars=string.ascii_uppercase + string.digits ):
return ''.join( random.choice(chars) for x in range(y) )


for times in range(0, 1):
try:
# prepare mail data
FROM = random_char(10) + '@' + random_char(10) + '.com'
TO = nikos.gr...@gmail.com

SUBJECT = random_char( 50 )
MESSAGE = random_char( 500 )

		os.system( echo %s | mailx -v -r %s -s %s %s % (MESSAGE, FROM, 
SUBJECT, TO) )


		print( h2font color=blue%sη αποστολή προς %s 
επετεύχθη!/font/h2 % (times, TO) )

except Exception as e:
print( sendmail = , date, repr( sys.exc_info() ) )

sys.exit(0)
==


Is there a way to avoid the hostname and the ip address from being 
revealed when i'am sending an email?


Because the mails finally got delivered to my gmail account after many 
hours of delay, and in the headers they are detailes like hostname and 
ip address of my server which i dont want to be revealed.


i can alter FROM, TO, subject, message can i also alter the hostname fo 
the server the the mail derived from?


--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Antoon Pardon
Op 16-09-13 03:52, Steven D'Aprano schreef:
 Hi Nikos,
 
 I'm now going to put as much care and attention into my answer as you put 
 into your question.
 
 Have uy tryed imprting os first? u nmeed to do 
 
 improt os
 
 first or it wont work.,
 
 
 When you give evidence of caring about the questions you ask, I'll start 
 caring about the answers I give you.

And why do you find it necessary to impart your careless answer on the
list? If you find he doesn't show enough care about the questions he
asks, why don't you just ignore him, instead of showing us all that you
too can contribute in a careless manner?

-- 
Antoon Pardon
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Chris Angelico
On Mon, Sep 16, 2013 at 5:29 PM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
 Op 16-09-13 03:52, Steven D'Aprano schreef:
 Hi Nikos,

 I'm now going to put as much care and attention into my answer as you put
 into your question.

 Have uy tryed imprting os first? u nmeed to do

 improt os

 first or it wont work.,


 When you give evidence of caring about the questions you ask, I'll start
 caring about the answers I give you.

 And why do you find it necessary to impart your careless answer on the
 list? If you find he doesn't show enough care about the questions he
 asks, why don't you just ignore him, instead of showing us all that you
 too can contribute in a careless manner?

bceause its funnyer that way?

Also, how will other people learn that they should put some effort
into their questions? If people are only ever corrected privately,
nobody will learn from anyone else. Orders of magnitude more people
will read this than just the OP, which is why I still respond to jmf
about Unicode even though I know he isn't listening. It's worth it for
the hundreds (thousands? millions? Maybe even more?) of other people
who'll read and learn.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Chris Angelico
On Mon, Sep 16, 2013 at 5:29 PM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
 instead of showing us all that you
 too can contribute in a careless manner?

Also: It takes effort to contribute usefully in a way that looks
careless :) It's not saving effort, it's making a point.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Ferrous Cranus

Στις 16/9/2013 10:29 πμ, ο/η Antoon Pardon έγραψε:

Op 16-09-13 03:52, Steven D'Aprano schreef:

Hi Nikos,

I'm now going to put as much care and attention into my answer as you put
into your question.

Have uy tryed imprting os first? u nmeed to do

improt os

first or it wont work.,


When you give evidence of caring about the questions you ask, I'll start
caring about the answers I give you.


And why do you find it necessary to impart your careless answer on the
list? If you find he doesn't show enough care about the questions he
asks, why don't you just ignore him, instead of showing us all that you
too can contribute in a careless manner?


My question is not careless.
I have stated exactly the problem and shown relevant code of what i'm 
trying to accomplish.


1 have almost 10 responses and not even one of them is being a proper 
answer to my initial question.


My question is clear.
--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Antoon Pardon
Op 16-09-13 09:44, Chris Angelico schreef:
 On Mon, Sep 16, 2013 at 5:29 PM, Antoon Pardon
 antoon.par...@rece.vub.ac.be wrote:
 Op 16-09-13 03:52, Steven D'Aprano schreef:
 Hi Nikos,

 I'm now going to put as much care and attention into my answer as you put
 into your question.

 Have uy tryed imprting os first? u nmeed to do

 improt os

 first or it wont work.,


 When you give evidence of caring about the questions you ask, I'll start
 caring about the answers I give you.

 And why do you find it necessary to impart your careless answer on the
 list? If you find he doesn't show enough care about the questions he
 asks, why don't you just ignore him, instead of showing us all that you
 too can contribute in a careless manner?
 
 bceause its funnyer that way?

Funny for who? Personnaly I was rather amused by some of the reactions
that Nikos received and that were ill received by some people here.
So why should your of steve's fun trump my amusment?

 Also, how will other people learn that they should put some effort
 into their questions? If people are only ever corrected privately,
 nobody will learn from anyone else. Orders of magnitude more people
 will read this than just the OP,

I didn't complain about his respons being public.

-- 
Antoon Pardon
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Chris Angelico
On Mon, Sep 16, 2013 at 6:07 PM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
 Also, how will other people learn that they should put some effort
 into their questions? If people are only ever corrected privately,
 nobody will learn from anyone else. Orders of magnitude more people
 will read this than just the OP,

 I didn't complain about his respons being public.

http://www.catb.org/esr/faqs/smart-questions.html#not_losing

Sometimes, things are better said than not-said. In fact, that's
*often* true. Maybe it's unpleasant for the person the jab is aimed
at; maybe it feels awkward for you, as an onlooker. But for the good
of python-list, Nikos has to be told that putting minimal effort into
his questions is a bad thing, and if you're going to say that, may as
well say it in a funny way.

Plus, Steven was making a solid point, too. So if you want Nikos to be
ignored by anyone who can't be completely friendly, what you'll end
up with is materially less content on the list.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Antoon Pardon
Op 16-09-13 09:46, Chris Angelico schreef:
 On Mon, Sep 16, 2013 at 5:29 PM, Antoon Pardon
 antoon.par...@rece.vub.ac.be wrote:
 instead of showing us all that you
 too can contribute in a careless manner?
 
 Also: It takes effort to contribute usefully in a way that looks
 careless :) It's not saving effort, it's making a point.

So what? The end result is still a contribution that looks like
it was carelessly written.

Do you think making a point is an end that justifies any kind of
means? If not why do you argue in a way that suggest just that.
If yes, does that mean baiting Nikos is all right if it makes
a point, or responding somewhat obnoxious to him?

-- 
Antoon Pardon

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Chris Angelico
On Mon, Sep 16, 2013 at 6:12 PM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
 Op 16-09-13 09:46, Chris Angelico schreef:
 On Mon, Sep 16, 2013 at 5:29 PM, Antoon Pardon
 antoon.par...@rece.vub.ac.be wrote:
 instead of showing us all that you
 too can contribute in a careless manner?

 Also: It takes effort to contribute usefully in a way that looks
 careless :) It's not saving effort, it's making a point.

 So what? The end result is still a contribution that looks like
 it was carelessly written.

It's a contribution that SAYS that it looks carelessly written. I
think most people here are intelligent enough to know that that's
different from actual carelessness.

 Do you think making a point is an end that justifies any kind of
 means? If not why do you argue in a way that suggest just that.
 If yes, does that mean baiting Nikos is all right if it makes
 a point, or responding somewhat obnoxious to him?

In a debate, you make points and counterpoints. In most debates, you
also gain (or lose) points for style. Steven scored plenty of the
latter IMO. You're here making a straw-man and a false dichotomy; I
believe that making a point is sufficient justification for what
Steven and I did, but I don't think it justifies any kind of means.
I would not, for instance, destroy Nikos's server, data, or access to
either, to make a point; and history will confirm this.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Antoon Pardon
Op 16-09-13 10:19, Chris Angelico schreef:
 On Mon, Sep 16, 2013 at 6:12 PM, Antoon Pardon
 antoon.par...@rece.vub.ac.be wrote:
 Op 16-09-13 09:46, Chris Angelico schreef:
 On Mon, Sep 16, 2013 at 5:29 PM, Antoon Pardon
 antoon.par...@rece.vub.ac.be wrote:
 instead of showing us all that you
 too can contribute in a careless manner?

 Also: It takes effort to contribute usefully in a way that looks
 careless :) It's not saving effort, it's making a point.

 So what? The end result is still a contribution that looks like
 it was carelessly written.
 
 It's a contribution that SAYS that it looks carelessly written. I
 think most people here are intelligent enough to know that that's
 different from actual carelessness.

The question is, should they care about that difference. The end
result is a contribution that is just as hard to read.

 Do you think making a point is an end that justifies any kind of
 means? If not why do you argue in a way that suggest just that.
 If yes, does that mean baiting Nikos is all right if it makes
 a point, or responding somewhat obnoxious to him?
 
 In a debate, you make points and counterpoints. In most debates, you
 also gain (or lose) points for style. Steven scored plenty of the
 latter IMO.

And why should we accept you as the arbiter for this?

 You're here making a straw-man and a false dichotomy; I
 believe that making a point is sufficient justification for what
 Steven and I did, but I don't think it justifies any kind of means.

Then your argument was incomplete, because it just mentioned making
a point as if that in itself was sufficient.

 I would not, for instance, destroy Nikos's server, data, or access to
 either, to make a point; and history will confirm this.

No it doesn't.

-- 
Antoon Pardon

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Chris Angelico
On Mon, Sep 16, 2013 at 6:43 PM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
 Op 16-09-13 10:19, Chris Angelico schreef:
 It's a contribution that SAYS that it looks carelessly written. I
 think most people here are intelligent enough to know that that's
 different from actual carelessness.

 The question is, should they care about that difference. The end
 result is a contribution that is just as hard to read.

Is it, really? I throw the question open: Is it really just as
difficult to read a deliberately-pointed-out sloppiness as an actual
one? And is it as much of a problem to the list?

 In a debate, you make points and counterpoints. In most debates, you
 also gain (or lose) points for style. Steven scored plenty of the
 latter IMO.

 And why should we accept you as the arbiter for this?

We shouldn't. Style points are per-listener. In my eyes he did well.
You may well disagree.

 You're here making a straw-man and a false dichotomy; I
 believe that making a point is sufficient justification for what
 Steven and I did, but I don't think it justifies any kind of means.

 Then your argument was incomplete, because it just mentioned making
 a point as if that in itself was sufficient.

Context. Context. Context. Sufficient justification for what it was
used for. You do not seriously believe that that needs to be spelled
out?

 I would not, for instance, destroy Nikos's server, data, or access to
 either, to make a point; and history will confirm this.

 No it doesn't.

No? He gave me his root password - check the list archives. I did none
of the above three destructive actions (nor any other destructive
action), even though it would have made my point much stronger to do
so.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Antoon Pardon
Op 16-09-13 10:48, Chris Angelico schreef:
 On Mon, Sep 16, 2013 at 6:43 PM, Antoon Pardon
 antoon.par...@rece.vub.ac.be wrote:
 Op 16-09-13 10:19, Chris Angelico schreef:
 It's a contribution that SAYS that it looks carelessly written. I
 think most people here are intelligent enough to know that that's
 different from actual carelessness.

 The question is, should they care about that difference. The end
 result is a contribution that is just as hard to read.
 
 Is it, really? I throw the question open: Is it really just as
 difficult to read a deliberately-pointed-out sloppiness as an actual
 one? And is it as much of a problem to the list?

Do you think improt is easier to read when written so deliberatly
instead of out of carelessness?

 In a debate, you make points and counterpoints. In most debates, you
 also gain (or lose) points for style. Steven scored plenty of the
 latter IMO.

 And why should we accept you as the arbiter for this?
 
 We shouldn't. Style points are per-listener. In my eyes he did well.
 You may well disagree.

Why do you keep introducing your personal appreciations while at the
same time you admit they don't carry much weight.

 You're here making a straw-man and a false dichotomy; I
 believe that making a point is sufficient justification for what
 Steven and I did, but I don't think it justifies any kind of means.

 Then your argument was incomplete, because it just mentioned making
 a point as if that in itself was sufficient.
 
 Context. Context. Context. Sufficient justification for what it was
 used for. You do not seriously believe that that needs to be spelled
 out?

Your context adds nothing. The only thing that the context would add,
is that in this specific case you think that the end justifies the means
but it doesn't explain in any way on what grounds you think so. Those
that took Nikos to task earlier for his behaviour probably though their
end justified the means too.

So yes, if you don't want to give the impression that you are simply
ad hoccing what you personnally don't have a problem with, you'd
better spell a few things out.

 I would not, for instance, destroy Nikos's server, data, or access to
 either, to make a point; and history will confirm this.

 No it doesn't.
 
 No? He gave me his root password - check the list archives. I did none
 of the above three destructive actions (nor any other destructive
 action), even though it would have made my point much stronger to do
 so.

You behaved in a way some people clearly thought of a questionable. So
for those people you have established you are prepared to exhibit
questionable behaviour to make your point. So I think there are a
number of people who will think of you as not trustable enough to
withhold the behaviour in question here, when you think it would be
necessary to make your point.

-- 
Antoon Pardon

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Ferrous Cranus

Στις 16/9/2013 12:40 μμ, ο/η Antoon Pardon έγραψε:

Op 16-09-13 10:48, Chris Angelico schreef:

On Mon, Sep 16, 2013 at 6:43 PM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:

Op 16-09-13 10:19, Chris Angelico schreef:

It's a contribution that SAYS that it looks carelessly written. I
think most people here are intelligent enough to know that that's
different from actual carelessness.


The question is, should they care about that difference. The end
result is a contribution that is just as hard to read.


Is it, really? I throw the question open: Is it really just as
difficult to read a deliberately-pointed-out sloppiness as an actual
one? And is it as much of a problem to the list?


Do you think improt is easier to read when written so deliberatly
instead of out of carelessness?


In a debate, you make points and counterpoints. In most debates, you
also gain (or lose) points for style. Steven scored plenty of the
latter IMO.


And why should we accept you as the arbiter for this?


We shouldn't. Style points are per-listener. In my eyes he did well.
You may well disagree.


Why do you keep introducing your personal appreciations while at the
same time you admit they don't carry much weight.


You're here making a straw-man and a false dichotomy; I
believe that making a point is sufficient justification for what
Steven and I did, but I don't think it justifies any kind of means.


Then your argument was incomplete, because it just mentioned making
a point as if that in itself was sufficient.


Context. Context. Context. Sufficient justification for what it was
used for. You do not seriously believe that that needs to be spelled
out?


Your context adds nothing. The only thing that the context would add,
is that in this specific case you think that the end justifies the means
but it doesn't explain in any way on what grounds you think so. Those
that took Nikos to task earlier for his behaviour probably though their
end justified the means too.

So yes, if you don't want to give the impression that you are simply
ad hoccing what you personnally don't have a problem with, you'd
better spell a few things out.


I would not, for instance, destroy Nikos's server, data, or access to
either, to make a point; and history will confirm this.


No it doesn't.


No? He gave me his root password - check the list archives. I did none
of the above three destructive actions (nor any other destructive
action), even though it would have made my point much stronger to do
so.


You behaved in a way some people clearly thought of a questionable. So
for those people you have established you are prepared to exhibit
questionable behaviour to make your point. So I think there are a
number of people who will think of you as not trustable enough to
withhold the behaviour in question here, when you think it would be
necessary to make your point.


Look,

i want this to stop.
Open your own thread and discuss this if you like.
This is a thread i opened for a specific question and all i see its 
irrelevant answers.



--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Joost Molenaar
 Look,

 i want this to stop.
 Open your own thread and discuss this if you like.
 This is a thread i opened for a specific question and all i see its
 irrelevant answers.

Hi Ferrous,

The problem is not in your Python code. You can debug it from the
command line by typing the 'echo ... | mailx' command your Python code
is executing.

Somewhere on your local SMTP or on Google's SMTP, your message is not
being processed the way you want it. There are many things that could
cause this -- SPF, DKIM, reverse DNS not being correct, the From
address being 'faked', or one of about a hunderd other factors. It's
most likely an issue in your local SMTP server's configuration. You'll
have to dive into the logs and do some research on how SMTP works
nowadays to find out what's happening.

But think about this: if I could send mail as nikos.gr...@gmail.com,
just by typing a shell command, how could we ever trust e-mail to be
from who it really is? What if I send mail as
barack.ob...@whitehouse.gov? What you're doing may look like spam from
Google's point of view, and that's why I think you're not receiving
the message.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Denis McMahon
On Mon, 16 Sep 2013 12:06:06 +0200, Joost Molenaar wrote:

 It's most likely an issue in your local SMTP server's configuration.

I'm not convinced about that. All the evidence is that OPs local mta 
delivers the message to google. I think the issue is that google are 
deciding the message is junk and dropping it in the bit recycling bin.

This is just as likely to be a feature of the random_char(50) subject and 
random_char(500) message text as it is any local mta settings. I have no 
idea what OPs random_char(x) does, but I also see no proof it doesn't 
insert data that's illegal in subject or body. Even if it creates a 
wholly valid message subject and body, it might look like something spammy 
to google.

starttls suggests that whatever his mta is, it's using some form of auth 
to communicate with gmail. It looks like his mail is delivered to the 
google servers.

If he's trying to prove communication works, he might be better off using 
a message subject of test and a message body of this is a test 
message.

-- 
Denis McMahon, denismfmcma...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Ferrous Cranus

Στις 16/9/2013 2:21 μμ, ο/η Denis McMahon έγραψε:

On Mon, 16 Sep 2013 12:06:06 +0200, Joost Molenaar wrote:


It's most likely an issue in your local SMTP server's configuration.


I'm not convinced about that. All the evidence is that OPs local mta
delivers the message to google. I think the issue is that google are
deciding the message is junk and dropping it in the bit recycling bin.

This is just as likely to be a feature of the random_char(50) subject and
random_char(500) message text as it is any local mta settings. I have no
idea what OPs random_char(x) does, but I also see no proof it doesn't
insert data that's illegal in subject or body. Even if it creates a
wholly valid message subject and body, it might look like something spammy
to google.

starttls suggests that whatever his mta is, it's using some form of auth
to communicate with gmail. It looks like his mail is delivered to the
google servers.

If he's trying to prove communication works, he might be better off using
a message subject of test and a message body of this is a test
message.


Hello Denis and thanks for dropping into the conversation.

here is the code again with the random function definition:

# 
=

# if html form is submitted then send user mail
# 
=

def random_char( y, chars=string.ascii_uppercase + string.digits ):
return ''.join( random.choice(chars) for x in range(y) )


for times in range(0, 10):
try:
# prepare mail data
FROM = random_char(8) + '@' + random_char(5) + '.com'
TO = nkou...@ath.forthnet.gr

SUBJECT = random_char( 50 )
MESSAGE = random_char( 500 )

		os.system( echo %s | mailx -v -r %s -s %s %s % (MESSAGE, FROM, 
SUBJECT, TO) )


		print( h2font color=blue%sη αποστολή προς %s 
επετεύχθη!/font/h2 % (times, TO) )

except Exception as e:
print( sendmail = , date, repr( sys.exc_info() ) )

sys.exit(0)
=


i have sent 10 mails to my personal Google account and i though they 
were never get delivered but it seems that every half an hour or so, 
one-by-one come into appearance into my GMail account which i access via 
Thunderbird!


I don't know whats delaying them so long but they do come.

What i want now is to be able to alter the hostname of my server so the 
mails wont indicate that they derive from superhost.gr as they aare now 
sen in the mail headers.


I will show you an example when one more mail arrive into my gmail account.

--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 16.09.2013 13:21, schrieb Denis McMahon:
 If he's trying to prove communication works, he might be better off
 using a message subject of test and a message body of this is a
 test message.

Generally, he might be best off if he didn't use os.system() with
string-interpolated (without escaping or any such) and user-specified
(!) parameters to send out the mail using mailx though a sub-shell.

This begs of using his mailer script for code injection as his
web-server user, and I'm amazed that nobody has commented on that so far.

- -- 
- --- Heiko.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.20 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSNuxTAAoJEDMqpHf921/Sd8IH/2BcapK/dNqbs/PDz3LZLiUS
JYYmNaWSjui7KYJsA/A8R3XVaM0eyHkYI8dr8Jx6hPdPJyeE27MCKddF3GlYs17Z
iO1AydR2J8kYjXgVLrCWtfH3taB6ryUko6sOe1j/u0hYbQOATxuBPvxTVK4Wmi85
1m8unw9NvlTelAREg6WLudqpE9i115dns87+FTNcgNd3ieppJw+Cv2Mp6z3Yn3he
y0W9yMqH1LV4oW/6arZVVIcaWDHCb1I0L++aC8JLnOHYz1osf+34BbHHBcY6Qkty
reon+sWKwrlJ56o8Zi1Lx97ymxXxuvUtJS/5WGpRh/XLWYVBGCX3XA42DKqscQk=
=xENG
-END PGP SIGNATURE-
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 16.09.2013 13:37, schrieb Ferrous Cranus:
 What i want now is to be able to alter the hostname of my server so
 the mails wont indicate that they derive from superhost.gr as they
 aare now sen in the mail headers.

There is no way to do that, as the Received:-header which you complain
about is inserted by Google mail servers.

- -- 
- --- Heiko.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.20 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSNu8bAAoJEDMqpHf921/SFjwH/RXH79ynaWTkdeYWc3koAPvv
wQJKaiYy0FMJgV0JoZqWcg6xc/gEfoyBVvMlxTjSI9Jq44Ay6p3xYl4mCV9Oxplc
nx3SD8XKE6HV8H8cdUE+MAVxcI4mhz43so6yG7vWFJskuKZMC4zCwnP3F2Wt3zNK
EpgYyyKSCG+5KOhnOryw3lVQ0qlsqp02/cEQbn3iWtoe5ojh8qFr+bHL1vs02gtK
16YgKXre+69ne1hs4Hcyj1OKzYHU+YJmP6WTbdIXFXv1ujS3pf0vjpPWLX8f02Y1
n0HHBL0hWvm9+rbxYXera75jQUqY0v042fDjajhKNa/Sq36OBeoW6vt5hysDBxc=
=4HLT
-END PGP SIGNATURE-
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Ferrous Cranus

Στις 16/9/2013 2:44 μμ, ο/η Heiko Wundram έγραψε:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 16.09.2013 13:37, schrieb Ferrous Cranus:

What i want now is to be able to alter the hostname of my server so
the mails wont indicate that they derive from superhost.gr as they
aare now sen in the mail headers.


There is no way to do that, as the Received:-header which you complain
about is inserted by Google mail servers.


true.
Even if now i have stopped using Google's SMTP Server as a means for 
sending out mails and i have decided to use my local MTA instead, at the 
very moment Google's POP servers receive the mail they still add a 
RECEIVE header revealing the hostname of the server that initiated the 
contact. Correct?


But even so, if we alter for example the hostname of our server to a 
different name then wouldn't Google use that to identify the server thus 
protecting the real identity(hostname that is) of the server that 
initiated the connection?


--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 16.09.2013 14:11, schrieb Ferrous Cranus:
 But even so, if we alter for example the hostname of our server to
 a different name then wouldn't Google use that to identify the
 server thus protecting the real identity(hostname that is) of the
 server that initiated the connection?

Why on earth would you want to do that? Mail routing headers are there
for a reason.

- -- 
- --- Heiko.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.20 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSNvbTAAoJEDMqpHf921/SUMoH/2iX9pw0DiOWqHzAj1igbswY
tlQVigpz8eprFpsl84JW0+NAOFcpy65VdmwynJ57+qhHvChpdygGoNYjtStP37nF
oYbMNHs2gRA+dbhl3xxjedGgIzQinGM7aiy+7ZGU/KIGHorMykV0eUDQaObklFNb
oepbNMu1yo2U2PWyBHxlH8iehyECFdeKfLRJX6YrkT5jSS7EKKn6UuaCLKRMYJNN
sClGe4J5x5GnIsPtPSWK73rdmYtY/vLmM9P4tDKCBAJvdW5nU52EXLlMNzWu8lPS
wvg6bor1/meYPxfzIcmIvKTiYZ+omkmQ8iPkOGEupPCKp8SRB9J2iq8nQA0mYo4=
=1cDc
-END PGP SIGNATURE-
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Antoon Pardon
Op 16-09-13 14:11, Ferrous Cranus schreef:
 Στις 16/9/2013 2:44 μμ, ο/η Heiko Wundram έγραψε:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Am 16.09.2013 13:37, schrieb Ferrous Cranus:
 What i want now is to be able to alter the hostname of my server so
 the mails wont indicate that they derive from superhost.gr as they
 aare now sen in the mail headers.

 There is no way to do that, as the Received:-header which you complain
 about is inserted by Google mail servers.
 
 true.
 Even if now i have stopped using Google's SMTP Server as a means for
 sending out mails and i have decided to use my local MTA instead, at the
 very moment Google's POP servers receive the mail they still add a
 RECEIVE header revealing the hostname of the server that initiated the
 contact. Correct?
 
 But even so, if we alter for example the hostname of our server to a
 different name then wouldn't Google use that to identify the server thus
 protecting the real identity(hostname that is) of the server that
 initiated the connection?

No, google will probably find out that the name your server identifies
with, will not correspond with the IP address it is connected to and
will write a receive line that will reflect that fact, using reverse
DNS to report the real hostname of your computer.

-- 
Antoon Pardon

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Ferrous Cranus

Στις 16/9/2013 3:56 μμ, ο/η Antoon Pardon έγραψε:

Op 16-09-13 14:11, Ferrous Cranus schreef:

Στις 16/9/2013 2:44 μμ, ο/η Heiko Wundram έγραψε:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 16.09.2013 13:37, schrieb Ferrous Cranus:

What i want now is to be able to alter the hostname of my server so
the mails wont indicate that they derive from superhost.gr as they
aare now sen in the mail headers.


There is no way to do that, as the Received:-header which you complain
about is inserted by Google mail servers.


true.
Even if now i have stopped using Google's SMTP Server as a means for
sending out mails and i have decided to use my local MTA instead, at the
very moment Google's POP servers receive the mail they still add a
RECEIVE header revealing the hostname of the server that initiated the
contact. Correct?

But even so, if we alter for example the hostname of our server to a
different name then wouldn't Google use that to identify the server thus
protecting the real identity(hostname that is) of the server that
initiated the connection?


No, google will probably find out that the name your server identifies
with, will not correspond with the IP address it is connected to and
will write a receive line that will reflect that fact, using reverse
DNS to report the real hostname of your computer.


We need to try it to see if it will work, or perhaps we can alter both 
the hostname and ip address variables on the server to some other values 
so that google will use them too.


It will not detect the real hostname or the real ip this way since both 
values will be not true.


--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Ferrous Cranus

Στις 16/9/2013 3:56 μμ, ο/η Antoon Pardon έγραψε:

Op 16-09-13 14:11, Ferrous Cranus schreef:

Στις 16/9/2013 2:44 μμ, ο/η Heiko Wundram έγραψε:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 16.09.2013 13:37, schrieb Ferrous Cranus:

What i want now is to be able to alter the hostname of my server so
the mails wont indicate that they derive from superhost.gr as they
aare now sen in the mail headers.


There is no way to do that, as the Received:-header which you complain
about is inserted by Google mail servers.


true.
Even if now i have stopped using Google's SMTP Server as a means for
sending out mails and i have decided to use my local MTA instead, at the
very moment Google's POP servers receive the mail they still add a
RECEIVE header revealing the hostname of the server that initiated the
contact. Correct?

But even so, if we alter for example the hostname of our server to a
different name then wouldn't Google use that to identify the server thus
protecting the real identity(hostname that is) of the server that
initiated the connection?


No, google will probably find out that the name your server identifies
with, will not correspond with the IP address it is connected to and
will write a receive line that will reflect that fact, using reverse
DNS to report the real hostname of your computer.

Τhis si the headers i would like to delete because i dont want them to 
be used when sending mail:


X-AntiAbuse: This header was added to track abuse, please include it 
with any abuse report

X-AntiAbuse: Primary Hostname - my.superhost.gr
X-AntiAbuse: Original Domain - superhost.gr
X-AntiAbuse: Originator/Caller UID/GID - [500 501] / [47 12]
X-AntiAbuse: Sender Address Domain - mail.org
X-Get-Message-Sender-Via: my.superhost.gr: authenticated_id: nikos/only 
user confirmed/virtual account not confirmed


Can these be remoevd when i send mail?
--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Ferrous Cranus

Στις 16/9/2013 7:15 μμ, ο/η Ferrous Cranus έγραψε:

Στις 16/9/2013 3:56 μμ, ο/η Antoon Pardon έγραψε:

Op 16-09-13 14:11, Ferrous Cranus schreef:

Στις 16/9/2013 2:44 μμ, ο/η Heiko Wundram έγραψε:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 16.09.2013 13:37, schrieb Ferrous Cranus:

What i want now is to be able to alter the hostname of my server so
the mails wont indicate that they derive from superhost.gr as they
aare now sen in the mail headers.


There is no way to do that, as the Received:-header which you complain
about is inserted by Google mail servers.


true.
Even if now i have stopped using Google's SMTP Server as a means for
sending out mails and i have decided to use my local MTA instead, at the
very moment Google's POP servers receive the mail they still add a
RECEIVE header revealing the hostname of the server that initiated the
contact. Correct?

But even so, if we alter for example the hostname of our server to a
different name then wouldn't Google use that to identify the server thus
protecting the real identity(hostname that is) of the server that
initiated the connection?


No, google will probably find out that the name your server identifies
with, will not correspond with the IP address it is connected to and
will write a receive line that will reflect that fact, using reverse
DNS to report the real hostname of your computer.


Τhis si the headers i would like to delete because i dont want them to
be used when sending mail:

X-AntiAbuse: This header was added to track abuse, please include it
with any abuse report
X-AntiAbuse: Primary Hostname - my.superhost.gr
X-AntiAbuse: Original Domain - superhost.gr
X-AntiAbuse: Originator/Caller UID/GID - [500 501] / [47 12]
X-AntiAbuse: Sender Address Domain - mail.org
X-Get-Message-Sender-Via: my.superhost.gr: authenticated_id: nikos/only
user confirmed/virtual account not confirmed

Can these be remoevd when i send mail?


and this too:

Received: from nikos by my.superhost.gr with local (Exim 4.80.1)
(envelope-from i6zkg...@mail.org)
id 1VLam4-0004nG-TJ

I wish this not to be displayed.
--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread William Ray Wing
On Sep 16, 2013, at 12:15 PM, Ferrous Cranus nikos.gr...@gmail.com wrote:

 Στις 16/9/2013 3:56 μμ, ο/η Antoon Pardon έγραψε:
 Op 16-09-13 14:11, Ferrous Cranus schreef:
 Στις 16/9/2013 2:44 μμ, ο/η Heiko Wundram έγραψε:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Am 16.09.2013 13:37, schrieb Ferrous Cranus:
 What i want now is to be able to alter the hostname of my server so
 the mails wont indicate that they derive from superhost.gr as they
 aare now sen in the mail headers.
 
 There is no way to do that, as the Received:-header which you complain
 about is inserted by Google mail servers.
 
 true.
 Even if now i have stopped using Google's SMTP Server as a means for
 sending out mails and i have decided to use my local MTA instead, at the
 very moment Google's POP servers receive the mail they still add a
 RECEIVE header revealing the hostname of the server that initiated the
 contact. Correct?
 
 But even so, if we alter for example the hostname of our server to a
 different name then wouldn't Google use that to identify the server thus
 protecting the real identity(hostname that is) of the server that
 initiated the connection?
 
 No, google will probably find out that the name your server identifies
 with, will not correspond with the IP address it is connected to and
 will write a receive line that will reflect that fact, using reverse
 DNS to report the real hostname of your computer.
 
 Τhis si the headers i would like to delete because i dont want them to be 
 used when sending mail:
 
 X-AntiAbuse: This header was added to track abuse, please include it with any 
 abuse report
 X-AntiAbuse: Primary Hostname - my.superhost.gr
 X-AntiAbuse: Original Domain - superhost.gr
 X-AntiAbuse: Originator/Caller UID/GID - [500 501] / [47 12]
 X-AntiAbuse: Sender Address Domain - mail.org
 X-Get-Message-Sender-Via: my.superhost.gr: authenticated_id: nikos/only user 
 confirmed/virtual account not confirmed
 
 Can these be remoevd when i send mail?
 -- 
 https://mail.python.org/mailman/listinfo/python-list

You realize that removing those headers will, in all likelihood, make Google 
reject your mail and refuse to either forward or deliver it.  They have been 
added to reduce spam, and the more you attempt to obfuscate your header 
information, the more you make your mail look exactly like spam.

-Bill
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Denis McMahon
On Mon, 16 Sep 2013 19:23:15 +0300, Ferrous Cranus wrote:

 Τhis si the headers i would like to delete because i dont want them to
 be used when sending mail:

 X-AntiAbuse: ...

 and this too:

 Received:  ..

This is probably your mta, not python, see your mta config. OFF TOPIC IN 
comp.lang.python

-- 
Denis McMahon, denismfmcma...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Denis McMahon
On Mon, 16 Sep 2013 18:02:20 +0300, Ferrous Cranus wrote:

 We need to try it to see if it will work, or perhaps we can alter both
 the hostname and ip address variables on the server to some other values
 so that google will use them too.
 
 It will not detect the real hostname or the real ip this way since both
 values will be not true.

It may however detect that your are presenting an ip and or hostname that 
does not match the host you are connecting with, and increase the spf 
score on the messages to the point that the messages get rejected either 
in the google mta or downstream due to their spf score.

-- 
Denis McMahon, denismfmcma...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Joel Goldstick
On Mon, Sep 16, 2013 at 3:09 PM, Denis McMahon denismfmcma...@gmail.comwrote:

 On Mon, 16 Sep 2013 18:02:20 +0300, Ferrous Cranus wrote:

  We need to try it to see if it will work, or perhaps we can alter both
  the hostname and ip address variables on the server to some other values
  so that google will use them too.
 
  It will not detect the real hostname or the real ip this way since both
  values will be not true.

 It may however detect that your are presenting an ip and or hostname that
 does not match the host you are connecting with, and increase the spf
 score on the messages to the point that the messages get rejected either
 in the google mta or downstream due to their spf score.

 --
 Denis McMahon, denismfmcma...@gmail.com
 --
 https://mail.python.org/mailman/listinfo/python-list


Nikos,

You have to start with a historical perspective.  Email was very open in
the beginning of the internet.  Before there were bad actors.  Since that
time, email has become the internet service most used for bad purposes, to
deliver bad payloads, spoof people into visiting fake websites to induce
them to give away private information, etc.  So, the email services have
gotten more particular about what they deem safe email in lots of different
ways.  If you want to do these various odd and misleading things to the
emails you send out, you will have to understand how to 'beat the systems'
that have been employed to stop that stuff.

Having read your questions here for the last year(s) I don't believe this
is an area in which you excel.  You always want quick answers to questions
that often show your complete lack basic understanding of the question
domain.   If you really want to plod along with this email spoofing, why
not take a couple of weeks to read all about how email works on the
internet, how email has been used to deliver viruses and spoofing schemes.
  After you understand that stuff well enough to show your competence in a
forum where there are other email experts, as your questions there.   As
has been pointed out by several people here, your questions are not python
language issues, they are issues relating to how email protocols work.  So,
study up and go to an email experts group and good luck!


-- 
Joel Goldstick
http://joelgoldstick.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Ferrous Cranus

Στις 16/9/2013 8:53 μμ, ο/η William Ray Wing έγραψε:

On Sep 16, 2013, at 12:15 PM, Ferrous Cranus nikos.gr...@gmail.com wrote:


Στις 16/9/2013 3:56 μμ, ο/η Antoon Pardon έγραψε:

Op 16-09-13 14:11, Ferrous Cranus schreef:

Στις 16/9/2013 2:44 μμ, ο/η Heiko Wundram έγραψε:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Am 16.09.2013 13:37, schrieb Ferrous Cranus:

What i want now is to be able to alter the hostname of my server so
the mails wont indicate that they derive from superhost.gr as they
aare now sen in the mail headers.


There is no way to do that, as the Received:-header which you complain
about is inserted by Google mail servers.


true.
Even if now i have stopped using Google's SMTP Server as a means for
sending out mails and i have decided to use my local MTA instead, at the
very moment Google's POP servers receive the mail they still add a
RECEIVE header revealing the hostname of the server that initiated the
contact. Correct?

But even so, if we alter for example the hostname of our server to a
different name then wouldn't Google use that to identify the server thus
protecting the real identity(hostname that is) of the server that
initiated the connection?


No, google will probably find out that the name your server identifies
with, will not correspond with the IP address it is connected to and
will write a receive line that will reflect that fact, using reverse
DNS to report the real hostname of your computer.


Τhis si the headers i would like to delete because i dont want them to be used 
when sending mail:

X-AntiAbuse: This header was added to track abuse, please include it with any 
abuse report
X-AntiAbuse: Primary Hostname - my.superhost.gr
X-AntiAbuse: Original Domain - superhost.gr
X-AntiAbuse: Originator/Caller UID/GID - [500 501] / [47 12]
X-AntiAbuse: Sender Address Domain - mail.org
X-Get-Message-Sender-Via: my.superhost.gr: authenticated_id: nikos/only user 
confirmed/virtual account not confirmed

Can these be remoevd when i send mail?
--
https://mail.python.org/mailman/listinfo/python-list


You realize that removing those headers will, in all likelihood, make Google 
reject your mail and refuse to either forward or deliver it.  They have been 
added to reduce spam, and the more you attempt to obfuscate your header 
information, the more you make your mail look exactly like spam.

-Bill


But i wish to try it, is there a way to try to remove them?

For starters, does my MTA add them as additional headers to my mail or 
Google adds them by default ?

--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Ferrous Cranus

Στις 16/9/2013 10:09 μμ, ο/η Denis McMahon έγραψε:

On Mon, 16 Sep 2013 18:02:20 +0300, Ferrous Cranus wrote:


We need to try it to see if it will work, or perhaps we can alter both
the hostname and ip address variables on the server to some other values
so that google will use them too.

It will not detect the real hostname or the real ip this way since both
values will be not true.


It may however detect that your are presenting an ip and or hostname that
does not match the host you are connecting with, and increase the spf
score on the messages to the point that the messages get rejected either
in the google mta or downstream due to their spf score.



We have to try it to know for sure.

For example do ou know how can a later the hostname the MTA uses to 
identify the server?

--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Steven D'Aprano
On Mon, 16 Sep 2013 18:02:20 +0300, Ferrous Cranus wrote:

 We need to try it to see if it will work, or perhaps we can alter both
 the hostname and ip address variables on the server to some other values
 so that google will use them too.
 
 It will not detect the real hostname or the real ip this way since both
 values will be not true.


Are you planning on sending spam? Or some other criminal activity?

I cannot fathom for the life of me a legitimate reason for your website 
to use a fake IP address and hostname when sending email.



-- 
Steven
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Tim Chase
On 2013-09-17 00:15, Ferrous Cranus wrote:
 X-AntiAbuse: This header was added to track abuse, please include
 it with any abuse report X-AntiAbuse: Primary Hostname -
 my.superhost.gr
 X-AntiAbuse: Original Domain - superhost.gr
 X-AntiAbuse: Originator/Caller UID/GID - [500 501] / [47 12]
 X-AntiAbuse: Sender Address Domain - mail.org
 X-Get-Message-Sender-Via: my.superhost.gr: authenticated_id:
 nikos/only user confirmed/virtual account not confirmed
 
 For starters, does my MTA add them as additional headers to my mail
 or Google adds them by default ?

Given that there are headers in there that know about your UID/GID, it
has to be a locally-running process that adds them.  No remote server
(even as powerful as Gmail is) should/can know this legitimately
without being told.  Thus, it's clearly your local MTA.

 But i wish to try it, is there a way to try to remove them?

You could manage your own SMTP connection.  If only Python had some
built in library that handled SMTP, that would be great!  Then you
would be able to instantiate some SMTP object, connect to another
server, optionally authenticating, then send mail, and close the
connection.  That would be so awesome! :-D

-tkc



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-15 Thread Joost Molenaar
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 nikos.gr...@gmail.com wrote:
 try:
 # prepare mail data
 FROM = random_char(10) + '@' + random_char(10) + '.com'
 TO = nikos.gr...@gmail.com

 SUBJECT = random_char( 50 )
 MESSAGE = random_char( 500 )

   os.system( echo %s | mailx -v -r %s -s %s %s % (MESSAGE, FROM, SUBJECT, 
 TO) )

 print( h2font color=blue%sη αποστολή προς %s επετεύχθη!/font/h2 % 
 (times, TO) )
 except Exception as e:
 print( sendmail = , date, repr( sys.exc_info() ) )

 sys.exit(0)

 
 

 I'am still trying to send successfulyl a mail through my local host by using 
 the local MTA, trying to avoid using GMail's SMTP server but the mail never 
 gets send

 this is the error message:

 [code]
 ni...@superhost.gr [~/www/cgi-bin]# python mail.py
 LOG: MAIN
   cwd=/home/nikos/public_html/cgi-bin 6 args: send-mail -i -v -r 
 zyn1kgs...@jrv0cei7tx.com nikos.gr...@gmail.com
 LOG: MAIN
   = zyn1kgs...@jrv0cei7tx.com U=nikos P=local S=1052 
 id=5235d7f5.bzp0tuy4zqeop7dh%zyn1kgs...@jrv0cei7tx.com 
 T=QOU0ULMZBF7RGG7B260YERPPXXLTVQ9WKJ93ZXYABQNNA0XB9I
 Content-type: text/html; charset=utf-8

 h2font color=blue0η αποστολή προς nikos.gr...@gmail.com 
 επετεύχθη!/font/h2
 LOG: MAIN
   cwd=/var/spool/exim 4 args: /usr/sbin/exim -v -Mc 1VLEdZ-0001Xg-6b
 delivering 1VLEdZ-0001Xg-6b
 ni...@superhost.gr [~/www/cgi-bin]# LOG: MAIN
   SMTP connection outbound 1379260405 1VLEdZ-0001Xg-6b superhost.gr 
 nikos.gr...@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:zyn1kgs...@jrv0cei7tx.com SIZE=2090
   SMTP 250 2.1.0 OK e49si15825947eep.141 - gsmtp
   SMTP RCPT TO:nikos.gr...@gmail.com
   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
   = nikos.gr...@gmail.com R=lookuphost T=remote_smtp 
 H=gmail-smtp-in.l.google.com [173.194.70.26] X=TLSv1: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
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-15 Thread SuperHost - Nikos

Στις 15/9/2013 9:59 μμ, ο/η Joost Molenaar έγραψε:

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.


How can i fix this please?
--
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-15 Thread Chris Angelico
On Mon, Sep 16, 2013 at 1:54 AM, Ferrous Cranus nikos.gr...@gmail.com wrote:
 Since all looks okey why the mail never gets delivered?

This is not a Python question. If it were, I would be asking how
you're getting _anywhere_ with that code, which appears to have
IndentationErrors in it.

You're also using os.system() with interpolated content. What
_exactly_ is random_char() able to return? Is it possible for it to do
the wrong thing there?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-15 Thread Joel Goldstick
On Sun, Sep 15, 2013 at 5:31 PM, Chris Angelico ros...@gmail.com wrote:

 On Mon, Sep 16, 2013 at 1:54 AM, Ferrous Cranus nikos.gr...@gmail.com
 wrote:
  Since all looks okey why the mail never gets delivered?

 This is not a Python question. If it were, I would be asking how
 you're getting _anywhere_ with that code, which appears to have
 IndentationErrors in it.


 ChrisA
 --
 https://mail.python.org/mailman/listinfo/python-list


This questions sounds like it should be asked of your hosting company.
They may not allow there servers to be used this way.  What have they told
you?


-- 
Joel Goldstick
http://joelgoldstick.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tryign to send mail via a python script by using the local MTA

2013-09-15 Thread Steven D'Aprano
Hi Nikos,

I'm now going to put as much care and attention into my answer as you put 
into your question.

Have uy tryed imprting os first? u nmeed to do 

improt os

first or it wont work.,


When you give evidence of caring about the questions you ask, I'll start 
caring about the answers I give you.



On Sun, 15 Sep 2013 08:54:48 -0700, Ferrous Cranus wrote:

 try:
   # prepare mail data
   FROM = random_char(10) + '@' + random_char(10) + '.com' TO =
   nikos.gr...@gmail.com
   
   SUBJECT = random_char( 50 )
   MESSAGE = random_char( 500 )
   
   os.system( echo %s | mailx -v -r %s -s %s %s % (MESSAGE, FROM,
   SUBJECT, TO) )
 
 print( h2font color=blue%sη αποστολή προς %s
 επετεύχθη!/font/h2 % (times, TO) )
   except Exception as e:
   print( sendmail = , date, repr( sys.exc_info() ) )
 
 sys.exit(0)




-- 
Steven
-- 
https://mail.python.org/mailman/listinfo/python-list