dongyun7897 2010-07-05 09:19
浏览 55
已采纳

电邮服务器; 如何配置postfix以满足我的需求? (我需要SASL或/和TLS吗?)

I have a linux server, where I just installed postfix.

I have done nothing more with the email server config.

My website is a classifieds website, where users may put ads, delete ads etc etc. No login and no member functions at all.

Only place I need to use email is this:

  • When posting a new classified a confirmation email will be sent out
  • When deleting a classified a confirmation email will be sent out
  • When contacting the support
  • users are able to email the seller by clicking "email seller" and filling out a form.

My Q is, how should I configure Postfix?

Do I need SASL, and TLS? What else do I need to know?

Btw, PHP is used to mail...

  • 写回答

1条回答 默认 最新

  • doukang7858 2010-07-05 09:32
    关注

    This means postfix will only be used locally, so in order to be safe prevent outside users from contacting your mailer by configuring your firewall to block port 25 incoming.

    Edit postfix' main.cf and set the following, I think this should be enough to get you up and running. Make sure to study the other settings too if they also apply to your situation.

    # The inet_interfaces parameter specifies the network interface
    # addresses that this mail system receives mail on.  By default,
    # the software claims all active interfaces on the machine. The
    # parameter also controls delivery of mail to user@[ip.address].
    # 
    # See also the proxy_interfaces parameter, for network addresses that
    # are forwarded to us via a proxy or network address translator.
    #
    # Note: you need to stop/start Postfix when this parameter changes.
    #
    #inet_interfaces = all
    #inet_interfaces = $myhostname
    #inet_interfaces = $myhostname, localhost
    inet_interfaces = localhost
    
    # INTERNET HOST AND DOMAIN NAMES
    #
    # The myhostname parameter specifies the internet hostname of this
    # mail system. The default is to use the fully-qualified domain name
    # from gethostname(). $myhostname is used as a default value for many
    # other configuration parameters.
    # 
    #myhostname = host.domain.tld
    #myhostname = virtual.domain.tld
    
    # The mydomain parameter specifies the local internet domain name.
    # The default is to use $myhostname minus the first component.
    # $mydomain is used as a default value for many other configuration
    # parameters.
    #
    #mydomain = domain.tld
    
    # The relayhost parameter specifies the default host to send mail to
    # when no entry is matched in the optional transport(5) table. When
    # no relayhost is given, mail is routed directly to the destination.
    # 
    # On an intranet, specify the organizational domain name. If your
    # internal DNS uses no MX records, specify the name of the intranet
    # gateway host instead.
    #
    # In the case of SMTP, specify a domain, host, host:port, [host]:port,
    # [address] or [address]:port; the form [host] turns off MX lookups.
    # 
    # If you're connected via UUCP, see also the default_transport parameter.
    # 
    #relayhost = $mydomain
    #relayhost = [gateway.my.domain]
    #relayhost = [mailserver.isp.tld]
    #relayhost = uucphost
    #relayhost = [an.ip.add.ress]
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序