norbert_999
6th June 2008, 16:50
I'm using Postfix with Dovecot, I have problem with sending mails to outside networks, there is no problem with internal network. I can receive mails from any external networks. I'm not sure what I have done wrong.
mail.log
Jun 6 15:36:30 mail postfix/qmgr[14167]: 75E49415B1: to=<norw@wwria.com>,
relay=none, delay=1422, delays=1422/0.03/0/0, dsn=4.3.0, status=deferred
(mail transport unavailable)
Jun 6 15:36:30 mail postfix/qmgr[14167]: 75E49415B1: to=<@wwria.com>,
relay=none, delay=1422, delays=1422/0.04/0/0, dsn=4.3.0, status=deferred
(mail transport unavailable)
Jun 6 15:36:30 mail postfix/qmgr[14167]: warning: connect to transport
spamassassin: Connection refused
Jun 6 15:37:30 mail postfix/qmgr[14167]: warning: connect to transport
spamassassin: Connection refused
Jun 6 15:38:12 mail postfix/smtpd[14745]: connect from
unknown[XXX.XX.XXX.XX]
Jun 6 15:38:12 mail postfix/smtpd[14745]: 742DF415B2:
client=unknown[XXX.XX.XXX.XX], sasl_method=LOGIN, sasl_username=helpdesk
Jun 6 15:38:12 mail postfix/cleanup[14750]: 742DF415B2:
message-id=<002d01c8c7da$8ce2f060$a6a8d120$@xx.pl>
Jun 6 15:38:12 mail postfix/qmgr[14167]: 742DF415B2:
from=<helpdesk@xx.com>, size=2671, nrcpt=1 (queue active)
Jun 6 15:38:12 mail postfix/smtpd[14751]: connect from
localhost[127.0.0.1]
Jun 6 15:38:15 mail postfix/smtpd[14745]: disconnect from
unknown[XXX.XX.XXX.XX]
main.cf
smtpd_banner = $myhostname ESMTP $mail_name(Debian/GNU)
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
deamon_directory = /usr/lib/postfix
mail_owner = postfix
myhostname = mail.xx.com
mydomain = xx.com
message_size_limit=51200000
inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
mydestination = $myhostname, localhost.$mydomain, $mydomain
virtual_maps = hash:/etc/postfix/virtual
canonical_maps = hash:/etc/postfix/canonical
masquerade_domains = xx.pl zz.pl $mydomain $myhostname
alias_maps = hash:/etc/aliases
relay_domains = $mydestination /etc/postfix/access
mynetworks = 127.0.0.0/8, 172.0.0.0/8, 192.0.0.0/8
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_recipient_restrictions = permit_sasl_authenticated,
permit_mynetworks, check_sender_access hash:/etc/postfix/mails,
reject_unauth_destination
#smtp_use_tls = yes
#smtpd_use_tls = yes
#smtp_tls_note_starttls_offer = yes
#smtpd_tls_key_file = /etc/postfix/ssl/smtpd.pem
#smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.pem
#smtpd_tls_CAfile = /etc/postfix/ssl/smtpd.pem
#smtpd_tls_loglevel = 1
#smtpd_tls_received_header = yes
#smtpd_tls_session_cache_timeout = 3600#s
#tls_random_source = dev:/dev/urandom
# appending .domain is the MUA's job.
append_dot_mydomain = no
master.cf
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
#
================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
#
================================================== ========================
smtp inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_enforce_tls=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#smtps inet n - - - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - - - - smtpd
#-o content_filter=spamassassin
# When relaying mail as backup MX, disable fallback_relay to avoid MX
loops
relay unix - - - - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
#
# ================================================== ==================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ================================================== ==================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender
$recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
#spamassassin unix - n n - - pipe
# user=spamd argv=/user/bin/spamc -f -e
# /usr/sbin/sendmail -oi -f ${sender} ${recipient}
mail.log
Jun 6 15:36:30 mail postfix/qmgr[14167]: 75E49415B1: to=<norw@wwria.com>,
relay=none, delay=1422, delays=1422/0.03/0/0, dsn=4.3.0, status=deferred
(mail transport unavailable)
Jun 6 15:36:30 mail postfix/qmgr[14167]: 75E49415B1: to=<@wwria.com>,
relay=none, delay=1422, delays=1422/0.04/0/0, dsn=4.3.0, status=deferred
(mail transport unavailable)
Jun 6 15:36:30 mail postfix/qmgr[14167]: warning: connect to transport
spamassassin: Connection refused
Jun 6 15:37:30 mail postfix/qmgr[14167]: warning: connect to transport
spamassassin: Connection refused
Jun 6 15:38:12 mail postfix/smtpd[14745]: connect from
unknown[XXX.XX.XXX.XX]
Jun 6 15:38:12 mail postfix/smtpd[14745]: 742DF415B2:
client=unknown[XXX.XX.XXX.XX], sasl_method=LOGIN, sasl_username=helpdesk
Jun 6 15:38:12 mail postfix/cleanup[14750]: 742DF415B2:
message-id=<002d01c8c7da$8ce2f060$a6a8d120$@xx.pl>
Jun 6 15:38:12 mail postfix/qmgr[14167]: 742DF415B2:
from=<helpdesk@xx.com>, size=2671, nrcpt=1 (queue active)
Jun 6 15:38:12 mail postfix/smtpd[14751]: connect from
localhost[127.0.0.1]
Jun 6 15:38:15 mail postfix/smtpd[14745]: disconnect from
unknown[XXX.XX.XXX.XX]
main.cf
smtpd_banner = $myhostname ESMTP $mail_name(Debian/GNU)
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
deamon_directory = /usr/lib/postfix
mail_owner = postfix
myhostname = mail.xx.com
mydomain = xx.com
message_size_limit=51200000
inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
mydestination = $myhostname, localhost.$mydomain, $mydomain
virtual_maps = hash:/etc/postfix/virtual
canonical_maps = hash:/etc/postfix/canonical
masquerade_domains = xx.pl zz.pl $mydomain $myhostname
alias_maps = hash:/etc/aliases
relay_domains = $mydestination /etc/postfix/access
mynetworks = 127.0.0.0/8, 172.0.0.0/8, 192.0.0.0/8
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_recipient_restrictions = permit_sasl_authenticated,
permit_mynetworks, check_sender_access hash:/etc/postfix/mails,
reject_unauth_destination
#smtp_use_tls = yes
#smtpd_use_tls = yes
#smtp_tls_note_starttls_offer = yes
#smtpd_tls_key_file = /etc/postfix/ssl/smtpd.pem
#smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.pem
#smtpd_tls_CAfile = /etc/postfix/ssl/smtpd.pem
#smtpd_tls_loglevel = 1
#smtpd_tls_received_header = yes
#smtpd_tls_session_cache_timeout = 3600#s
#tls_random_source = dev:/dev/urandom
# appending .domain is the MUA's job.
append_dot_mydomain = no
master.cf
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
#
================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
#
================================================== ========================
smtp inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_enforce_tls=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#smtps inet n - - - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - - - - smtpd
#-o content_filter=spamassassin
# When relaying mail as backup MX, disable fallback_relay to avoid MX
loops
relay unix - - - - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
#
# ================================================== ==================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ================================================== ==================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender
$recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
#spamassassin unix - n n - - pipe
# user=spamd argv=/user/bin/spamc -f -e
# /usr/sbin/sendmail -oi -f ${sender} ${recipient}