Want more features on Pastebin? Sign Up, it's FREE!
Guest

mydebianpostfix

By: a guest on Nov 15th, 2011  |  syntax: Bash  |  size: 5.09 KB  |  views: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. I have one server set up with newest postfix,dovecot,imap,,mysql-server and mutt if that matters
  2.  
  3. Its local user is called "administrator", the local hostname "mydebian" and the dns "example.org"
  4. It currently has two mailboxes: "booking@example.org" and "info@example.org"
  5.  
  6. - When trying to send mail from one account to the other (with mutt),
  7. it says that the mail was sent by "administrator@example.com"
  8.  
  9. - When trying to send mail destinated outside local net, for example to google mail,
  10. same thing happens
  11.  
  12. - When trying to send mail from google mail to any of the accounts at "@example.org",
  13. google tells me the following:
  14.  
  15. ----------------------------------------------------------------------------
  16. Delivery to the following recipient failed permanently:
  17.  
  18.     test@example.org
  19.  
  20. Technical details of permanent failure:
  21. Google tried to deliver your message, but it was rejected by the recipient domain.
  22. We recommend contacting the other email provider for further information about the
  23. cause of this error. The error that the other server returned was:
  24. 550 550 5.7.1 Unable to relay (state 14).
  25. ----------------------------------------------------------------------------
  26.  
  27. - Below are some logs/useful information
  28.  
  29. # MX record
  30. administrator@mydebian:/$ host -t MX example.org
  31. example.org mail is handled by 10 mail.example.org.
  32.  
  33. # mail.log - sending to "booking@example.org" from "info@example.org"
  34. administrator@mydebian:/$ cat /var/mail/mail.log:
  35. .
  36. .
  37. .
  38. Nov 16 00:40:08 mydebian dovecot: imap-login: Login: user=<info@example.org>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS
  39. Nov 16 00:40:15 mydebian dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, TLS: Disconnected
  40. Nov 16 00:40:53 mydebian postfix/pickup[566]: EE22E19C1B8: uid=1000 from=<administrator>
  41. Nov 16 00:40:53 mydebian postfix/cleanup[1425]: EE22E19C1B8: message-id=<20111116060653.GA1382@example.org>
  42. Nov 16 00:40:54 mydebian postfix/qmgr[565]: EE22E19C1B8: from=<administrator@example.org>, size=501, nrcpt=1 (queue active)
  43. Nov 16 00:40:54 mydebian dovecot: deliver(booking@example.org): msgid=<20111116060653.GA1382@example.org>: saved mail to INBOX
  44. Nov 16 00:40:54 mydebian postfix/pipe[1427]: EE22E19C1B8: to=<booking@example.org>, relay=dovecot, delay=0.48, delays=0.2/0.01/0/0.27, dsn=2.0.0, status=sent (delivered via dovecot service)
  45. Nov 16 00:40:54 mydebian postfix/qmgr[565]: EE22E19C1B8: removed
  46. Nov 16 00:40:03 mydebian dovecot: imap-login: Login: user=<booking@example.org>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS
  47. Nov 16 00:40:24 mydebian dovecot: IMAP(booking@example.org): Disconnected: Logged out bytes=360/2260
  48.  
  49. # mail.log - sending to "my_mail@gmail.com" from "info@example.org"
  50. administrator@mydebian:/$ cat /var/mail/mail.log:
  51. .
  52. .
  53. .
  54. Nov 16 00:45:21 mydebian postfix/postfix-script[2871]: refreshing the Postfix mail system
  55. Nov 16 00:45:21 mydebian postfix/master[8601]: reload -- version 2.7.1, configuration /etc/postfix
  56. Nov 16 00:45:49 mydebian dovecot: imap-login: Login: user=<info@example.org>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, TLS
  57. Nov 16 00:46:22 mydebian postfix/pickup[2875]: 47FB119C1CA: uid=1000 from=<administrator>
  58. Nov 16 00:46:22 mydebian postfix/cleanup[2924]: 47FB119C1CA: message-id=<20111116064622.GA2887@example.org>
  59. Nov 16 00:46:22 mydebian postfix/qmgr[2876]: 47FB119C1CA: from=<administrator@example.org>, size=475, nrcpt=1 (queue active)
  60. Nov 16 00:46:23 mydebian postfix/smtp[2926]: 47FB119C1CA: to=<my_mail@gmail.com>, relay=gmail-smtp-in.l.google.com[209.85.173.27]:25, delay=1.7, delays=0.19/0.01/0.63/0.91, dsn=2.0.0, status=sent (250 2.0.0 OK 1321400787 ob4si576885lab.32)
  61. Nov 16 00:46:23 mydebian postfix/qmgr[2876]: 47FB119C1CA: removed
  62. Nov 16 00:46:25 mydebian dovecot: IMAP(info@example.org): Disconnected: Logged out bytes=288/2355
  63.  
  64.  
  65. # postconf -n
  66. administrator@mydebian:/$ sudo postconf -n
  67. append_dot_mydomain = no
  68. biff = no
  69. config_directory = /etc/postfix
  70. inet_interfaces = all
  71. local_recipient_maps =
  72. mailbox_command = procmail -a "$EXTENSION"
  73. mailbox_size_limit = 0
  74. mydestination =
  75. mydomain = example.org
  76. myhostname = example.org
  77. mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.10.0/24
  78. myorigin = $mydomain
  79. readme_directory = no
  80. recipient_delimiter = +
  81. relay_domains =
  82. relayhost =
  83. smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
  84. smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
  85. smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
  86. smtpd_sasl_auth_enable = yes
  87. smtpd_sasl_path = private/auth
  88. smtpd_sasl_type = dovecot
  89. smtpd_tls_cert_file = /etc/ssl/certs/postfix.pem
  90. smtpd_tls_key_file = /etc/ssl/private/postfix.pem
  91. smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
  92. smtpd_use_tls = yes
  93. virtual_alias_domains = mail.example.org
  94. virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf
  95. virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
  96. virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
  97. virtual_transport = dovecot
  98.  
  99.  
clone this paste RAW Paste Data