smtp

Postfix的使用与分析

我们两清 提交于 2019-12-06 09:14:31
Postfix简介: 在IBM的GPL协议下开发的MTA(邮件传输代理)软件,Postfix更快更容易管理,更安全,同时与sendmail保持兼容。 官网地址:http://www.postfix.org/ 邮件服务器发信原理图: postfix构建组成图: 要点: Postfix mail queue(Postfix队列): 1 maildrop queue maildrop queue 是通过Postfix sendmail 命令发送但是还未被Postfix pickup 服务加到postfix 主队列的邮件所处的队列 2 hold queue smtpd access 策略或者是cleanup的检查可以将部分邮件长时间的放置在hold queue队列 3 incoming queue 所有进入postfix队列的邮件都会由cleanup放置到incoming queue里。 4 active queue 准备发送的邮件队列 瓶颈:CPU、I/O 5 deferred queue 一些发送失败的邮件队列 Postfix收件流程图: Postfix基本配置: Postfix的配置项大概有100个,所以这还真是个问题 1、myorigin 参数指明发件人所处的域 2、mydestination 参数指明Postfix接收邮件中收件人所处的域 3、myhostname

Problems with smtp via socks

 ̄綄美尐妖づ 提交于 2019-12-06 09:07:44
Since I did not find solution to the problem description here , I decided to use sysread and syswrite for dialog with smtp server. Below is my test code: sub test { my ($dbh) = @_; my $server = "smtp.mail.ru"; my $ip = $server; $ip = inet_aton($ip); $ip = inet_ntoa($ip); $ip = &ip2long($ip); my $port = 465; my $pid = 0; my $is_ssl = 1; my $answer; my $user = 'my_mail@mail.ru'; my $buff = 8192; if (&choose_proxy($ip, $port, $dbh, $pid)) { if (&connect($ip, $port, $is_ssl, $pid, $server)){ data_read($buff); my $ehlo = "ehlo mydomain.com\n"; data_send($ehlo); data_read($buff); my $auth = "auth

(perl Net::SMTP) authentication failure using gmail smtp server

≯℡__Kan透↙ 提交于 2019-12-06 09:07:26
I have written a perl script to send email using the gmail's smtp server: smtp.gmail.com - use Net::SMTP; my $smtp = Net::SMTP->new('smtp.gmail.com', Port=> 587, Timeout => 20, Hello=>'user@gmail.com' ); print $smtp->domain,"\n"; $sender = "user@gmail.com"; $password = "mypassword"; $smtp->auth ( $sender, $password ) or die "could not authenticate\n"; $receiver = "user@gmail.com"; $subject = "my custom subject"; $smtp->mail($sender); $smtp->to($receiver); $smtp->data(); $smtp->datasend("To: <$reciever> \n"); $smtp->datasend("From: <$sender> \n"); $smtp->datasend("Content-Type: text/html \n");

Java连载55-Mail编程

邮差的信 提交于 2019-12-06 08:56:56
一、电子邮件的历史 1.起源: 1969 Lenoard K. 教授发给同事的“LO” 1971 美国国防部自主的阿帕网(Arpanet)的通讯机制 通讯地址里用@ 1987年中国的第一份电子邮件 “Across the Great Wall we can reach every corner in the world" 2.管理程序 Euroda使邮件普及,Netscape,outlook,formail,后来居上;Hotmail使用浏览器发送邮件 3.​参考资料:https://docs.python.org/3/library/email.mime.html 4.邮件工作流程 MUA(MailUserAgent)邮件用户代理 MTA(MailTransferAgent)邮件传输代理 MDA(MailDeliveryAgent)邮件投递代理 laoshi@qq.com, 老师,北京海淀 xuesheng@sina.com, 学生,上海静安区 ​流程: (1)MUA-MTA ,邮件已经在服务器上了 (2)qq MTA-.........-sina MTA,邮件已经在新浪的服务器上 (3)sina MTA-sina MDA,此时邮件已经在你的邮箱上了 (4)sina MDA - MUA (Foxmail/Outlook),邮件下载到本地电脑 ​编写程序的过程: (1)​发送:MUA

send email C# using smtp server with username password authentification

百般思念 提交于 2019-12-06 08:29:27
I have a piece of code that sends email.. heres the code This is not working for me. This a remote smtp service ... and i double checked that email web access works fine .. i can login using the gui, recieve and send emails. But when i try to do it through code .. it fails with the message ... {System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 No AUTH command has been given. Can anybody advise ... and also they dont have EWS exposed ie.e exchange web service ./.. this is the way to go .. port is 25

Sending email with CodeIgniter using 'mail' or 'sendmail'

。_饼干妹妹 提交于 2019-12-06 08:25:34
问题 I built an intranet app that needs to send email (low volume). I will not be able to use the SMTP server of my organization, so I need to send these emails via sendmail or mail . However, when I config my email as: $config['protocol'] = 'sendmail'; I get: Exit status code: 127 Unable to open a socket to Sendmail. Please check settings. Unable to send email using PHP Sendmail. Your server might not be configured to send mail using this method. and when I use: $config['protocol'] = 'mail'; I

Sending an email programmatically through an SMTP server

孤者浪人 提交于 2019-12-06 08:15:03
问题 Trying to send an email through an SMTP server, but I'm getting a nondescript error on the smtp.Send(mail); snippet of code. Server side, the relay IP addresses look correct. Scratching my head about what I'm missing. MailMessage mail = new MailMessage(); mail.To.Add(txtEmail.Text); mail.From = new MailAddress("no-reply@company.us"); mail.Subject = "Thank you for your submission..."; mail.Body = "This is where the body text goes"; mail.IsBodyHtml = false; SmtpClient smtp = new SmtpClient();

Can't send emails with pyramid_mailer and gmail

拟墨画扇 提交于 2019-12-06 07:12:28
问题 I am trying to send emails from my pyramid website with my gmail smtp and the pyramid_mailer package. First of all, if anyone has another suggestion for an email solution, please let me know! I added the following to my dev.ini: mail.host = smtp.gmail.com mail.username = user@gmail.com mail.password = password mail.port = 465 mail.ssl = True And then I'm sending the message like so: config.registry['mailer'] = Mailer.from_settings(settings) and later... mailer = request.registry['mailer']

Python Smtp SSL wrong version on linux

天涯浪子 提交于 2019-12-06 06:09:15
My code to send emails via msft outlook.com works on windows but not on my linux box. Any idea how to fix this? import smtplib smtp = smtplib.SMTP('smtp.live.com', port=587) smtp.starttls() smtp.login(username, password) SMTPServerDisconnected: Connection unexpectedly closed: [Errno 1] _ssl.c:1359: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number EDIT: more details: gentoo linux with python 2.7.3, openssl 0.9.8x and 1.0.1c I bet the problem is on the other side of the wire. Hello, Microsoft! I've tried logging in a number of times, and you won't believe me, but some servers

Send-MailMessage closes every 2nd connection when using attachments

戏子无情 提交于 2019-12-06 05:50:12
I am attempting to write a powershell script to send email with a few attachments to 30 people. The emails are personalized, so they must be sent individually. The script works just fine without attachments. However, when using attachments, every other instance of Send-MailMessage fails with: Send-MailMessage : Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. It does not seem to matter how long I wait/pause between sending messages. Even if I wait several minutes, the first instance will always succeed, the next will fail, the