Cannot form correctly the FORM part of the header when sending mail

feedthetroll at gmx.de feedthetroll at gmx.de
Thu Sep 5 11:00:06 EDT 2013


Am Donnerstag, 5. September 2013 15:38:25 UTC+2 schrieb Ferrous Cranus:
> Στις 5/9/2013 4:29 μμ, ο/η feedthetroll έγραψε:
>>> uses DoveCot as enaled mail server but i have no idea how to
>>> setip up to work.
>>> i cannot connect to it via my python script.
>> OK, I should have been more exact:
>> To send mails you need a "smtp-server" (MTA - Mail Transfer Agent,
>> Message Transport Agent) like postfix, exim, sendmail, ...
>>
>> DoveCot is good for "reading" mail (="mailbox management", "pop3(s)",
>> "imap(s)"). You cannot send mails using DoveCot. (You can use a
>> WebMailService to access DoveCot for reading and a MTA for sending mails.)
>>
>> So you have to find out, which MTA you installed (you have root access,
>> don't you) and configure it.
>>
>> But this is (like so often) becoming extremely offtopic.
> 
> i as root just inatslled
> 
> sendmail and mailx. i have edited the ~/.mailrc to use:
>
> nikos at superhost.gr [~/www/cgi-bin]# cat ~/.mailrc
> account gmail {
> set smtp-use-starttls
> set smtp=smtp://smtp.gmail.com:587
> set smtp-auth=login
> set smtp-auth-user=may)gmail
> set smtp-auth-password=my_gmail_pass_not_stupid_enough_to_wite _it_again
> }
Don't use gmail. Gmail is the cause of your problem. As long as you use it (whatever way you use) the problem will persist. USE YOUR SENDMAIL.

> And now i'm trying  to:
> cmd = "echo %s | mailx -A gmail -r %s -s %s %s"  %  (MESSAGE, FROM, 
> SUBJECT, TO)
> p=subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE )
> output, errors = p.communicate()
> print( errors, output )
DONT INVOKE THIS VIA PYTHON. Use the shell. If it works there, you can try it with python.

> Any ideas please why this fails to work?
> while i remove the '-A gmail' string in the cmd line then i can send 
> fast mail but only to mail containing the @superhost.gr trail.
> i need to be eble to send to external mails to.
THIS IS NOT A SENDMAIL LIST!
Solve your sendmail-problem and then, if it still does not work from python come back with a smart question.

FUP: comp.mail.sendmail



More information about the Python-list mailing list