Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Postfix always tries to deliver emails localy

Status
Not open for further replies.

charms

ISP
Jul 21, 2003
1
CH
Hi

I have changed from sendmail to postfix and have nearly made it to have a somehow working config. I'm at the point that local mail delivery is working fine. But when i want to send an email as example from my mailserver (where postfix is running on) to an email address that is located on another mailserver (devnull@hispeed.ch), the email bounces back and i get an error that the user couldn't be found localy. Can somebody help me with this issue? Further down you'll find the log entries and my postfix config:

command:
--------------------------------------------------
root@overload:/data/conf/postfix # whoami
root
root@overload:/data/conf/postfix # mail devnull@hispeed.ch
Subject: testmail
test
.
EOT


maillog:
--------------------------------------------------
Jul 21 16:36:23 overload postfix/master[94276]: reload configuration
Jul 21 16:36:41 overload postfix/pickup[99806]: F2F804AC23: uid=0 from=<root>
Jul 21 16:36:42 overload postfix/cleanup[99812]: F2F804AC23: message-id=<20030721143641.F2F804AC23@overload.ugly-sheep.org>
Jul 21 16:36:42 overload postfix/qmgr[99807]: F2F804AC23: from=<root@ugly-sheep.org>, size=322, nrcpt=1 (queue active)
Jul 21 16:36:42 overload postfix/virtual[99814]: F2F804AC23: to=<devnull@hispeed.ch>, relay=virtual, delay=1, status=bounced (unknown user: &quot;devnull@hispeed.ch&quot;)
Jul 21 16:36:42 overload postfix/cleanup[99812]: D77334AC25: message-id=<20030721143642.D77334AC25@overload.ugly-sheep.org>
Jul 21 16:36:42 overload postfix/qmgr[99807]: D77334AC25: from=<>, size=1960, nrcpt=1 (queue active)
Jul 21 16:36:42 overload postfix/trivial-rewrite[99813]: warning: do not list domain ugly-sheep.org in BOTH mydestination and virtual_mailbox_domains
Jul 21 16:36:42 overload postfix/virtual[99814]: D77334AC25: to=<chris.armstrong@ugly-sheep.org>, orig_to=<root@ugly-sheep.org>, relay=virtual, delay=0, status=sent (maildir)


main.cf:
--------------------------------------------------------
#########################################################
# SETUP VARIABLES
#########################################################
biff = no
smtpd_banner = $myhostname (SPAMMERS FUCK OF PLEASE)
debug_peer_level = 2
delay_warning_time = 4
command_directory = /usr/local/sbin
config_directory = /usr/local/etc/postfix
daemon_directory = /usr/local/libexec/postfix
program_directory = /usr/local/libexec/postfix
mail_owner = postfix

myhostname = overload.ugly-sheep.org
mydomain = ugly-sheep.org
myorigin = $mydomain
mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost
mynetworks = 127.0.0.0/8, 217.8.193.3

relayhost = 217.8.192.20


#########################################################
# DELIVERY TO VIRTUAL ACCOUNTS AND ALIASES
#########################################################
virtual_alias_domains = $virtual_maps
virtual_maps = hash:/usr/local/etc/postfix/db/virtual, hash:/usr/local/etc/postfix/db/aliases
#transport_maps = hash:/usr/local/etc/postfix/db/transport


#########################################################
# ATTACK AND SPAM RULES
#########################################################
header_checks = regexp:/usr/local/etc/postfix/regex/header_checks
body_checks = regexp:/usr/local/etc/postfix/regex/body_checks

# The disable_vrfy_command parameter allows
# you to disable the SMTP VRFY command. This
# stops some techniques used by spammers to
# harvest email addresses.
disable_vrfy_command = yes

# The smtpd_etrn_restrictions parameter
# restricts what clients are allowed to
# issue the ETRN command. The present
# Postfix ETRN differs from other ETRN
# implementations in that it flushes
# mail for all destinations. This will
# change in the future.
smtpd_etrn_restriction = reject

bounce_size_limit = 65536
header_size_limit = 32768
smtpd_recipient_limit = 128
smtpd_timeout = 180
allow_untrusted_routing = no
unknown_local_recipient_reject_code = 550
strict_rfc821_envelopes = yes
smtpd_soft_error_limit = 10
smtpd_hard_error_limit = 25
smtpd_restriction_classes = verify_sender

verify_sender =
reject_unverified_sender,
permit


#########################################################
# DELIVERY TO LOCAL LDAP ACCOUNTS
#########################################################
local_transport = virtual
recipient_limit = 1500
message_size_limit = 10280000
mailbox_size_limit = 20480000

virtual_minimum_uid = 20
virtual_uid_maps = static:27
virtual_gid_maps = static:27
virtual_mailbox_maps = ldap:ldapsource
virtual_mailbox_domains = static:/usr/local/etc/postfix/static/relaydomains
virtual_mailbox_size_limit = ldap:ldapquota
virtual_mailbox_base =/data/home
virtual_maildir_extended = yes

ldapquota_timeout = 10
ldapquota_server_host = localhost
ldapquota_search_base = ou=mailaccounts,dc=ugly-sheep,dc=org
ldapqouta_server_port = 389
ldapquota_domain = ugly-sheep.org,nomex.ch
ldapquota_query_filter = (&(mail=%s)(accountstatus=active))
ldapquota_result_attribute = mailquota
ldapquota_bind = yes
ldapquota_bind_dn = cn=Manager,dc=ugly-sheep,dc=org
ldapquota_bind_pw = ******

ldapsource_timeout = 10
ldapsource_server_host = localhost
ldapsource_search_base = ou=mailaccounts,dc=ugly-sheep,dc=org
ldapsource_server_port = 389
ldapsource_query_filter = (&(mail=%s)(accountstatus=active))
ldapsource_result_attribute = mailbox
ldapsource_bind = yes
ldapsource_bind_dn = cn=Manager,dc=ugly-sheep,dc=org
ldapsource_bind_pw = ******


#########################################################
# SMTPD SENDER RESTRICTIONS
#########################################################
smtpd_client_restrictions =
permit_mynetworks,
check_client_access hash:/usr/local/etc/postfix/db/access_client,
reject_rbl_client bl.spamcop.net,
reject_rbl_client relays.ordb.org,
reject_rbl_client spews.relays.osirusoft.com,
reject_rbl_client proxies.relays.monkeys.com,
reject_rbl_client sbl.spamhaus.org,
permit

smtpd_helo_required = yes
smtpd_helo_restrictions =
permit_mynetworks,
check_helo_access hash:/usr/local/etc/postfix/db/access_helo,
reject_non_fqdn_hostname,
reject_unknown_hostname,
reject_invalid_hostname,
permit

smtpd_sender_restrictions =
permit_mynetworks,
check_sender_access hash:/usr/local/etc/postfix/db/access_sender,
reject_non_fqdn_sender,
reject_unknown_sender_domain,
permit

smtpd_recipient_restrictions = permit_mynetworks,
reject_non_fqdn_recipient,
check_relay_domains,
reject_unauth_pipelining,
reject_non_fqdn_recipient,
reject_unknown_sender_domain,
reject_unknown_recipient_domain,
reject_unauth_destination,
reject_invalid_hostname,
reject_non_fqdn_hostname,
permit

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top