5.7.1从vb.net应用程序访问时拒绝中继访问

我正在开发一个vb.net的程序,它需要直接连接我的邮件服务器(后缀)发送电子邮件,将电子邮件发送到短信。 我的邮件服务器是正常工作,我没有任何问题,它的function(它发送和接收没有问题松鼠邮件)。 我也尝试了一个与http://www.nanogenesis.fr/ smtptesting,它报告同样的错误,我想这是我的后缀设置的问题。 我的应用程序正在运行代码(也可以轻松地运行身份validation):

'create the mail message Dim mail As New MailMessage() 'set the addresses mail.From = New MailAddress("[email protected]") mail.[To].Add("[email protected]") 'set the content mail.Subject = "Page" mail.Body = "this email is to test the paging system" 'set the server Dim smtp As New SmtpClient("fasttrackdispatch.com") Dim errmsg As String 'send the message Try smtp.Send(mail) Console.Write("Your Email has been sent sucessfully - Thank You") Catch exc As Exception errmsg = "Send failure: " & exc.ToString() End Try 

在我的软件方面,这似乎是工作,但电子邮件不发送,

mail.log文件状态

 Jan 22 18:53:54 localhost postfix/smtpd[14954]: connect from unknown[199.1.16.46] Jan 22 18:53:54 localhost postfix/smtpd[14954]: NOQUEUE: reject: RCPT from unknown[199.1.16.46]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<FCRA> Jan 22 18:53:55 localhost postfix/smtpd[14954]: lost connection after RCPT from unknown[199.1.16.46] Jan 22 18:53:55 localhost postfix/smtpd[14954]: disconnect from unknown[199.1.16.46] 

etc / postfix / main.cf是

 smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h readme_directory = /usr/share/doc/postfix # TLS parameters smtpd_tls_cert_file = /etc/postfix/smtpd.cert smtpd_tls_key_file = /etc/postfix/smtpd.key smtpd_use_tls = yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. myhostname = fasttrackdispatch.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = fasttrackdispatch.com, localhost, localhost.localdomain relayhost = mynetworks = 127.0.0.0/8 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all html_directory = /usr/share/doc/postfix/html virtual_alias_domains = virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf virtual_mailbox_base = /home/vmail virtual_uid_maps = static:5000 virtual_gid_maps = static:5000 smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtpd_sasl_authenticated_header = yes smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf virtual_maildir_extended = yes virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf virtual_mailbox_limit_override = yes virtual_maildir_limit_message = "The user you are trying to reach is over quota." virtual_overquota_bounce = yes proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps content_filter = amavis:[127.0.0.1]:10024 receive_override_options = no_address_mappings 

任何帮助表示赞赏

我认为发生了什么是后缀不知道它应该允许您的IP地址(199.1.16.46)中继。 这可能不是最好的解决scheme,但是你可以改变etc / postfix / main.cf中的mynetworks指令,如下所示:

 mynetworks = 127.0.0.0/8, 199.1.16.46/32 

然后重新启动postfix,看看是否使它performance更好。