免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 15950 | 回复: 6
打印 上一主题 下一主题

[Mail] 请问postfix发邮件提示relay access denied的问题? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-01-24 14:20 |只看该作者 |倒序浏览
各位朋友好,我请教个问题,本人用Redhat as 5 + postfix +Dovecot 建了一个邮件服务器。在用smtp发邮件时的示relay access denied,用pop3收邮件的时候Internal login failure.不知道是什么原因?请各位高手给分析一下。我试向在本域或外域发送都发不出去,下面我附上我postfix配置文件。

  1. # Global Postfix configuration file. This file lists only a subset
  2. # of all parameters. For the syntax, and for a complete parameter
  3. # list, see the postconf(5) manual page (command: "man 5 postconf").
  4. #
  5. # For common configuration examples, see BASIC_CONFIGURATION_README
  6. # and STANDARD_CONFIGURATION_README. To find these documents, use
  7. # the command "postconf html_directory readme_directory", or go to
  8. # http://www.postfix.org/.
  9. #
  10. # For best results, change no more than 2-3 parameters at a time,
  11. # and test if Postfix still works after every change.
  12. # SOFT BOUNCE
  13. #
  14. # The soft_bounce parameter provides a limited safety net for
  15. # testing.  When soft_bounce is enabled, mail will remain queued that
  16. # would otherwise bounce. This parameter disables locally-generated
  17. # bounces, and prevents the SMTP server from rejecting mail permanently
  18. # (by changing 5xx replies into 4xx replies). However, soft_bounce
  19. # is no cure for address rewriting mistakes or mail routing mistakes.
  20. #
  21. #soft_bounce = no
  22. # LOCAL PATHNAME INFORMATION
  23. #
  24. # The queue_directory specifies the location of the Postfix queue.
  25. # This is also the root directory of Postfix daemons that run chrooted.
  26. # See the files in examples/chroot-setup for setting up Postfix chroot
  27. # environments on different UNIX systems.
  28. #
  29. # The command_directory parameter specifies the location of all
  30. # postXXX commands.
  31. #
  32. command_directory = /usr/sbin
  33. # The daemon_directory parameter specifies the location of all Postfix
  34. # daemon programs (i.e. programs listed in the master.cf file). This
  35. # directory must be owned by root.
  36. #
  37. daemon_directory = /usr/libexec/postfix
  38. # The data_directory parameter specifies the location of Postfix-writable
  39. # data files (caches, random numbers). This directory must be owned
  40. # by the mail_owner account (see below).
  41. #
  42. data_directory = /var/lib/postfix
  43. # QUEUE AND PROCESS OWNERSHIP
  44. #
  45. # The mail_owner parameter specifies the owner of the Postfix queue
  46. # and of most Postfix daemon processes.  Specify the name of a user
  47. # account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS
  48. # AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM.  In
  49. # particular, don't specify nobody or daemon. PLEASE USE A DEDICATED
  50. # USER.
  51. #
  52. # The default_privs parameter specifies the default rights used by
  53. # the local delivery agent for delivery to external file or command.
  54. # These rights are used in the absence of a recipient user context.
  55. # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
  56. #
  57. #default_privs = nobody
  58. # INTERNET HOST AND DOMAIN NAMES
  59. #
  60. # The myhostname parameter specifies the internet hostname of this
  61. # mail system. The default is to use the fully-qualified domain name
  62. # from gethostname(). $myhostname is used as a default value for many
  63. # other configuration parameters.
  64. #
  65. myhostname = mail.xinxianghui.net
  66. #myhostname = virtual.domain.tld
  67. # The mydomain parameter specifies the local internet domain name.
  68. # The default is to use $myhostname minus the first component.
  69. # $mydomain is used as a default value for many other configuration
  70. # parameters.
  71. #
  72. mydomain = mail.xinxianghui.net
  73. # SENDING MAIL
  74. #
  75. # The myorigin parameter specifies the domain that locally-posted
  76. # mail appears to come from. The default is to append $myhostname,
  77. # which is fine for small sites.  If you run a domain with multiple
  78. # machines, you should (1) change this to $mydomain and (2) set up
  79. # a domain-wide alias database that aliases each user to
  80. # user@that.users.mailhost.
  81. #
  82. # For the sake of consistency between sender and recipient addresses,
  83. # myorigin also specifies the default domain name that is appended
  84. # to recipient addresses that have no @domain part.
  85. #
  86. #myorigin = $myhostname
  87. myorigin = $mydomain
  88. # RECEIVING MAIL
  89. # The inet_interfaces parameter specifies the network interface
  90. # addresses that this mail system receives mail on.  By default,
  91. # the software claims all active interfaces on the machine. The
  92. # parameter also controls delivery of mail to user@[ip.address].
  93. #
  94. # See also the proxy_interfaces parameter, for network addresses that
  95. # are forwarded to us via a proxy or network address translator.
  96. #
  97. # Note: you need to stop/start Postfix when this parameter changes.
  98. #
  99. #inet_interfaces = $myhostname
  100. #inet_interfaces = $myhostname, localhost
  101. # The proxy_interfaces parameter specifies the network interface
  102. # addresses that this mail system receives mail on by way of a
  103. # proxy or network address translation unit. This setting extends
  104. # the address list specified with the inet_interfaces parameter.
  105. #
  106. # You must specify your proxy/NAT addresses when your system is a
  107. # backup MX host for other domains, otherwise mail delivery loops
  108. # will happen when the primary MX host is down.
  109. #
  110. #proxy_interfaces =
  111. #proxy_interfaces = 1.2.3.4
  112. # The mydestination parameter specifies the list of domains that this
  113. # machine considers itself the final destination for.
  114. #
  115. # These domains are routed to the delivery agent specified with the
  116. # local_transport parameter setting. By default, that is the UNIX
  117. # compatible delivery agent that lookups all recipients in /etc/passwd
  118. # and /etc/aliases or their equivalent.
  119. #
  120. # The default is $myhostname + localhost.$mydomain.  On a mail domain
  121. # gateway, you should also include $mydomain.
  122. #
  123. # Do not specify the names of virtual domains - those domains are
  124. # specified elsewhere (see VIRTUAL_README).
  125. #
  126. # Do not specify the names of domains that this machine is backup MX
  127. # host for. Specify those names via the relay_domains settings for
  128. # the SMTP server, or use permit_mx_backup if you are lazy (see
  129. # STANDARD_CONFIGURATION_README).
  130. #
  131. # The local machine is always the final destination for mail addressed
  132. # to user@[the.net.work.address] of an interface that the mail system
  133. # receives mail on (see the inet_interfaces parameter).
  134. #
  135. # Specify a list of host or domain names, /file/name or type:table
  136. # patterns, separated by commas and/or whitespace. A /file/name
  137. # pattern is replaced by its contents; a type:table is matched when
  138. # a name matches a lookup key (the right-hand side is ignored).
  139. # Continue long lines by starting the next line with whitespace.
  140. #
  141. # See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".
  142. #
  143. #mydestination = $myhostname, localhost.$mydomain, localhost
  144. #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
  145. #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
  146. # mail.$mydomain, www.$mydomain, ftp.$mydomain
  147. # REJECTING MAIL FOR UNKNOWN LOCAL USERS
  148. #
  149. # The local_recipient_maps parameter specifies optional lookup tables
  150. # with all names or addresses of users that are local with respect
  151. # to $mydestination, $inet_interfaces or $proxy_interfaces.
  152. #
  153. # If this parameter is defined, then the SMTP server will reject
  154. # mail for unknown local users. This parameter is defined by default.
  155. #
  156. # To turn off local recipient checking in the SMTP server, specify
  157. # local_recipient_maps = (i.e. empty).
  158. #
  159. # The default setting assumes that you use the default Postfix local
  160. # delivery agent for local delivery. You need to update the
  161. # local_recipient_maps setting if:
  162. #
  163. # - You define $mydestination domain recipients in files other than
  164. #   /etc/passwd, /etc/aliases, or the $virtual_alias_maps files.
  165. #   For example, you define $mydestination domain recipients in   
  166. #   the $virtual_mailbox_maps files.
  167. #
  168. # - You redefine the local delivery agent in master.cf.
  169. #
  170. # - You redefine the "local_transport" setting in main.cf.
  171. #
  172. # - You use the "luser_relay", "mailbox_transport", or "fallback_transport"
  173. #   feature of the Postfix local delivery agent (see local(8)).
  174. #
  175. # Details are described in the LOCAL_RECIPIENT_README file.
  176. #
  177. # Beware: if the Postfix SMTP server runs chrooted, you probably have
  178. # to access the passwd file via the proxymap service, in order to
  179. # overcome chroot restrictions. The alternative, having a copy of
  180. # the system passwd file in the chroot jail is just not practical.
  181. #
  182. # The right-hand side of the lookup tables is conveniently ignored.
  183. # In the left-hand side, specify a bare username, an @domain.tld
  184. # wild-card, or specify a user@domain.tld address.
  185. #
  186. #local_recipient_maps = unix:passwd.byname $alias_maps
  187. #local_recipient_maps = proxy:unix:passwd.byname $alias_maps
  188. #local_recipient_maps =
  189. # The unknown_local_recipient_reject_code specifies the SMTP server
  190. # response code when a recipient domain matches $mydestination or
  191. # ${proxy,inet}_interfaces, while $local_recipient_maps is non-empty
  192. # and the recipient address or address local-part is not found.
  193. #
  194. # The default setting is 550 (reject mail) but it is safer to start
  195. # with 450 (try again later) until you are certain that your
  196. # local_recipient_maps settings are OK.
  197. #
  198. unknown_local_recipient_reject_code = 550
  199. # TRUST AND RELAY CONTROL
  200. # The mynetworks parameter specifies the list of "trusted" SMTP
  201. # clients that have more privileges than "strangers".
  202. #
  203. # In particular, "trusted" SMTP clients are allowed to relay mail
  204. # through Postfix.  See the smtpd_recipient_restrictions parameter
  205. # in postconf(5).
  206. #
  207. # You can specify the list of "trusted" network addresses by hand
  208. # or you can let Postfix do it for you (which is the default).
  209. #
  210. # By default (mynetworks_style = subnet), Postfix "trusts" SMTP
  211. # clients in the same IP subnetworks as the local machine.
  212. # On Linux, this does works correctly only with interfaces specified
  213. # with the "ifconfig" command.
  214. #
  215. # Specify "mynetworks_style = class" when Postfix should "trust" SMTP
  216. # clients in the same IP class A/B/C networks as the local machine.
  217. # Don't do this with a dialup site - it would cause Postfix to "trust"
  218. # your entire provider's network.  Instead, specify an explicit
  219. # mynetworks list by hand, as described below.
  220. #  
  221. # Specify "mynetworks_style = host" when Postfix should "trust"
  222. # only the local machine.
  223. #
  224. #mynetworks_style = class
  225. #mynetworks_style = subnet
  226. mynetworks_style = host
  227. # Alternatively, you can specify the mynetworks list by hand, in
  228. # which case Postfix ignores the mynetworks_style setting.
  229. #
  230. # Specify an explicit list of network/netmask patterns, where the
  231. # mask specifies the number of bits in the network part of a host
  232. # address.
  233. #
  234. # You can also specify the absolute pathname of a pattern file instead
  235. # of listing the patterns here. Specify type:table for table-based lookups
  236. # (the value on the table right-hand side is not used).
  237. #
  238. #mynetworks = 222.73.26.15/28, 127.0.0.0/8
  239. #mynetworks = $config_directory/mynetworks
  240. #mynetworks = hash:/etc/postfix/network_table
  241. # The relay_domains parameter restricts what destinations this system will
  242. # relay mail to.  See the smtpd_recipient_restrictions description in
  243. # postconf(5) for detailed information.
  244. #
  245. # By default, Postfix relays mail
  246. # - from "trusted" clients (IP address matches $mynetworks) to any destination,
  247. # - from "untrusted" clients to destinations that match $relay_domains or
  248. #   subdomains thereof, except addresses with sender-specified routing.
  249. # The default relay_domains value is $mydestination.
  250. #
  251. # In addition to the above, the Postfix SMTP server by default accepts mail
  252. # that Postfix is final destination for:
  253. # - destinations that match $inet_interfaces or $proxy_interfaces,
  254. # - destinations that match $mydestination
  255. # - destinations that match $virtual_alias_domains,
  256. # - destinations that match $virtual_mailbox_domains.
  257. # These destinations do not need to be listed in $relay_domains.
  258. #
  259. # Specify a list of hosts or domains, /file/name patterns or type:name
  260. # lookup tables, separated by commas and/or whitespace.  Continue
  261. # long lines by starting the next line with whitespace. A file name
  262. # is replaced by its contents; a type:name table is matched when a
  263. # (parent) domain appears as lookup key.
  264. #
  265. # NOTE: Postfix will not automatically forward mail for domains that
  266. # list this system as their primary or backup MX host. See the
  267. # permit_mx_backup restriction description in postconf(5).
  268. #
  269. relay_domains = $mydomain
  270. # INTERNET OR INTRANET
  271. # The relayhost parameter specifies the default host to send mail to
  272. # when no entry is matched in the optional transport(5) table. When
  273. # no relayhost is given, mail is routed directly to the destination.
  274. #
  275. # On an intranet, specify the organizational domain name. If your
  276. # internal DNS uses no MX records, specify the name of the intranet
  277. # gateway host instead.
  278. #
  279. # In the case of SMTP, specify a domain, host, host:port, [host]:port,
  280. # [address] or [address]:port; the form [host] turns off MX lookups.
  281. #
  282. # If you're connected via UUCP, see also the default_transport parameter.
  283. #
  284. #relayhost = $mydomain
  285. #relayhost = [gateway.my.domain]
  286. #relayhost = [mailserver.isp.tld]
  287. #relayhost = uucphost
  288. #relayhost = [an.ip.add.ress]
  289. # REJECTING UNKNOWN RELAY USERS
  290. #
  291. # The relay_recipient_maps parameter specifies optional lookup tables
  292. # with all addresses in the domains that match $relay_domains.
  293. #
  294. # If this parameter is defined, then the SMTP server will reject
  295. # mail for unknown relay users. This feature is off by default.
  296. #
  297. # The right-hand side of the lookup tables is conveniently ignored.
  298. # In the left-hand side, specify an @domain.tld wild-card, or specify
  299. # a user@domain.tld address.
  300. #
  301. #relay_recipient_maps = hash:/etc/postfix/relay_recipients
  302. # INPUT RATE CONTROL
  303. #
  304. # The in_flow_delay configuration parameter implements mail input
  305. # flow control. This feature is turned on by default, although it
  306. # still needs further development (it's disabled on SCO UNIX due
  307. # to an SCO bug).
  308. #
  309. # A Postfix process will pause for $in_flow_delay seconds before
  310. # accepting a new message, when the message arrival rate exceeds the
  311. # message delivery rate. With the default 100 SMTP server process
  312. # limit, this limits the mail inflow to 100 messages a second more
  313. # than the number of messages delivered per second.
  314. #
  315. # Specify 0 to disable the feature. Valid delays are 0..10.
  316. #
  317. #in_flow_delay = 1s
  318. # ADDRESS REWRITING
  319. #
  320. # The ADDRESS_REWRITING_README document gives information about
  321. # address masquerading or other forms of address rewriting including
  322. # username->Firstname.Lastname mapping.
  323. # ADDRESS REDIRECTION (VIRTUAL DOMAIN)
  324. #
  325. # The VIRTUAL_README document gives information about the many forms
  326. # of domain hosting that Postfix supports.
  327. # "USER HAS MOVED" BOUNCE MESSAGES
  328. #
  329. # See the discussion in the ADDRESS_REWRITING_README document.
  330. # TRANSPORT MAP
  331. #
  332. # See the discussion in the ADDRESS_REWRITING_README document.
  333. # ALIAS DATABASE
  334. #
  335. # The alias_maps parameter specifies the list of alias databases used
  336. # by the local delivery agent. The default list is system dependent.
  337. #
  338. # On systems with NIS, the default is to search the local alias
  339. # database, then the NIS alias database. See aliases(5) for syntax
  340. # details.
  341. #
  342. # If you change the alias database, run "postalias /etc/aliases" (or
  343. # wherever your system stores the mail alias file), or simply run
  344. # "newaliases" to build the necessary DBM or DB file.
  345. #
  346. # It will take a minute or so before changes become visible.  Use
  347. # "postfix reload" to eliminate the delay.
  348. #
  349. #alias_maps = dbm:/etc/aliases
  350. #alias_maps = hash:/etc/aliases
  351. #alias_maps = hash:/etc/aliases, nis:mail.aliases
  352. #alias_maps = netinfo:/aliases
  353. # The alias_database parameter specifies the alias database(s) that
  354. # are built with "newaliases" or "sendmail -bi".  This is a separate
  355. # configuration parameter, because alias_maps (see above) may specify
  356. # tables that are not necessarily all under control by Postfix.
  357. #
  358. #alias_database = dbm:/etc/aliases
  359. #alias_database = dbm:/etc/mail/aliases
  360. #alias_database = hash:/etc/aliases
  361. #alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
  362. # ADDRESS EXTENSIONS (e.g., user+foo)
  363. #
  364. # The recipient_delimiter parameter specifies the separator between
  365. # user names and address extensions (user+foo). See canonical(5),
  366. # local(8), relocated(5) and virtual(5) for the effects this has on
  367. # aliases, canonical, virtual, relocated and .forward file lookups.
  368. # Basically, the software tries user+foo and .forward+foo before
  369. # trying user and .forward.
  370. #
  371. #recipient_delimiter = +
  372. # DELIVERY TO MAILBOX
  373. #
  374. # The home_mailbox parameter specifies the optional pathname of a
  375. # mailbox file relative to a user's home directory. The default
  376. # mailbox file is /var/spool/mail/user or /var/mail/user.  Specify
  377. # "Maildir/" for qmail-style delivery (the / is required).
  378. #
  379. #home_mailbox = Mailbox
  380. #home_mailbox = Maildir/

  381. # The mail_spool_directory parameter specifies the directory where
  382. # UNIX-style mailboxes are kept. The default setting depends on the
  383. # system type.
  384. #
  385. #mail_spool_directory = /var/mail
  386. #mail_spool_directory = /var/spool/mail

复制代码

论坛徽章:
0
2 [报告]
发表于 2010-01-24 14:22 |只看该作者
接上文 postfix配置文件:

  1. # The mailbox_transport specifies the optional transport in master.cf
  2. # to use after processing aliases and .forward files. This parameter
  3. # has precedence over the mailbox_command, fallback_transport and
  4. # luser_relay parameters.
  5. #
  6. # Specify a string of the form transport:nexthop, where transport is
  7. # the name of a mail delivery transport defined in master.cf.  The
  8. # :nexthop part is optional. For more details see the sample transport
  9. # configuration file.
  10. #
  11. # NOTE: if you use this feature for accounts not in the UNIX password
  12. # file, then you must update the "local_recipient_maps" setting in
  13. # the main.cf file, otherwise the SMTP server will reject mail for   
  14. # non-UNIX accounts with "User unknown in local recipient table".
  15. #
  16. #mailbox_transport = lmtp:unix:/file/name
  17. #mailbox_transport = cyrus

  18. # The fallback_transport specifies the optional transport in master.cf
  19. # to use for recipients that are not found in the UNIX passwd database.
  20. # This parameter has precedence over the luser_relay parameter.
  21. #
  22. # Specify a string of the form transport:nexthop, where transport is
  23. # the name of a mail delivery transport defined in master.cf.  The
  24. # :nexthop part is optional. For more details see the sample transport
  25. # configuration file.
  26. #
  27. # NOTE: if you use this feature for accounts not in the UNIX password
  28. # file, then you must update the "local_recipient_maps" setting in
  29. # the main.cf file, otherwise the SMTP server will reject mail for   
  30. # non-UNIX accounts with "User unknown in local recipient table".
  31. #
  32. #fallback_transport = lmtp:unix:/file/name
  33. #fallback_transport = cyrus
  34. #fallback_transport =

  35. # The luser_relay parameter specifies an optional destination address
  36. # for unknown recipients.  By default, mail for unknown@$mydestination,
  37. # unknown@[$inet_interfaces] or unknown@[$proxy_interfaces] is returned
  38. # as undeliverable.
  39. #
  40. # The following expansions are done on luser_relay: $user (recipient
  41. # username), $shell (recipient shell), $home (recipient home directory),
  42. # $recipient (full recipient address), $extension (recipient address
  43. # extension), $domain (recipient domain), $local (entire recipient
  44. # localpart), $recipient_delimiter. Specify ${name?value} or
  45. # ${name:value} to expand value only when $name does (does not) exist.
  46. #
  47. # luser_relay works only for the default Postfix local delivery agent.
  48. #
  49. # NOTE: if you use this feature for accounts not in the UNIX password
  50. # file, then you must specify "local_recipient_maps =" (i.e. empty) in
  51. # the main.cf file, otherwise the SMTP server will reject mail for   
  52. # non-UNIX accounts with "User unknown in local recipient table".
  53. #
  54. #luser_relay = $[email]user@other.host[/email]
  55. #luser_relay = $[email]local@other.host[/email]
  56. #luser_relay = admin+$local
  57.   
  58. # JUNK MAIL CONTROLS
  59. #
  60. # The controls listed here are only a very small subset. The file
  61. # SMTPD_ACCESS_README provides an overview.

  62. # The header_checks parameter specifies an optional table with patterns
  63. # that each logical message header is matched against, including
  64. # headers that span multiple physical lines.
  65. #
  66. # By default, these patterns also apply to MIME headers and to the
  67. # headers of attached messages. With older Postfix versions, MIME and
  68. # attached message headers were treated as body text.
  69. #
  70. # For details, see "man header_checks".
  71. #
  72. #header_checks = regexp:/etc/postfix/header_checks

  73. # FAST ETRN SERVICE
  74. #
  75. # Postfix maintains per-destination logfiles with information about
  76. # deferred mail, so that mail can be flushed quickly with the SMTP
  77. # "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
  78. # See the ETRN_README document for a detailed description.
  79. #
  80. # The fast_flush_domains parameter controls what destinations are
  81. # eligible for this service. By default, they are all domains that
  82. # this server is willing to relay mail to.
  83. #
  84. #fast_flush_domains = $relay_domains

  85. # SHOW SOFTWARE VERSION OR NOT
  86. #
  87. # The smtpd_banner parameter specifies the text that follows the 220
  88. # code in the SMTP server's greeting banner. Some people like to see
  89. # the mail version advertised. By default, Postfix shows no version.
  90. #
  91. # You MUST specify $myhostname at the start of the text. That is an
  92. # RFC requirement. Postfix itself does not care.
  93. #
  94. #smtpd_banner = $myhostname ESMTP $mail_name
  95. #smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)

  96. # PARALLEL DELIVERY TO THE SAME DESTINATION
  97. #
  98. # How many parallel deliveries to the same user or domain? With local
  99. # delivery, it does not make sense to do massively parallel delivery
  100. # to the same user, because mailbox updates must happen sequentially,
  101. # and expensive pipelines in .forward files can cause disasters when
  102. # too many are run at the same time. With SMTP deliveries, 10
  103. # simultaneous connections to the same domain could be sufficient to
  104. # raise eyebrows.
  105. #
  106. # Each message delivery transport has its XXX_destination_concurrency_limit
  107. # parameter.  The default is $default_destination_concurrency_limit for
  108. # most delivery transports. For the local delivery agent the default is 2.

  109. #local_destination_concurrency_limit = 2
  110. #default_destination_concurrency_limit = 20

  111. # DEBUGGING CONTROL
  112. #
  113. # The debug_peer_level parameter specifies the increment in verbose
  114. # logging level when an SMTP client or server host name or address
  115. # matches a pattern in the debug_peer_list parameter.
  116. #
  117. debug_peer_level = 2

  118. # The debug_peer_list parameter specifies an optional list of domain
  119. # or network patterns, /file/name patterns or type:name tables. When
  120. # an SMTP client or server host name or address matches a pattern,
  121. # increase the verbose logging level by the amount specified in the
  122. # debug_peer_level parameter.
  123. #
  124. #debug_peer_list = 127.0.0.1
  125. #debug_peer_list = some.domain

  126. # The debugger_command specifies the external command that is executed
  127. # when a Postfix daemon program is run with the -D option.
  128. #
  129. # Use "command .. & sleep 5" so that the debugger can attach before
  130. # the process marches on. If you use an X-based debugger, be sure to
  131. # set up your XAUTHORITY environment variable before starting Postfix.
  132. #
  133. debugger_command =
  134.          PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
  135.          ddd $daemon_directory/$process_name $process_id & sleep 5

  136. # If you can't use X, use this to capture the call stack when a
  137. # daemon crashes. The result is in a file in the configuration
  138. # directory, and is named after the process name and the process ID.
  139. #
  140. # debugger_command =
  141. #        PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont;
  142. #        echo where) | gdb $daemon_directory/$process_name $process_id 2>&1
  143. #        >$config_directory/$process_name.$process_id.log & sleep 5
  144. #
  145. # Another possibility is to run gdb under a detached screen session.
  146. # To attach to the screen sesssion, su root and run "screen -r
  147. # <id_string>" where <id_string> uniquely matches one of the detached
  148. # sessions (from "screen -list").
  149. #
  150. # debugger_command =
  151. #        PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH; screen
  152. #        -dmS $process_name gdb $daemon_directory/$process_name
  153. #        $process_id & sleep 1

  154. # INSTALL-TIME CONFIGURATION INFORMATION
  155. #
  156. # The following parameters are used when installing a new Postfix version.
  157. #
  158. # sendmail_path: The full pathname of the Postfix sendmail command.
  159. # This is the Sendmail-compatible mail posting interface.
  160. #
  161. sendmail_path = /usr/sbin/sendmail.postfix

  162. # newaliases_path: The full pathname of the Postfix newaliases command.
  163. # This is the Sendmail-compatible command to build alias databases.
  164. #
  165. newaliases_path = /usr/bin/newaliases.postfix

  166. # mailq_path: The full pathname of the Postfix mailq command.  This
  167. # is the Sendmail-compatible mail queue listing command.
  168. #
  169. mailq_path = /usr/bin/mailq.postfix

  170. # setgid_group: The group for mail submission and queue management
  171. # commands.  This must be a group name with a numerical group ID that
  172. # is not shared with other accounts, not even with the Postfix account.
  173. #
  174. setgid_group = postdrop

  175. # html_directory: The location of the Postfix HTML documentation.
  176. #
  177. html_directory = /usr/share/doc/postfix-2.5.1-documentation/html

  178. # manpage_directory: The location of the Postfix on-line manual pages.
  179. #
  180. manpage_directory = /usr/share/man

  181. # sample_directory: The location of the Postfix sample configuration files.
  182. # This parameter is obsolete as of Postfix 2.1.
  183. #
  184. sample_directory = /etc/postfix

  185. # readme_directory: The location of the Postfix README files.
  186. #
  187. readme_directory = /usr/share/doc/postfix-2.5.1-documentation/readme
  188. alias_database = hash:/etc/postfix/aliases
  189. alias_maps = hash:/etc/postfix/aliases
  190. mydestination = $myhostname, localhost.$mydomain, $mydomain
  191. smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination permit_inet_interfaces reject_unknown_reverse_client_hostname permit_sasl_authenticated check_relay_domains permit_mx_backup
  192. broken_sasl_auth_clients = yes

复制代码

论坛徽章:
0
3 [报告]
发表于 2010-01-24 14:23 |只看该作者
下边是maillog的日志:

  1. Jan 24 13:51:10 zjisp postfix/anvil[18416]: statistics: max cache size 1 at Jan 24 13:47:41
  2. Jan 24 13:51:12 zjisp postfix/smtpd[18418]: connect from unknown[116.232.90.224]
  3. Jan 24 13:51:12 zjisp postfix/smtpd[18418]: NOQUEUE: reject: RCPT from unknown[116.232.90.224]: 554 5.7.1 <[email]root@xinxianghui.net[/email]>: Relay access denied; from=<[email]root@xinxianghui.net[/email]> to=<[email]root@xinxianghui.net[/email]> proto=ESMTP helo=<luxiaolong>
  4. Jan 24 13:51:42 zjisp postfix/smtpd[18418]: lost connection after RCPT from unknown[116.232.90.224]
  5. Jan 24 13:51:42 zjisp postfix/smtpd[18418]: disconnect from unknown[116.232.90.224]
  6. Jan 24 13:55:02 zjisp postfix/anvil[18420]: statistics: max connection rate 1/60s for (smtp:116.232.90.224) at Jan 24 13:51:12
  7. Jan 24 13:55:02 zjisp postfix/anvil[18420]: statistics: max connection count 1 for (smtp:116.232.90.224) at Jan 24 13:51:12
  8. Jan 24 13:55:02 zjisp postfix/anvil[18420]: statistics: max cache size 1 at Jan 24 13:51:12
  9. Jan 24 14:09:38 zjisp postfix/smtpd[18424]: connect from unknown[116.232.90.224]
  10. Jan 24 14:09:39 zjisp postfix/smtpd[18424]: NOQUEUE: reject: RCPT from unknown[116.232.90.224]: 554 5.7.1 <[email]root@xinxianghui.net[/email]>: Relay access denied; from=<[email]root@xinxianghui.net[/email]> to=<[email]root@xinxianghui.net[/email]> proto=ESMTP helo=<luxiaolong>
  11. Jan 24 14:10:09 zjisp postfix/smtpd[18424]: lost connection after RCPT from unknown[116.232.90.224]
  12. Jan 24 14:10:09 zjisp postfix/smtpd[18424]: disconnect from unknown[116.232.90.224]
  13. Jan 24 14:10:25 zjisp dovecot: dovecot: User root not allowed to log in using UNIX UID 0 (root logins are never allowed)
  14. Jan 24 14:10:25 zjisp dovecot: pop3-login: Internal login failure (auth failed, 1 attempts): user=<root>, method=PLAIN, rip=116.232.90.224, lip=222.73.26.15
  15. Jan 24 14:11:08 zjisp postfix/smtpd[18424]: connect from unknown[116.232.90.224]
  16. Jan 24 14:11:08 zjisp postfix/smtpd[18424]: NOQUEUE: reject: RCPT from unknown[116.232.90.224]: 554 5.7.1 <[email]root@xinxianghui.net[/email]>: Relay access denied; from=<[email]root@xinxianghui.net[/email]> to=<[email]root@xinxianghui.net[/email]> proto=ESMTP helo=<luxiaolong>
  17. Jan 24 14:11:14 zjisp postfix/smtpd[18424]: disconnect from unknown[116.232.90.224]
  18. Jan 24 14:14:34 zjisp postfix/anvil[18426]: statistics: max connection rate 1/60s for (smtp:116.232.90.224) at Jan 24 14:09:38
  19. Jan 24 14:14:34 zjisp postfix/anvil[18426]: statistics: max connection count 1 for (smtp:116.232.90.224) at Jan 24 14:09:38
  20. Jan 24 14:14:34 zjisp postfix/anvil[18426]: statistics: max cache size 1 at Jan 24 14:09:38

复制代码



谢谢了!

论坛徽章:
0
4 [报告]
发表于 2010-01-24 19:55 |只看该作者

回复 #3 xiaolong85 的帖子

一下搞出这么多配置文件来真的是很难看看完,从你的日志来看
1,可能是 没有 配置smtp认证,而且你你发信息的地址有 不再你的 mynetwork= 参数里面
2,开启了 认证,但是 认证不 成功

论坛徽章:
8
综合交流区版块每周发帖之星
日期:2015-12-02 15:03:53数据库技术版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年纪念徽章
日期:2013-10-24 15:41:34酉鸡
日期:2013-10-19 10:17:1315-16赛季CBA联赛之北京
日期:2017-03-06 15:12:44
5 [报告]
发表于 2010-01-25 08:05 |只看该作者
原帖由 wangdejiu 于 2010-1-24 19:55 发表
一下搞出这么多配置文件来真的是很难看看完,从你的日志来看
1,可能是 没有 配置smtp认证,而且你你发信息的地址有 不再你的 mynetwork= 参数里面
2,开启了 认证,但是 认证不 成功



他的mynetworks根本没有配置
另外helo的配置也不合理
LZ还是到网上多搜索几个main.cf的配置研究研究

论坛徽章:
0
6 [报告]
发表于 2010-01-28 18:53 |只看该作者
谢谢楼上朋友的回答,我在重新试试。

论坛徽章:
0
7 [报告]
发表于 2010-02-01 20:24 |只看该作者
回复 6# xiaolong85

告诉你一个简单的调试postfix的方法。打开DEBUG模式,任何错误只要你细心看日志,都可以很好的提示你。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP